(set: $hp to 10) (set: $coins to 10) (set: $days to 0) (set: $adds to 1) (set: $weapon to "sword") You are an adventurer! [[Begin quest!|main]] You have been adventuring for $days days. Your health is $hp and you have $coins gold pieces. You have a +$adds $weapon . [[rest]] [[adventure->start adventure]] [[shop]] (set: $hp to 10) (set: $days to $days + 1) You feel refreshed. (display: "main") (set: $monster to (either:1,2,3)) (if: $monster is 1)[ (set: $monster_name to "kobold") (set: $monster_hp to 2) ] (if: $monster is 2)[ (set: $monster_name to "orc") (set: $monster_hp to 4) ] (if: $monster is 3)[ (set: $monster_name to "troll") (set: $monster_hp to 6) ] A $monster_name appears! [[fight]] [[flee->main]] (if: $coins >= 10)[The following items are for sale: [[magic potion]] (if: $coins >= 20)[ [[battleaxe]] ] (if: $coins >= 30)[ [[wizard's staff]] ] ] (else:)[You can't afford anything!] [[Leave the shop|main]] (if: (either: 0, 1) is 0)[ The monster bites you! (set: $hp to $hp - (either: 1,2,3)) (if: $hp < 1)[ You are [[dead]]! ] (else:)[ Your health is $hp. [[fight]] [[flee|main]] ] ] (else:)[ You hit the monster! (set:$monster_hp = $monster_hp - $adds) (if: $monster_hp < 1)[ The [[monster is dead]]! ] (else:)[ Its health is $monster_hp. [[fight]] [[flee|main]] ] ] You are dead [[restart?|init]] (set: $streak to $streak + 1) (set: $drop to (random: 3,10) * $streak) (set: $spoils to $spoils + $drop) You collect $drop coins from the monster carcass! Your spoils are currently $spoils coins and your health is $hp. You've killed $streak monster(if: not($streak is 1))[s] on this adventure. [[continue|adventure]] [[go home|collect spoils]] (set: $spoils to 0) (set: $streak to 0) (display: "adventure") (set: $coins to $coins + $spoils) (display: "main") (set: $coins to $coins - 10) (set: $hp to $hp + (either: 5,10,15)) You spend 10 gold and your heath is now $hp [[return to shop|shop]] (set: $coins to $coins - 20) (set: $adds to 2) (set: $weapon to "battle axe") You spend 20 gold and your weapon now does 2 damage [[return to shop|shop]] (set: $coins to $coins - 30) (set: $adds to 3) (set: $weapon to "wizard's staff") You spend 20 gold and your weapon now does 3 damage [[return to shop|shop]]