(set: $hp to 15) (set: $max_hp to 15) (set: $coins to 0) (set: $bandit_boss to 5)(set: $bbo_hp to 20)(set: $max_bbo_hp to 20) (set: $bandit_bruiser to 10)(set: $bb_hp to 15)(set: $max_bb_hp to 15) (set: $bandit_punk to 20)(set: $bp_hp to 10)(set: $max_bp_hp to 10) (set: $arcane_wrath to (datamap: "id", "arcane wrath", "cost", 50, "damage", 20, "next", 0)) (set: $chaos_blast to (datamap: "id", "chaos blast", "cost", 30, "damage", 17, "next", $arcane_wrath)) (set: $ice_nova to (datamap: "id", "ice nova", "cost", 15, "damage", 12, "next", $chaos_blast)) (set: $root_strike to (datamap: "id", "root strike", "cost", 10, "damage", 8, "next", $ice_nova)) (set: $fire_ball to (datamap: "id", "fire ball", "cost", 5, "damage", 5, "next", $root_strike)) (set: $mana_bolt to (datamap: "id", "mana bolt", "cost", 1, "damage", 2, "next", $fire_ball)) (set: $weapon to $mana_bolt) (display: "done")Welcome to //Mage vs Bandits//, a game that took way too long to make and an even longer time to upgrade! I hope you enjoy version 1.2 because I really, really need you to. [[Play game|home]]Ho there, young mage! Our small village is in dire need of your help! Please, you must get rid of the //Algebraic Bandits// before they bring ruin to our people! [[Help|main]]The bandits have overrun the village! Only you can save the villagers with the might of your magic spells! There are $bandit_punk bandit punks, $bandit_bruiser bandit bruisers, and $bandit_boss bandit bosses! ''Status'' Health: $hp Coins: $coins Current spell: (print: $weapon's id), (print: $weapon's damage) damage [[To battle!->start adventure]] [[Get more power|spell shop]] [[Recover strength|rest]]The bandits have taken over the Town Hall, the Market, and the Village Housing. Which place will you rescue first? [[Town Hall]] [[Market]] [[Village Housing]]Your current spell is (print: $weapon's id). You have $coins coins. (set: $next_weapon to $weapon's next) (if: not ($next_weapon is 0))[ (set: $nwn to $next_weapon's id) [[buy $nwn->buy]] ((print: $next_weapon's cost) coins, does (print: $next_weapon's damage) damage)] [[Leave|main]]You're feeling pretty weak, so you head over to a tent to get some rest. [[Tent|sleep]] [[Leave|main]](if: $bandit_boss > 1)[ In the town hall, you come upon $bandit_boss Algebraic Bandit Bosses! They have $bbo_hp hp and you have $hp hp! What will you do? [[Fight|Fight Bandit Boss]] [[Flee]]] (else:)[You've defeated all the bandits! You've [[saved the village]]!](if: $bandit_bruiser > 1)[Entering the market, you stumble upon $bandit_bruiser Algebraic Bandit Bruisers! They have $bb_hp hp and you have $hp hp! What will you do? [[Fight|Fight Bandit Bruiser]] [[Flee]]] (else:)[ You've defeated all the Bandit Bruisers! Hurry up and defeat the bosses! [[Town Hall]] [[Leave|main]] ](if: $bandit_punk > 1)[ Entering the Village Housing, you're intercepted by $bandit_punk Algebraic Bandit Punks! They have $bp_hp hp and you have $hp hp! What will you do? [[Fight|Fight Bandit Punk]] [[Flee]]] (else:)[You've defeated the bandit punks! Go on and defeat the bandit bruisers! [[Market]] [[Leave|main]] ](if: (either: 0, 1) is 0)[ The bandit boss hits you! (set: $hp to $hp - 1) (if: $hp < 1)[ You have been [[defeated]]! ] (else:)[ You've got $hp health remaining. [[Fight|Fight Bandit Boss]] [[flee|Flee]] ] ] (else:)[ You hit the bandit! (if: $weapon is "mana bolt")[(set: $damage to 2)](else-if: $weapon is "fire ball")[set: $damage to 5)](else-if: $weapon is "root strike")[(set: $damage to 8)](else-if: $weapon is "ice nova")[(set: $damage to 12)](else-if: $weapon is "chaos blast")[(set: $damage to 17)](else-if: $weapon is "arcane wrath")[(set: $damage to 20)] (set:$bbo_hp = $bbo_hp - ($weapon's damage)) (if: $bbo_hp < 1)[(set: $bandit_boss to $bandit_boss -1) The [[bandit boss has been defeated]]! ] (else:)[ The bandit boss has $bbo_hp health remaining. [[Fight|Fight Bandit Boss]] [[flee|Flee]] ] ]You're not taking any chances on this one! (display: "main")You've lost the fight against the bandits and all the villagers were killed! How about you give it [[another shot|init]]?(set: $streak to $streak + 1) (set: $loot to (random: 3,10) * $streak) (set: $spoils to $poils + $loot) You've successfully defeated the bandit punk and have collected $loot coins from his pouch. Your spoils are $spoils coins and you have $hp health. You've defeated $streak bandit(if: not($streak is 1))[s] on this adventure. There are $bandit_punk bandit punk(if: not ($bandit_punk is 1))[s] left. (if: $bandit_punk < 1)[You have [[cleared the housing]] of bandit punks! Congratulations!] (else:)[(set: $bp_hp to $max_bp_hp)[[Keep going|Enter the Village]] [[Enough for now|collect spoils]]](if: (either: 0, 1) is 0)[ The bandit bruiser hits you! (set: $hp to $hp - 1) (if: $hp < 1)[ You have been [[defeated]]! ] (else:)[ You've got $hp health remaining. [[Fight|Fight Bandit Bruiser]] [[flee|Flee]] ] ] (else:)[ You hit the bandit bruiser! (if: $weapon is "mana bolt")[(set: $damage to 2)](else-if: $weapon is "fire ball")[set: $damage to 5)](else-if: $weapon is "root strike")[(set: $damage to 8)](else-if: $weapon is "ice nova")[(set: $damage to 12)](else-if: $weapon is "chaos blast")[(set: $damage to 17)](else-if: $weapon is "arcane wrath")[(set: $damage to 20)] (set:$bb_hp = $bb_hp - ($weapon's damage)) (if: $bb_hp < 1)[(set: $bandit_bruiser to $bandit_bruiser -1) The [[bandit bruiser has been defeated]]! ] (else:)[ The bandit bruiser has $bb_hp health remaining. [[Fight|Fight Bandit Bruiser]] [[flee|Flee]] ] ](if: (either: 0, 1) is 0)[ The bandit punk hits you! (set: $hp to $hp - 1) (if: $hp < 1)[ You have been [[defeated]]! ] (else:)[ You've got $hp health remaining. [[Fight|Fight Bandit Punk]] [[flee|Flee]] ] ] (else:)[ You hit the bandit punk! (if: $weapon is "mana bolt")[(set: $damage to 2)](else-if: $weapon is "fire ball")[set: $damage to 5)](else-if: $weapon is "root strike")[(set: $damage to 8)](else-if: $weapon is "ice nova")[(set: $damage to 12)](else-if: $weapon is "chaos blast")[(set: $damage to 17)](else-if: $weapon is "arcane wrath")[(set: $damage to 20)] (set:$bp_hp = $bp_hp - ($weapon's damage)) (if: $bp_hp < 1)[(set: $bandit_punk to $bandit_punk - 1) The [[bandit punk has been defeated]]! ] (else:)[ The bandit has $bp_hp health remaining. [[Fight|Fight Bandit Punk]] [[flee|Flee]] ] ]You're feeling pretty refreshed now. (set: $hp to $max_hp) (display: "main")(set: $spoils to 0) (set: $streak to 0) (display: "Enter the Village")(set: $coins to $coins + $spoils) (display: "main")(if: $coins > ($next_weapon's cost))[(set: $weapon to $next_weapon) (set: $coins to $coins - ($weapon's cost)) You have successfully bought a new spell! (display: "spell shop")] (else:)[You don't have enough money! (display: "spell shop")](set: $streak to $streak + 1) (set: $loot to (random: 3,10) * $streak) (set: $spoils to $poils + $loot) You've successfully defeated the bandit and have collected $loot coins from his pouch. Your spoils are $spoils coins and you have $hp health. You've defeated $streak bandit(if: not($streak is 1))[s] on this adventure. There are $bandit_boss bandit boss(if: not ($bandit_boss is 1))[es] left. (if: $bandit_boss < 1)[You have [[saved the village]]! Congratulations!] (else:)[(set: $bbo_hp to $max_bbo_hp)[[Keep going|Enter the Village]] [[Enough for now|collect spoils]]]Thank you, young mage! With your assistance, we have finally managed to retake our village! Your progress was astounding! You managed to save the village with $hp health, $coins coins, and the spell (print: $weapon's id). Thanks for all your help!(set: $streak to $streak + 1) (set: $loot to (random: 3,10) * $streak) (set: $spoils to $poils + $loot) You've successfully defeated the bandit bruiser and have collected $loot coins from his pouch. Your spoils are $spoils coins and you have $hp health. You've defeated $streak bandit(if: not($streak is 1))[s] on this adventure. There are $bandit_bruiser bandit bruiser(if: not ($bandit_bruiser is 1))[es] left. (if: $bandit_bruiser < 1)[You have [[emptied the market]] of bandit bruisers! Congratulations!] (else:)[(set: $bb_hp to $max_bb_hp)[[Keep going|Enter the Village]] [[Enough for now|collect spoils]]]The market has been emptied of all bandit bruisers. Congrats! Keep up the good work! [[Beat the bosses|Town Hall]] [[Leave|collect spoils]]The housing has been cleared of all bandit punks. Congrats! Keep up the good work! [[Beat the bruisers|Market]] [[Leave|collect spoils]]