Welcome to **Goblin Cave**, my first Twine game! I created it using Harlowe, and it's been a fun exercise fumbling and flailing my way through. The finished game features a simple cave to explore and a few monsters to battle using a basic combat system. The whole game takes about five minutes to play. I hope you enjoy it. Thanks for playing!\ {(set: $fist to (datamap: "id", "fist", "damage", 1)) (set: $dagger to (datamap: "id", "dagger", "damage", 2)) (set: $short_sword to (datamap: "id", "short sword", "damage", 4)) (set: $long_sword to (datamap: "id", "long sword", "damage", 6)) (set: $rat to (datamap: "m_id", "Rat", "m_attack", 1, "m_hp", 2)) (set: $goblin to (datamap: "m_id", "Goblin", "m_attack", 2, "m_hp", 5)) (set: $orc to (datamap: "m_id", "Orc", "m_attack", 3, "m_hp", 7)) (set: $ogre to (datamap: "m_id", "Ogre", "m_attack", 5, "m_hp", 10)) (set: $hp to 30) (set: $coins to 0) (set: $weapon to $fist) (set: $description to 1) (set: $treasure to 0) (set: $d_entrance to "long") (set: $adversary to 1)} --- [[Begin your adventure!->Entrance]]Health: $hp | Gold: $coins | Weapon: (print: $weapon's id) ---{(display: "status") \ (set: $room to "Entrance")} \ (if: $d_entrance is "long")[ You stand outside a cave entrance near the base of a rocky mountain. You have heard that goblins and other creatures live deep underground here. They are rumored to guard a hoard of wealth, and you have traveled many miles hoping to collect. Unfortunately, you could not procure any weapons for your adventure. You carry only basic rations and the map that guided you here. A storm brews overhead, and thunder booms in the distance. ] (else:)[ You stand outside the cave entrance. It is raining. ] \ (if: $adversary is 1)[(set: $monster to $rat) <br>A rat scampers around with a dagger in its mouth.] \ (if: $treasure is 1)[ A dagger lies on the ground next to a dead rat. ] \ (if: ($adversary is 0) and ($treasure is 0))[ There is nothing else to see here. ] --- What do you do? [[Enter the cave.|Passage]] (if: $adversary is 1)[[[Attack the rat.|fight]]] \ (if: $treasure is 1)[[[Get the dagger.|dagger]]] (set: $d_entrance to "short")(display: "status") \ You stand in a narrow east-west passage. The cave exit lies to your west, and the passage continues to the east. \ (set: $adversary to 1) \ (set: $treasure to 0) --- [[Go west.|Entrance]] [[Go east.|Trash Heap]](display: "status") \ (set: $room to "Trash Heap") \ Debris and trash litter the room. It's disgusting and smells bad. There is a wooden door to the south. (if: $adversary is 1)[ (set: $monster to $goblin) <br>A goblin looks up from digging through the garbage and glares at you. You notice it carries a dagger as it advances toward you.] \ (if: $treasure is 1)[ <br>A dagger lies on the ground next to a dead goblin. ] \ (if: ($adversary is 0) and ($treasure is 0))[ <br>There is nothing else to see here. ] --- [[Go west.|Passage]] (if: $adversary is 1)[[[Rush past the goblin to the south door.|Stone Corridor]]] (else:)[[[Open the door to the south.|Stone Corridor]]] (if: $adversary is 1)[[[Attack the goblin.|fight]]] \ (if: $treasure is 1)[[[Get the dagger.|dagger]]] (display: "status") \ You swing your (print: $weapon's id) at the (print: $monster's m_id). \ (if: (either: 0,1) is 0)[ You miss. ] (else:)[ You hit! (set: ($monster's m_hp) to (($monster's m_hp) - ($weapon's damage))) (print: $monster's m_id) health now equals (print: $monster's m_hp). (if: ($monster's m_hp) < 1)[ <br><br>You have slain the (print: $monster's m_id)! (set: $adversary to 0) (set: $treasure to 1) ]] \ (if: ($monster's m_hp) > 0)[ <br><br>The (print: $monster's m_id) attacks and (if: (either: 0,1) is 0)[ misses. ] (else:)[ hits you for (print: $monster's m_attack) damage! (set: $hp to ($hp - ($monster's m_attack)))]] --- (if: $hp > 0)[(if: ($monster's m_hp) > 0)[[[Fight!|fight]]]] \ (if: $hp < 1)[ [[You have been killed by the (print: $monster's m_id).|dead]] ] \ (if: $treasure is 1)[ [[Search for treasure.|$room]] ]Ouch. That really hurt. [[Restart?|init]]Double-click this passage to edit it.(display: "status") (display: "(display: "status") \ (if: $weapon is $dagger)[ You already have a dagger, and this one is no better. ](else:)[ (set: $weapon to $dagger) You pick up the dagger and swish it through the air. ] \ (set: $treasure to 0) --- [[Continue exploring.|$room]] (display: "status") \ (set: $room to "Orc Lair") \ A rumpled bed and a wooden desk occupy this stone room. \ (if: $adversary is 1)[ (set: $monster to $orc) \ <br><br>An ugly orc looks up from the desk as you enter. It appears to be doing paperwork and is not at all happy to be disturbed. The creature stands and whips a short sword through the air, growling. You note double-doors to the east, but the orc blocks your path.] \ (if: $treasure is 1)[ <br><br>A short sword lies on the ground next to a dead orc. ] --- [[Go north.|Stone Corridor]] (if: $adversary is 1)[[[Attack the orc.|fight]]] \ (if: $adversary is 0)[[[Open the double-doors to the east.|Damp Passage]]] (if: $treasure is 1)[[[Get the short sword.|short sword]]] (display: "status") \ You pick up the short sword. It has a nice weight to it, and it's a step up from the dagger. \ (set: $weapon to $short_sword) \ (set: $treasure to 0) --- [[Continue exploring.|$room]] (display: "status") \ (set: $room to "Ogre Cavern") \ Stalagmites drip down from the high ceiling of this natural cave. \ (if: $adversary is 1)[ (set: $monster to $ogre) \ <br><br>A massive ogre reclines on a stone throne eating a leg of mutton. Human skulls and bones are scattered on the ground around it. The monster shouts when it sees you and throws the meat to the ground, jumping to its feet. The ogre is nearly ten feet tall of pure ugly. It grabs a tree trunk club and rushes toward you.] \ (if: $treasure is 1)[ <br><br>You locate a wooden chest behind the ogre's throne. ] --- [[Go west.|Damp Passage]] (if: $adversary is 1)[[[Attack the ogre.|fight]]] \ (if: $treasure is 1)[[[Open the chest.|treasure chest]]] (display: "status") \ You open the chest to find beautifully crafted long sword resting in a pile of gold. \ (set: $weapon to $long_sword) \ (set: $treasure to 0) \ (set: $coins to 10000) --- [[Victory!|victory]] (display: "status")\ Congratulations! You have defeated the ogre and won the game! --- [[Restart?|init]](display: "status") \ This natural passage runs east and west. It's slick with moisture. \ (set: $adversary to 1) \ (set: $treasure to 0) --- [[Go west.|Orc Lair]] [[Go east.|Ogre Cavern]](display: "status") \ This stone hallway runs north and south. It stinks of trash. \ (set: $adversary to 1) \ (set: $treasure to 0) --- [[Go north.|Trash Heap]] [[Go south.|Orc Lair]]