You attack!\n<<set $D20 = (Math.floor(Math.random()*20))+1>>Roll:<<print $D20>>\n<<if $D20 gte 10>>You hit!<<set $Hit = "yes">><<else>>You miss!<<set $Hit = "no">><<endif>>\n<<if $Hit eq "yes">><<set $D6 = (Math.floor(Math.random()*6))+1 + $Attack>>\nYou do <<print $D6>> damage!\n<<set $MDamage = $D6 - $MDefense>>\nThe monster takes <<print $MDamage+"">> damage!<<endif>>\n<<set $MHP = $MHP - $MDamage>>\n<<display 'Monster Stats'>>\n\nThe monster attacks!\n<<set $D20 = (Math.floor(Math.random()*20))+1>>Roll:<<print $D20>>\n<<if $D20 gte 10>>It hits!<<set $Hit = "yes">><<else>>It misses!<<set $Hit = "no">><<endif>>\n<<if $Hit eq "yes">><<set $D6 = (Math.floor(Math.random()*6))+1>>\nIt does <<print $D6>> damage!\n<<set $MDamage = $D6 - $Defense>>\nYou take <<print $MDamage+"">> damage!<<endif>>\n<<set $HP = $HP - $MDamage>>\n<<display 'Stats'>>\n<<if $HP lte 0>>You're dead!<<else>><<if $MHP lte 0>>You win!<<else>><<display 'Combat'>><<endif>><<endif>>
<<set $D6 = 5>>\n<<set $MDR = 2>>\n<<set $MDamage = $D6 - $MDR>>\n<<print $MDamage>>
The room is empty, so you return to the first. \n\n<<display 'Choices'>>\n\n
* Your Attack Power (AP) is <<print $Attack>>.\n* Your Defense Rating (DR) is <<print $Defense>>.\n* Your Hit Points (HP) are <<print $HP+"">>.\n* Your Experience Points (XP) are <<print $XP+"">>.
The room's walls, ceiling and floor are all made of featureless stone blocks. The ceiling is about ten feet high. <<if $Torch eq "no">>A flickering torch sits in a holder on the wall dimly illuminating the room. There are two doors, one to the left and one to the right. A table stands in the center of the floor.<<else>>There are two doors, one to the left and one to the right. A table stands in the center of the floor.<<endif>>\n\n<<display 'Choices'>>\n
<<set $Sword = "yes">><<if $Table eq "no">><<set $Table = "yes">>You lift the sword from the table, but as you do, you hear a loud "click!" from beneath. You've set off a trap! \n\nPoised and ready for anything, you look around the room but see no sign of changes. \n\nWhat could have happened?\n\nCertain there is no //immediate// danger, you buckle the scabbard around your waist and draw the sword.\n<<else>>You pick up the sword and buckle the scabbard around your waist before drawing the blade.<<endif>> \n<<set $Attack = $Attack + 10>>\nYour Attack Power raises +10!\n<<display 'Stats'>>\n\n<<display 'Choices'>>
The door is sturdy, yet plain. It has an iron ring for a handle and swings outward. \n\n<<display 'Choices'>>
<<set $Torch = "yes">>You lift the torch from the holder. \n\n<<display 'Choices'>>
<<if $Table eq "no">>The table is made of wood, sturdy yet plain.\n\nHowever, you somehow manage to notice one of the legs is longer than the other. The tile upon which the leg stands is also lowered strangely. It's a pressure plate! Lifting the sword from the table will undoubtedly cause a mechanical reaction of some sort, likely a trap.\n\nYou cautiously chip off a loose splinter from the table and carefully lodge it in the edge of the pressure plate, disarming the trap.\n\nYou gain 100 XP!<<set $XP = $XP + 100>><<display 'Stats'>><<set $Table = "yes">><<else>>The table is made of wood, sturdy yet plain.<<endif>>\n\n<<display 'Choices'>>
What do you do?\n\n----\nExamine the [[left door|Left Door]], the [[right door|Right Door]], or the [[sword|Sword]]? Or, examine the [[room|Room]] or [[table|Table]].\n\nGo [[left|Left]].\n\nGo [[right|Right]].\n\n<<if $Torch eq "no">>Take the [[torch|Get Torch]].<<endif>>\n\n<<if $Sword eq "no">>Take the [[sword|Get Sword]].<<endif>>
<<set $Sword = "no">><<set $Torch = "no">><<set $Table = "no">><<set $Attack = 1>><<set $Defense = 1>><<set $HP = 10>><<set $XP = 0>>You stand in a room dimly illuminated by a flickering torch. There are two doors, one to your right and one to your left. There is a table here with a sword. \n\nYou don't know how you got here, but one thing is certain, you must escape!\n<<display 'Stats'>>\n<<display 'Choices'>>
* The monster's AP is <<print $MAttack>>.\n* The monster's DR is <<print $MDefense>>.\n* The monster's HP are <<print $MHP+"">>.\n* The monster is worth <<print $MXP>> XP.
The door is sturdy, yet plain. It has an iron ring for a handle and swings outward. \n\n<<display 'Choices'>>
<<if $Sword eq "no">>The broadsword, belt and scabbard are all of handsome, yet plain make and lie in the center of the table.<<else>>The broadsword in your hand, as well as the belt and scabbard at your waist, are all of handsome, yet plain make.<<endif>>\n\n<<display 'Choices'>>
Dungeon Quest: Into the Abyss
Richard Sharpe
What do you do?\n\n----\n[[Fight]]!\n\n[[Run]]!
<<set $MAttack = 2>><<set $MDefense = 1>><<set $MHP = 10>><<set $MXP = 10>>You meet a goblin wielding a club!\n<<display 'Monster Stats'>>\n<<display 'Combat'>>