Welcome adventurer! You have come to the mysterious land of Orthrys in search of the famed Sword of Darkness.
(set: $health to 100) (set: $fightnumber to 0) (set: $monsters to (a: "clear", "clear", "goblin", "goblin", "troll", "troll", "troll", "dragon"))(set: $currentmonsterhp to 0)(set: $key to 0)
You have 50 gold pieces and a silver dagger.
(set: $goldpieces to 50)(set: $weapon to 1)
You find yourself in the center of a town square. There is a road to the North, one to the South, and one to the East. There are also doors into a stone building, a brick building, and a wooden building.
(set: $step to 0)
[[Go North->Northern Town Road]]
[[Go South->Southern Town Road]]
[[Enter the stone building->smithy1]]
[[Enter the brick building->tavern1]]
[[Enter the wooden building->secretbuilding1]](if: $step > 0) [You find yourself in a dense forest. You don't see anything. You can only go straight.
[[Go North->Forest1]]
[[Go South->Town square]]
] (else:) [
You can't go that way.
[[Go Back->Town square]] ](if: $step < 2) [The path ends in a solid brick wall with a locked iron door. There is no way past it.]
(if: $step > 1) [ (if: $key is 0)[ The door in the wall opens. Behind it is a box, which holds a map. Reading the map, you see that it leads to to wooden building. (set: $step to 3)]]
[[Go North->Town square]]"Welcome to the smithy!" a man calls out as you enter. "Would you like to buy anything? We have lots of weapons.(if: $step is 2) [You can also sell that gold key there for 20 gold.]"
(if: $step is 2) [ (if: $key is 0)[ [[sell key]]]]
(if: $goldpieces > 14 ) [(if: $weapon < 7)[ [[Upgrade your weapon for 15 gold->Upgrade your weapon]] ] ] (else:) [ You don't have enough money to upgrade your weapon.]
[[exit->Town square]]"Welcome to the tavern! Would you like to buy any food or a drink?" A woman calls out to you.
[[Buy food]]
[[Buy a drink]]
[[Talk with the barmaid]]
[[exit->Town square]] You find yourself in an old building.(if: $step > 2) [ There is a staircase in the corner. [[Go Up The Stairs]] ]
[[Exit->Town square]]You find yourself in the center of a town square. There is a road to the North, and one to the South. There are also doors into a stone building, a brick building, and a wooden building.
[[Go North->Northern Town Road]]
[[Go South->Southern Town Road]]
[[Enter the stone building->smithy1]]
[[Enter the brick building->tavern1]]
[[Enter the wooden building->secretbuilding1]]"That'll be 3 gold pieces. A drink will heal 10 health. By the way, you have $goldpieces gold pieces and $health / 100 health points."
(if: $goldpieces > 2) [ [[Pay for a drink]] ] (else:) [ You don't have enough money to buy this.]
[[Go Back->tavern1]] "That'll be 5 gold pieces. A drink will heal 15 health. By the way, you have $goldpieces gold pieces and $health / 100 health points."
(if: $goldpieces > 4) [ [[Pay for some food]] ] (else:) [ You don't have enough money to buy this.]
[[Go Back->tavern1]] "You new around here?" she asks. "I don't reckon seeing you around before. Shame you came now. The town's not the best right now. The mosters out in the forest keep on attacking our people, so we can't leave the town, and most people have either starved or been killed. The head monster is up North, somewhere in the forest. If you kill him, the others will all leave us alone."
(set: $step to 1)
[[go back->tavern1]]You pay 3 gold pieces for a drink.
(set: $goldpieces to it-3)
(set: $health to it+10)
(if: $health > 100)[(set: $health to 100)]
You now have $goldpieces gold pieces and $health / 100 health.
[[exit->Town square]]
[[stay->tavern1]]You pay 5 gold pieces for a piece of food.
(set: $goldpieces to it-5)
(set: $health to it+15)
(if: $health > 100)[(set: $health to 100)]
You now have $goldpieces gold pieces and $health / 100 health.
[[exit->Town square]]
[[stay->tavern1]]You are an adventurer who has set out to the land of Orthrys to find the legendary Sword of Darkness. Can you find the monsters, kill the guardians, and not get speared through the big toe and find the sword?You find yourself in a clearing. (if: $fightnumber < 4)[(set: $currentmonster to (shuffled:...$monsters)[0]) (if: $currentmonster is "clear")[
[[continue North->Forest1]]](else:)[There is a $currentmonster waiting for you. Do you fight it? (if: $currentmonster is "goblin") [(set: $currentmonsterhp to 10)] (if: $currentmonster is "troll") [(set: $currentmonsterhp to 20)] (if: $currentmonster is "dragon") [(set: $currentmonsterhp to 30)]
[[yes->fight monster]]]] (else:) [You have found the boss! He would like to kill you. Do you want to kill him too?
[[Yes->Boss Fight]]]
[[turn back->Northern Town Road]]You find yourself in a dusty attic. In the corner is a black sword. It is the Sword of Darkness! (set: $step to 4)
YOU WIN!!!You now have a (if: $weapon is 1)[rapier](if: $weapon is 2)[longsword](if: $weapon is 3)[broadsword](if: $weapon is 4)[javelin](if: $weapon is 5)[hammer](if: $weapon is 6)[battle axe].(set: $weapon to it + 1) You have (set: $goldpieces to it-15) $goldpieces gold left.
[[go back->smithy1]]
(if: $goldpieces > 14) [ [[upgrade again->Upgrade your weapon]] ]You are holding your (if: $weapon is 1)[dagger](if: $weapon is 2)[rapier](if: $weapon is 3)[longsword](if: $weapon is 4)[broadsword](if: $weapon is 5)[javelin](if: $weapon is 6)[hammer](if: $weapon is 7)[battle axe]. You attack the $currentmonster with it. (set: $currentmonsterhp to it - $weapon*5) (if: $currentmonsterhp < 1) [The monster is dead! (set: $goldpieces to it + 5) You now have $goldpieces gold. (set: $fightnumber to it + 1)
[[go North->Forest1]]
[[go South->Northern Town Road]]]
(else:)[The monster has $currentmonsterhp health left. The monster now attacks you. You have (set: $health to it - $currentmonsterhp/2) $health health left.
[[attack again->fight monster]]
[[run South->Northern Town Road]]] You are holding your (if: $weapon is 1)[dagger](if: $weapon is 2)[rapier](if: $weapon is 3)[longsword](if: $weapon is 4)[broadsword](if: $weapon is 5)[javelin](if: $weapon is 6)[hammer](if: $weapon is 7)[battle axe]. You attack the Head Monster with it. (set: $bosshp to 60)(set: $bosshp to it - $weapon*5) (if: $bosshp < 1) [The boss is dead! (set: $goldpieces to it + 20) You now have $goldpieces gold. You also recieved a gold key. (set: $step to 2)
[[go North->Forest1]]
[[go South->Northern Town Road]]]
(else:)[The boss has $bosshp health left. The boss now attacks you. You have (set: $health to it - $bosshp/2) $health health left.
[[attack again->Boss Fight]]
[[run South->Northern Town Road]]] You sell the key for 20 gold. (set: $goldpieces to it + 20)You now have $goldpieces gold. (set: $key to 1)
[[go back->smithy1]]