A Virginia judge yesterday dismissed a lawsuit attempting to link the popular "Dungeons and Dragons" fantasy game with a high school student's suicide.

Hanover County Circuit Court Judge Richard H.C. Taylor said that a high school principal who had been sued by the dead student's parents was immune from the suit because of the principle that holds government officials cannot be sued for acts that occur in their official capacity.

The parents of Irving Lee (Bink) Pulling II of Montpelier, who shot himself after another student allegedly placed a "curse" upon him during a "Dungeons and Dragons" game at school, had sought $1 million from Robert A. Bracey III, principal of Patrick Henry High School.

Bracey's lawyer, William O. Smith, argued that the principal's "official capacity" made him immune from the suit, and the judge agreed the plea was "well taken." The Pulling family lawyer said the parents will appeal the decision.

The suit, filed in August, said Pulling played "Dungeons and Dragons" as "an organized school activity" in a group whose leader, or "Dungeon Master," was a schoolteacher.

Pulling, who shot himself in the chest with a pistol June 9, 1982, left a suicide note that one investigator said contained "unexplainable-type" phrases, apparently references to the game. Sheriff's deputies said the youth's room was filled with "Dungeons and Dragons" paraphernalia.

D&D, as it is called, is an intricate problem-solving game set in a magical medieval universe. Players, who are given their strengths and weapons by the Dungeon Master, maneuver in a world filled with sorcerers, dwarves, monsters and so on.

Since its development 10 years ago, it has become popular on college campuses as well as high schools, and is often used as an activity in programs for gifted and talented.

A spokesman for TSR Inc. of Lake Geneva, Wis., which owns and distributes D&D material, estimated that 3 million to 4 million people in the United States play D&D at least once a week. Sales of the materials, along with such offshoots as juvenile adventure books and a CBS Saturday morning cartoon show, are expected to total $35 million this year.

"Dungeons and Dragons" has come under attack by several religious fundamentalist groups, which charge the game encourages an interest in witchcraft; and some parents who say they fear the psychological pressures involved.

The Arlington School Board, shortly after the filing of the suit, banned the game. Board member Margaret Vocek cited Pulling's death in proposing to exclude the game from the list of approved extracurricular activities.