<h3>Hallway</h3> From the hallway you can enter a [[bedroom]], a [[bathroom]], the [[kitchen]], the [[back door->back yard]], or the [[front door->porch]].(set: $location to "hall") <h3>Bedroom</h3> You can search the [[bed]], the [[dresser]], or the [[closet]]. (set: $location to "bedroom") [[Leave->hall]] <h3>Bathroom</h3> {In the bathroom there's a (if: $barOfSoap is 0)[(link: "<a class='item'>bar of soap</a>")[<strike>bar of soap</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>bar of soap</a>\")[(set: $selected to 'bar of soap')]"))(set: $barOfSoap to 1)]](else:)[<strike>bar of soap</strike>], a (if: $shampooBottle is 0)[(link: "<a class='item'>shampoo bottle</a>")[<strike>shampoo bottle</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>shampoo bottle</a>\")[(set: $selected to 'shampoo bottle')]"))(set: $shampooBottle to 1)]](else:)[<strike>shampoo bottle</strike>], and a cheap (if: $razor is 0)[(link: "<a class='item'>razor</a>")[<strike>razor</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>razor</a>\")[(set: $selected to 'razor')]"))(set: $razor to 1)]](else:)[<strike>razor<strike>].}(set: $location to "bathroom") [[Leave->hall]]<h3>Kitchen</h3> In the kitchen there's a [[refrigerator]], a [[dishwasher]], some [[cabinets]], and some [[drawers]]. (set: $location to "kitchen") [[Leave->hall]] <h3>Porch</h3> {On the front porch there's a (if: $rockingChair is 0)[(link: "<a class='item'>rocking chair</a>")[<strike>rocking chair</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>rocking chair</a>\")[(set: $selected to 'rocking chair')]"))(set: $rockingChair to 1)]](else:)[<strike>rocking chair</strike>] and a [[mailbox]]. There's a convenience store (link: "down the street")[(if: $stuff contains "(link: \"<a class='item'>bicycle</a>\")[(set: $selected to 'bicycle')]")[(set: $runtime to 10)](else:)[(set: $runtime to 0)](set: $destination to "convenience store")(goto: "street")], but the street is full of zombies. (set: $location to "porch")} [[Go back inside->hall]] (if: false)[ [[street]] ]<h3>Bedroom</h3> {In the dresser drawers you find a (if: $hairbrush is 0)[(link: "<a class='item'>hairbrush</a>")[<strike>hairbrush</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>hairbrush</a>\")[(set: $selected to 'hairbrush')]"))(set: $hairbrush to 1)]](else:)[<strike>hairbrush</strike>], a (if: $purse is 0)[(link: "<a class='item'>purse</a>")[<strike>purse</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>purse</a>\")[(set: $selected to 'purse')]"))(set: $purse to 1)(set: $purseuses to 3)]](else:)[<strike>purse</strike>], and a lot of (if: $clothes is 0)[(link: "<a class='item'>clothes</a>")[<strike>clothes</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>clothes</a>\")[(set: $selected to 'clothes')]"))(set: $clothes to 1)]](else:)[<strike>clothes</strike>].} (link: "Done")[(goto: "bedroom")]<h3>Bedroom</h3> {On the bed are some (if: $sheets is 0)[(link: "<a class='item'>sheets</a>")[<strike>sheets</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>sheets</a>\")[(set: $selected to 'sheets')]"))(set: $sheets to 1)]](else:)[<strike>sheets</strike>] and a (if: $pillow is 0)[(link: "<a class='item'>pillow</a>")[<strike>pillow</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>pillow</a>\")[(set: $selected to 'pillow')]"))(set: $pillow to 1)(set: $pillowuses to 3)]](else:)[<strike>pillow</strike>]. Underneath the bed is a [[guitar case]].} (link: "Done")[(goto: "bedroom")]<h3>Kitchen</h3> {In the fridge there's a (if: $milkJug is 0)[(link: "<a class='item'>milk jug</a>")[<strike>milk jug</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>milk jug</a>\")[(set: $selected to 'milk jug')]"))(set: $milkJug to 1)(set: $milkjuguses to 3)]](else:)[<strike>milk jug</strike>] and a bunch of (if: $vegetables is 0)[(link: "<a class='item'>vegetables</a>")[<strike>vegetables</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>vegetables</a>\")[(set: $selected to 'vegetables')]"))(set: $vegetables to 1)]](else:)[<strike>vegetables</strike>].} (link: "Done")[(goto: "kitchen")]<h3>Bedroom</h3> Inside the case is a (if: $guitar is 0)[(link: "<a class='item'>guitar</a>")[<strike>guitar</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>guitar</a>\")[(set: $selected to 'guitar')]"))(set: $guitar to 1)]](else:)[<strike>guitar</strike>]. (link: "Done")[(goto: "bed")]<h3>Bedroom</h3> {In the closet there are some wire (if: $hangers is 0)[(link: "<a class='item'>hangers</a>")[<strike>hangers</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>hangers</a>\")[(set: $selected to 'hangers')]"))(set: $hangers to 1)(set: $hangeruses to 2)]](else:)[<strike>hangers</strike>] and a (if: $jarOfCoins is 0)[(link: "<a class='item'>jar of coins</a>")[<strike>jar of coins</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>jar of coins</a>\")[(set: $selected to 'jar of coins')]"))(set: $jarOfCoins to 1)]](else:)[<strike>jar of coins</strike>].} (link: "Done")[(goto: "bedroom")]<h3>Kitchen</h3> {In the cabinets you find some ceramic (if: $plates is 0)[(link: "<a class='item'>plates</a>")[<strike>plates</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>plates</a>\")[(set: $selected to 'plates')]"))(set: $plates to 1)(set: $platecount to 4)]](else:)[<strike>plates</strike>] and (if: $bowls is 0)[(link: "<a class='item'>bowls</a>")[<strike>bowls</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>bowls</a>\")[(set: $selected to 'bowls')]"))(set: $bowls to 1)(set: $bowlcount to 4)]](else:)[<strike>bowls</strike>], some (if: $boxesOfFood is 0)[(link: "<a class='item'>boxes of food</a>")[<strike>boxes of food</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>boxes of food</a>\")[(set: $selected to 'boxes of food')]"))(set: $boxesOfFood to 1)]](else:)[<strike>boxes of food</strike>], and some (if: $cannedGoods is 0)[(link: "<a class='item'>canned goods</a>")[<strike>canned goods</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>canned goods</a>\")[(set: $selected to 'canned goods')]"))(set: $cannedGoods to 1)(set: $cancount to 6)]](else:)[<strike>canned goods</strike>].} (link: "Done")[(goto: "kitchen")]<h3>Kitchen</h3> {In the drawers you find some (if: $forks is 0)[(link: "<a class='item'>forks</a>")[<strike>forks</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>forks</a>\")[(set: $selected to 'forks')]"))(set: $forks to 1)(set: $forkscount to 4)]](else:)[<strike>forks</strike>] and some (if: $spoons is 0)[(link: "<a class='item'>spoons</a>")[<strike>spoons</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>spoons</a>\")[(set: $selected to 'spoons')]"))(set: $spoons to 1)]](else:)[<strike>spoons</strike>].} (link: "Done")[(goto: "kitchen")]<h3>Kitchen</h3> {In the dishwasher there is a chef's (if: $knife is 0)[(link: "<a class='item'>knife</a>")[<strike>knife</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>knife</a>\")[(set: $selected to 'knife')]"))(set: $knife to 1)(set: $knifeuses to 3)]](else:)[<strike>knife</strike>].} (link: "Done")[(goto: "kitchen")]<h3>Street</h3> The zombies are EVERYWHERE.(if: $nextZombie > 5)[(set: $nextZombie to 5)] {You (if: $stuff contains "(link: \"<a class='item'>bicycle</a>\")[(set: $selected to 'bicycle')]")[ride the bicycle](else:)[run] down the street towards the $destination..... (live: 1s)[ (if: $runtime >= 30)[(if: $destination is "convenience store")[You made it to the [[convenience store]]!](else:)[You made it back to the [[porch]]!] (stop:)] (else:)[ (set: $runtime +=1) ] ] (set: $location to "street")}<h3>Porch</h3> {In the mailbox there's a bunch of (if: $mail is 0)[(link: "<a class='item'>mail</a>")[<strike>mail</strike>(set: $stuff to $stuff + (array: "(link: 'mail')[(set: $selected to 'mail')]"))(set: $mail to 1)]](else:)[<strike>mail</strike>] and a (if: $key is 0)[(link: "<a class='item'>key</a>")[<strike>key</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>key\")[(set: $selected to 'key')]"))(set: $key to 1)]](else:)[<strike>key</strike>].} (link: "Done")[(goto: "porch")](if: $unlocked is 0)[You try to open the door to the shed, but it's locked. (if: $stuff contains "(link: \"<a class='item'>key\")[(set: $selected to 'key')]")[(link: "<br><br>Try the key")[(set: $unlocked to 1)(goto: "shed")]]] (else:)[[[Never mind->back yard]]](else:)[(goto: "shed")] (if: false)[ [[shed]] ]<h3>Shed</h3> {In the shed there's a (if: $rake is 0)[(link: "<a class='item'>rake</a>")[<strike>rake</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>rake</a>\")[(set: $selected to 'rake')]"))(set: $rake to 1)(set: $rakeuses to 3)]](else:)[<strike>rake</strike>], an (if: $axe is 0)[(link: "<a class='item'>axe</a>")[<strike>axe</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>axe</a>\")[(set: $selected to 'axe')]"))(set: $axe to 1)(set: $axeuses to 15)]](else:)[<strike>axe</strike>], and a bag of (if: $buildingTools is 0)[(link: "<a class='item'>building tools</a>")[<strike>building tools</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>building tools</a>\")[(set: $selected to 'building tools')]"))(set: $buildingTools to 1)(set: $buildingtoolsuses to 4)]](else:)[<strike>building tools</strike>].(set:$location to "shed")} [[Done->back yard]]<h3>Back yard</h3> {There's a (if: $bicycle is 0)[(link: "<a class='item'>bicycle</a>")[<strike>bicycle</strike>(set: $stuff to $stuff + (array: "(link: \"<a class='item'>bicycle</a>\")[(set: $selected to 'bicycle')]"))(set: $bicycle to 1)]](else:)[<strike>bicycle</strike>] and a [[shed->door]]. (set: $location to "back yard")} [[Go back inside->hall]] (if: $dead is 0 and $attack is 0)[{<div class="inventory"> (live: 300ms)[ (if: $stuff is (array: "") or $stuff.length == 0)[ (print: "Wielding: <h3>nothing</h3><hr>") You have:<br> nothing] (else:)[ (if: $selected is 0)[(print: "Wielding: <h3>nothing</h3><hr>")] (else:)[(print: "Wielding: <h3>"+$selected+"</h3><hr>")] You have: (print: $stuff.join("\n"))]] </div>}]{(if: $attack is 0)[(live: 1s)[ (if: $nextZombie >= 99)[(stop:)] (else:)[ (if: $nextZombie <= 0)[(set: $attack to 1)(goto: "Attack")] (else:)[(print: "<br><br><i>Zombie attack in ")(print: $nextZombie)(print: " seconds...</i>")] (set: $nextZombie -=1)]]] } Future Features: - Drop items: Count each "big" item they pick up, and pause when they have too many, and force them to put "some stuff" down. Only allow them the option of continuing once they've got few enough big items. But note, this could cause them to put down the items needed for the win condition. So it would be good if they could go back and get those things from somewhere, ideally the place where they "dropped" them. So "putting down" an item means adding a pick-up link to it in the current location. - What about sound increasing the zombie speed. Things like a doorbell you can ring, the dog barking, etc. - What if searching different things takes different amounts of time - Item combos? <div class="attack">(live: 500ms)[(if: $flashing is 0)[ATTACK!(set: $flashing to 1)](else:)[(set: $flashing to 0)]] {(if: $selected is 0)[You attempt to fight the zombie with your bare hands, which is a terrible idea. (link: "You die")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "sheets")[You throw the sheets at the zombie and manage to entangle it fairly well. As it wriggles its way out, you have (link: "a moment")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)] to choose your next weapon. (set: $dummy to $stuff.remove("(link: \"<a class='item'>sheets</a>\")[(set: $selected to 'sheets')]"))(set: $selected to 0)] (else-if: $selected is "pillow")[(if: $pillowuses > 2)[You whack the zombie in the head with a pillow like a little girl. This does nothing, except to momentarily shield you from certain death. You'd better draw a different weapon fast. ](else:)[You whack it with the pillow again but its fingers claw through the fabric and rip the pillow to shreds. (set: $dummy to $stuff.remove("(link: \"<a class='item'>pillow</a>\")[(set: $selected to 'pillow')]"))(set: $selected to 0)](set: $pillowuses to it-1)(link: "<br><br>Shit")[(if: $location is "street")[(set: $nextZombie to 1)](else:)[(set: $nextZombie to 2)](set: $attack to 0)(goto: $location)].] (else-if: $selected is "guitar")[You smash the guitar over the zombie's head. It doesn't die, but it sure looks stupid standing there with its head poking out of a busted guitar. As it ponders its new predicament, you have (link: "a moment")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)] to choose your next weapon. (set: $dummy to $stuff.remove("(link: \"<a class='item'>guitar</a>\")[(set: $selected to 'guitar')]"))(set: $selected to 0)] (else-if: $selected is "hairbrush")[You throw the hairbrush at the zombie and hope for the best. It hits him in the head and does basically nothing. (set: $dummy to $stuff.remove("(link: \"<a class='item'>hairbrush</a>\")[(set: $selected to 'hairbrush')]"))(set: $selected to 0)(link: "<br><br>Shit")[(if: $location is "street")[(set: $nextZombie to 1)](else:)[(set: $nextZombie to 2)](set: $attack to 0)(goto: $location)].] (else-if: $selected is "purse")[(if: $purseuses > 1)[You whack the zombie over the head with the purse(if: $purseuses is 2)[ again], but it doesn't seem to help. ](else:)[You swing the purse towards the zombie's head, but its arms get caught in the strap and yank it out of your hands. (set: $dummy to $stuff.remove("(link: \"<a class='item'>purse</a>\")](set: $selected to 'purse')]"))(set: $selected to 0)](set: $purseuses to it-1)(link: "<br><br>Shit")[(set: $nextZombie to 1)(set: $attack to 0)(goto: $location)]!] (else-if: $selected is "clothes")[You throw the clothes at the zombie, hoping to entangle it or distract it somehow, but they fall to the floor and do nothing. You're about to die. (set: $dummy to $stuff.remove("(link: \"<a class='item'>clothes</a>\")[(set: $selected to 'clothes')]"))(set: $selected to 0)(link: "<br><br>Uh-oh")[(set: $nextZombie to 1)(set: $attack to 0)(goto: $location)].] (else-if: $selected is "hangers")[(if: $hangeruses > 1)[You leap behind the zombie and attempt to cut its throat with a hanger. It might have worked, but your hands can't get a good grip. Your position buys you a few seconds, but you can't kill it. (set: $hangeruses to it-1)(link: "<br><br>Fine")[(if: $location is "street")[(set: $nextZombie to 1)](else:)[(set: $nextZombie to 2)](set: $attack to 0)(goto: $location)].](else:)[Your hands are too sweaty. You can't do anything with the hanger and the zombie (link: "kills you")[(set: $dead to 1)(goto: "Dead")].]] (else-if: $selected is "jar of coins")[You smash the jar of coins over the zombie's head. The jar breaks, the coins spill everywhere, and the zombie is dead. (set: $killcount to it+1)(set: $dummy to $stuff.remove("(link: \"<a class='item'>jar of coins</a>\")[(set: $selected to 'jar of coins')]"))(set: $selected to 0)(link: "<br><br>Sweet")[(if: $location is "street")[(set: $nextZombie to 5)](else:)[(set: $nextZombie to 15)](set: $attack to 0)(goto: $location)].] (else-if: $selected is "bar of soap")[You attempt to fight the zombie with a bar of soap. What exactly is your plan here? It doesn't matter, (link: "you're dead")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "shampoo bottle")[You throw the shampoo bottle at the zombie and it buys you about 1 second. (set: $dummy to $stuff.remove("(link: \"<a class='item'>shampoo bottle</a>\")[(set: $selected to 'shampoo bottle')]"))(set: $selected to 0)(link: "Enjoy it")[(set: $nextZombie to 1)(set: $attack to 0)(goto: $location)].] (else-if: $selected is "razor")[You get close enough to try to cut the zombie with the razor, which wasn't going to work anyway, and the zombie (link: "bites your face off")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "milk jug")[(if: $milkjuguses >2)[You whack the zombie on the head with the milk jug. It buys you a few seconds, but your milk jug is awkward to use. It really doesn't seem like a great weapon. (link: "<br><br>Fine")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 4)](set: $attack to 0)(goto: $location)].](else:)[Your weapon sucks and the zombie (link: "kills you")[(set: $dead to 1)(goto: "Dead")].](set: $milkjuguses to it-1)] (else-if: $selected is "vegetables")[You throw the vegetables at the zombie and die an embarrassing (link: "death")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "knife")[(if: $knifeuses > 2)[You stab the zombie in the temple and it dies. You pull the knife back out and keep going. ](else-if: $knifeuses is 2)[You stab the zombie in the temple and it dies. Your knife is covered in blood, and it's getting harder to hold it. ](else-if: $knifeuses is 1)[You stab the zombie in the temple with the knife, but you can't get enough of a grip to pull it back out. You let it go. (set: $dummy to $stuff.remove("(link: \"<a class='item'>knife</a>\")[(set: $selected to 'knife')]"))(set: $selected to 0)](set: $killcount to it+1)(set: $knifeuses to it-1)(if: $knifeuses >2)[(link: "<br><br>Yes")[(if: $location is "street")[(set: $nextZombie to 5)](else:)[(set: $nextZombie to 15)](set: $attack to 0)(goto: $location)]!](else:)[(link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 5)](else:)[(set: $nextZombie to 15)](set: $attack to 0)(goto: $location)].]] (else-if: $selected is "plates")[You throw a ceramic plate at the zombie, stunning it for a few seconds. (set: $platecount to it-1)(if: $platecount is 0)[(set: $dummy to $stuff.remove("(link: \"<a class='item'>plates</a>\")[(set: $selected to 'plates')]"))(set: $selected to 0)That was your last plate. ](else:)[You have $platecount plate(if:$platecount >1)[s] left. ](link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)].] (else-if: $selected is "bowls")[You throw a ceramic bowl at the zombie, stunning it for a few seconds. (set: $bowlcount to it-1)(if: $bowlcount is 0)[(set: $dummy to $stuff.remove("(link: \"<a class='item'>bowls</a>\")[(set: $selected to 'bowls')]"))(set: $selected to 0)That was your last bowl. ](else:)[You have $bowlcount bowl(if: $bowlcount >1)[s] left. ](link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)].] (else-if: $selected is "boxes of food")[You attempt to fight the zombie by throwing boxes of food at it. This is no help whatsoever. (link: "You die")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "canned goods")[You throw a can of food and hit the zombie square in the head. It stumbles backward, giving you a few seconds to breathe. (set: $cancount to it-1)(if: $cancount is 0)[(set: $dummy to $stuff.remove("(link: \"<a class='item'>canned goods</a>\")[(set: $selected to 'canned goods')]"))(set: $selected to 0)That was your last can. ](else:)[You now have $cancount can(if: $cancount >1)[s] left. ](link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)].] (else-if: $selected is "spoons")[You attempt to fight the zombie with a spoon. This plan was doomed to fail. (link: "You obviously die")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "forks")[You jam a fork into the zombie's eye. It's pissed off, but it doesn't die. Your fork is stuck, and (set: $forkscount to it-1)(if: $forkscount is 0)[(set: $dummy to $stuff.remove("(link: \"<a class='item'>forks</a>\")[(set: $selected to 'forks')]"))(set: $selected to 0)that was your last one. ](else:)[you only have $forkscount left. ](link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 5)](else:)[(set: $nextZombie to 7)](set: $attack to 0)(goto: $location)].] (else-if: $selected is "rocking chair")[You hold the rocking chair in front of you and wait until the zombie is somehwat entangled, then throw the chair forward as far as you can. It gives you a few feet of leeway. (set: $dummy to $stuff.remove("(link: \"<a class='item'>rocking chair</a>\")[(set: $selected to 'rocking chair')]"))(set: $selected to 0)(link: "<br><br>Now what")[(if: $location is "street")[(set: $nextZombie to 3)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)]?] (else-if: $selected is "mail")[You throw a bunch of mail at the zombie. What were you thinking? You're increadibly (link: "dead")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "key")[The key does nothing against the zombie. (link: "You die")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "rake")[(if: $rakeuses > 1)[You use the rake to hold the zombie back for a few seconds. (link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 3)](set: $attack to 0)(goto: $location)].](else:)[Fuck this. You stomp on the handle and break the rake in two, then use the sharp end to spear the zombie in the head. (set: $killcount to it+1)(link: "It dies")[(if: $location is "street")[(set: $nextZombie to 5)](else:)[(set: $nextZombie to 15)](set: $attack to 0)(goto: $location)]. You try to pull the spear out, but it's too lodged in there. (set: $dummy to $stuff.remove("(link: \"<a class='item'>rake</a>\")[(set: $selected to 'rake')]"))(set: $selected to 0)](set: $rakeuses to it-1)] (else-if: $selected is "axe")[(if: $axeuses > 3)[You hack into the zombie's head with the axe and it (link: "dies instantly")[(if: $location is "street")[(set: $nextZombie to 5)](else:)[(set: $nextZombie to 15)](set: $attack to 0)(goto: $location)](set: $killcount to it+1).](else-if: $axeuses is 3)[You take a chunk out of the zombie's shoulder. You're getting tired and sloppy. (link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 3)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)].](else-if: $axeuses is 2)[You hit the chest this time, and you struggle to pull the axe back out while the zombie is still clawing at you. (link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 1)](else:)[(set: $nextZombie to 2)](set: $attack to 0)(goto: $location)].](else:)[You swing and miss. Your arms are so tired you literally can't hold the axe for another second. It drops to the ground, and you become (link: "zombie meat")[(set: $dead to 1)(goto: "Dead")].]] (else-if: $selected is "building tools")[(if: $buildingtoolsuses > 1)[You try to bludgeon the zombie to death with the heavy bag of building tools. It's gonna take a few swings. (link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 2)](else:)[(set: $nextZombie to 3)](set: $attack to 0)(goto: $location)].](else:)[Finally the head's taken all the damage it can take. The zombie (link: "drops dead")[(if: $location is "street")[(set: $nextZombie to 5)](else:)[(set: $nextZombie to 15)](set: $buildingtoolsuses to 4)(set: $attack to 0)(goto: $location)].(set: $killcount to it+1)](set: $buildingtoolsuses to it-1)] (else-if: $selected is "bicycle")[You pick up the bicycle and try to use it as a shield of some sort, but it's too awkward to maneuver. While you're encumbered, the zombie has no trouble chomping down on your neck. (link: "You're dead")[(set: $dead to 1)(goto: "Dead")].] (else-if: $selected is "lumber")[You hit the zombie square in the head with a piece of wood and it stumbles backwards. (link: "<br><br>Ok")[(if: $location is "street")[(set: $nextZombie to 3)](else:)[(set: $nextZombie to 5)](set: $attack to 0)(goto: $location)].] } </div><h3>Dead</h3> Better luck next time. Refresh to play again.<h3>Convenience store</h3> {The convenience store is lined with shelves. There's plenty of food. (if: $stuff contains "(link: \"<a class='item'>axe</a>\")[(set: $selected to 'axe')]")[You can use your axe to chop away at the shelves and get some good pieces of (link: "<a class='item'>lumber</a>")[<strike>lumber</strike>(set: $stuff to $stuff+(array: "(link: \"<a class='item'>lumber</a>\")[(set: $selected to 'lumber')]"))].](else:)[If you had the right tool, you might be able to pull down the shelves and use them for lumber.] (live: 1s)[ (if: $stuff contains "(link: \"<a class='item'>lumber</a>\")[(set: $selected to 'lumber')]")[ (if: $stuff contains "(link: \"<a class='item'>building tools</a>\")[(set: $selected to 'building tools')]")[You can use the lumber to (link: "board up all the windows and doors")[(set: $nextZombie to 100)(goto: "win")] ](else:)[Now if only you had the right tools, you could board up the windows and doors and fortify the store!] ] ]} {(link: "Go back and look for stuff")[(set: $destination to "porch")(if: $stuff contains "(link: \"<a class='item'>bicycle</a>\")[(set: $selected to 'bicycle')]")[(set: $runtime to 10)](else:)[(set: $runtime to 0)](goto: "street")]}(set: $location to "convenience store")<h3>You win!</h3> Hey look at that! You're safe! At least, you probably won't die for a couple of days. The end.<h3>How to Play</h3> The world is crawling with zombies and you must do your best to survive! The box on the left is your Inventory. It tells you which item you're **currently wielding**, as well as all the other items you're carrying. You can carry as many items as you want, but you can only wield one item at a time. To wield an item, //click on it from the Inventory.// Read the story. The <text style="color: #AC3030"><b>red</b></text> links are locations you can visit and search. The <text style="color: #009900"><b>green</b></text> links are items you can pick up. But watch out for //zombies!// A timer at the bottom will show //how many seconds// until the next zombie attack! When it runs out, you'll have to fight the zombie with whatever you're **currently wielding**, so choose wisely!(set: $stuff to (array: ""))(set: $count to 0)(set: $nextZombie to 100) Ready? (link: "Begin")[(set: $nextZombie to 25)(goto: "hall")]. (if: false)[ [[hall]] ]<div class="kills">Kills: $killcount</div>