:: StoryTitle Prince the Cat :: StoryData { "ifid": "56795B7A-2A70-414E-9C87-51492FE66FE2", "format": "Harlowe", "format-version": "3.3.8", "start": "START", "tag-colors": { "Header": "red", "header": "red", "footer": "green", "startup": "blue", "biome-info": "purple", "battle": "yellow" }, "zoom": 0.6 } :: END {"position":"2500,1100","size":"100,100"} You have saved the princess. Your adventure ends here. This story makes use of many random elements. Try going back to a previous passage and choosing a different option, or restarting the story from the beginning, and your adventure might play out differently. Score breakdown:(set: $score to 0)
HP remaining: $hp(set: $scoreTemp to $hp*5) = $scoreTemp points.(set: $score to $score+$scoreTemp)
Gold found: $gold(set: $scoreTemp to $gold*2) = $scoreTemp points.(set: $score to $score+$scoreTemp)
Diamonds found: $diamond(set: $scoreTemp to $diamond*200) = $scoreTemp points.(set: $score to $score+$scoreTemp)
Enemies defeated: $enemiesDefeated(set: $scoreTemp to $enemiesDefeated*100) = $scoreTemp points.(set: $score to $score+$scoreTemp)
Bonus points: $specialChecks(set: $scoreTemp to $specialChecks*50) = $scoreTemp points.(set: $score to $score+$scoreTemp)
Final score: $score This game was made with Twine for an assignment in Finger Lakes Community College's Computer Sciences Portal class in 2024 by Christopher R. Perkins. Images used: - Sword Silver Blue by Clker-Free-Vector-Images from Pixabay - Shield Escutcheon Heraldic Shield by Clker-Free-Vector-Images from Pixabay - Forest, Trail, Sunbeams by Sven Lachmann from Pixabay - Namibia, Deadvlei, Desert by Ton W from Pixabay - Volcano, Eruption, Wash by Enrique from Pixabay - Tower, Nature, Medieval ai-generated by Alan Frijns from Pixabay :: START {"position":"700,1100","size":"100,100"} Your name is $name. You are part of the royal cat family in Catlandia. It is family tradition to rescue a princess for one to be crowned prince. Curious that your name is also Prince. Because you are now of age, your family has decided to send you off to a tower across the land which a princess is being captive in. You are allowed to get your bearings, but you can only carry one piece of equipment. What do you do? (link: "Ask a royal family member for advice.")[You ask a member of your family for some advice. "MEOW!"(set: $specialChecks to $specialChecks+1) (either: "You heed their advice, bravely clenching your fists.", "You shudder at that thought. You wonder if this will be worth it.", "While an interesting point, you feel they are wrong, but you don't want to start an argument with one of your family members.")] (link: "Ask a peasant for advice.")[You ask a member of the working class for some advice. "MEOW!"(set: $specialChecks to $specialChecks+1) (either: "Wow. You wonder where they learned such crude language.", "That's insane. You hope that you won't encounter that.", "You thank them for the advice. You better look out for that!")] [[Get your sword.->get sword]] [[Get your shield.->get shield]] :: battle choices [battle] {"position":"2225,800","size":"100,100"} (cond: $hp > 0, [(link: "Attack.")[(set: $randomnum1 to (max:(random:$atk-1,$atk+1),1))You attack for (print: $randomnum1) damage.($updateBattleHP:-$randomnum1) (display: "battle mid")]], [[[You feel tired.->game over]]]) :: battle mid [battle] {"position":"2350,800","size":"100,100"} (cond: $battleHP > 0, [(set: $randomnum1 to (max:(random:$battleAtkMin,$battleAtkMax)-$def,1))(print: $battleAttackText) You take (print: $randomnum1) damage.($updateHP:-$randomnum1) (display: "battle choices")], [(set: $randomnum1 to (random:$battleGoldMin,$battleGoldMax))(print: $battleEnd) You found (print: $randomnum1) gold.($updateGold:$randomnum1)(set: $enemiesDefeated to $enemiesDefeated+1) (link-goto: "Proceed forward.", "$mainBiomePassage")]) :: battle start [battle] {"position":"2100,800","size":"100,100"} You encounter the (print: $battleName). (print: $battleText)(change: ?dragon, (text-style:"double-underline", "shudder", "italic", "bold"))(change: ?dragon, (text-colour: red)) (display: "battle choices") :: desert {"position":"1500,1100","size":"100,100"} { (set: $mainBiomePassage to "desert") (set: $enteringBiome to $enteringBiome + 1) (set: $leavingBiomePassage to "desert options") (if:$enteringBiome is 1)[(set: $enteringBiomePassage to "enter desert")] (if:$enteringBiome is 5)[(set: $leavingBiomePassage to "leave desert")] }(display: $enteringBiomePassage)(set: $enteringBiomePassage to "generic outro1") (display: $leavingBiomePassage) :: desert options [biome-info] {"position":"1625,975","size":"100,100"} (cond: $enteringBiome is 1, [(link: "Proceed forward.")[(either: [(display: "desert1")], [(display: "desert2")], [(display: "desert3")])]], [(either: [(display: "desert1")], [(display: "desert2")], [(display: "desert3")])]) :: desert1 {"position":"1625,1100","size":"100,100"} You find a chest sitting next to a cactus. Curious that it is out in the open like this. |noignore>[(link: "Open it.")[(hide:?noopen)(either: [The chest is empty. What a rip off! [[Proceed forward.->desert]]], [(set: $randomnum1 to (random:2,10))You find (print: $randomnum1) gold. Pretty good.($updateGold:$randomnum1) [[Proceed forward.->desert]]], [(set: $randomnum1 to (random:1,5))There was a bomb inside! You try to jump away, but you get slightly singed, taking (print: $randomnum1) damage.($updateHP:-$randomnum1) (cond: $hp > 0, [[[Proceed forward.->desert]]], [[[You feel tired.->game over]]])])] ]|noopen>[(link: "Ignore it.")[(hide:?noignore)Seems the safest option would be to leave it alone. You pass it. [[Proceed forward.->desert]]]] :: desert2 {"position":"1750,1100","size":"100,100"} A cat mummy emerges from the sand. { (set: $battleName to "Cat Mummy") (set: $battleText to "It groans at you. Cutely.") (set: $battleHP to 7) (set: $battleAtkMin to 2) (set: $battleAtkMax to 5) (set: $battleAttackText to "The mummy lunges torward you.") (set: $battleEnd to "The cat mummy collapses.") (set: $battleGoldMin to 5) (set: $battleGoldMax to 10) } [[Uh oh.->battle start]] :: desert3 {"position":"1875,1100","size":"100,100"} You look around. There's absolutely nothing. The air is warm and dry, you feel somewhat uneasy. [[Proceed forward.->desert]] :: embark {"position":"900,1100","size":"100,100"} It's time to embark on your adventure. (link: "Say goodbye to your family.")[You say goodbye to your family. "MEOW!"(set: $specialChecks to $specialChecks+1) That was so beautiful. You thank them for their goodbye wishes. Hopefully you come back safe.] [[Leave.->exit intro]] :: enter desert [biome-info] {"position":"1500,975","size":"100,100"} You enter the arid desert.(set: $biomeCounter to $biomeCounter + 1) The air is dry, and there is nothing but cacti and dead shrubs around you. You sometimes hear a dry gust of wind. :: enter forest [biome-info] {"position":"1500,675","size":"100,100"} You enter the dense forest.(set: $biomeCounter to $biomeCounter + 1) The leaves of the trees block out a lot of the sunlight. You can still see, but everything is dimly lit. As you walk, you occasionally hear leaves shuffling in the distance. :: enter magma [biome-info] {"position":"1500,1275","size":"100,100"} You enter the magma lands.(set: $biomeCounter to $biomeCounter + 1) The air is hot, it hurts to breathe. You are looking at the terrain in front of you with dread. :: exit intro {"position":"1100,1100","size":"100,100"} You see three paths as you leave Catlandia, One path leads to a dense forest. Woodland creatures roam around these woods. The tip of the tower is just barely visible past the trees. Another leads to a desert. It looks barren. You think you see a couple cacti and tumbleweeds. The tower is fully visible in the distance from here. The last one leads to a rocky and bleak landscape with magma flows. You can see the tower, but it's going to be a rough hike through here.(set: $leavingBiomePassage to "exit intro options") (display: $leavingBiomePassage) :: exit intro options {"position":"1300,1100","size":"100,100"} What path should you take? [[The dense forest.->forest]] [[The arid desert.->desert]] [[The magma lands.->magma]] :: footer [footer] {"position":"950,800","size":"100,100"} { ($updateGold:0) ($updateHP:0) ($updateStats:0) ($updateItems:0)
HP: |hp>[] GOLD: |gold>[] |stats>[]
ITEMS: |items>[] } :: forest {"position":"1500,800","size":"100,100"} { (set: $mainBiomePassage to "forest") (set: $enteringBiome to $enteringBiome + 1) (set: $leavingBiomePassage to "forest options") (if:$enteringBiome is 1)[(set: $enteringBiomePassage to "enter forest")] (if:$enteringBiome is 4)[(set: $leavingBiomePassage to "leave forest")] }(display: $enteringBiomePassage)(set: $enteringBiomePassage to "generic outro1") (display: $leavingBiomePassage) :: forest options [biome-info] {"position":"1625,675","size":"100,100"} (cond: $enteringBiome is 1, [(link: "Proceed forward.")[(either: [(display: "forest1")], [(display: "forest2")], [(display: "forest3")])]], [(either: [(display: "forest1")], [(display: "forest2")], [(display: "forest3")])]) :: forest1 {"position":"1625,800","size":"100,100"} You find a chest sitting next to a tree. Curious that it is out in the open like this. |noignore>[(link: "Open it.")[(hide:?noopen)(either: [The chest is empty. What a rip off! [[Proceed forward.->forest]]], [(set: $randomnum1 to (random:5,20))You find (print: $randomnum1) gold. Nice!($updateGold:$randomnum1) [[Proceed forward.->forest]]], [Wow! You find an actual diamond! It looks exactly like all the pictures you've seen.(set: $diamond to $diamond+1)($updateItems:0) [[Proceed forward.->forest]]], [(set: $randomnum1 to (random:1,5))There was a bomb inside! You try to jump away, but you get slightly singed, taking (print: $randomnum1) damage.($updateHP:-$randomnum1) (cond: $hp > 0, [[[Proceed forward.->forest]]], [[[You feel tired.->game over]]])], [There was a slime hiding inside! { (set: $battleName to "Slime") (set: $battleText to "It slithers torwards you.") (set: $battleHP to 5) (set: $battleAtkMin to 2) (set: $battleAtkMax to 5) (set: $battleAttackText to "The slime jumps at you.") (set: $battleEnd to "The slime disintegrates.") (set: $battleGoldMin to 5) (set: $battleGoldMax to 10) } [[Uh oh.->battle start]]])] ]|noopen>[(link: "Ignore it.")[(hide:?noignore)Seems the safest option would be to leave it alone. You pass it. [[Proceed forward.->forest]]]] :: forest2 {"position":"1750,800","size":"100,100"} A slime jumps out from behind a tree. { (set: $battleName to "Slime") (set: $battleText to "It slithers torwards you.") (set: $battleHP to 5) (set: $battleAtkMin to 3) (set: $battleAtkMax to 6) (set: $battleAttackText to "The slime jumps at you.") (set: $battleEnd to "The slime disintegrates.") (set: $battleGoldMin to 10) (set: $battleGoldMax to 20) } [[Uh oh.->battle start]] :: forest3 {"position":"1875,800","size":"100,100"} Vines block your path. |option1>[(link: "Slice it with your sword.")[(hide:?option2)You effortlessly slice through them with your sword. Good thing you brought it with you.(set: $specialChecks to $specialChecks+1) [[Proceed forward.->forest]]] ]|option2>[(link: "Climb over them.")[(hide:?option1)(either: [(set: $randomnum1 to (random:1,5))You climb over the vines, but trip on your way down, taking (print: $randomnum1) damage.($updateHP:-$randomnum1)],[You climb over the vines.]) (cond: $hp > 0, [[[Proceed forward.->forest]]], [[[You feel tired.->game over]]])]](if:$sword is 0)[(hide:?option1)] :: game over [battle] {"position":"2225,675","size":"100,100"} You have blacked out. It seems your adventure ends here. Try going back to a previous passage and choosing a different option. :: generic outro1 [biome-info] {"position":"1375,675","size":"100,100"} You continue forward. :: get shield {"position":"900,1225","size":"100,100"} You pick up your shield. Your DEF has increased by 1.(set: $shield to 1)(set: $def to $def + 1)($updateItems:0)($updateStats:0) (display: "embark") :: get sword {"position":"900,975","size":"100,100"} You pick up your sword. Your ATK has increased by 1.(set: $sword to 1)(set: $atk to $atk + 1)($updateItems:0)($updateStats:0) (display: "embark") :: header [header] {"position":"825,800","size":"100,100"} { (enchant: ?passage's lines, via (t8n-delay:pos * 20) + (t8n:'fade')) ($updateGold:0) ($updateHP:0) ($updateItems:0) ($updateStats:0) } :: leave desert [biome-info] {"position":"1750,975","size":"100,100"} You start seeing some grass, and the sun doesn't burn anymore, it seems the desert ends here.(set: $enteringBiome to 0) (if: $biomeCounter is 2)[ An imposing structure is in view. It's the tower. You're just a few steps away from the front door. [[Enter the tower.->tower]]](else: )[The path appears to continue into the two biomes you saw earlier. The tower is much closer. Where should you go? [[The dense forest.->forest]] [[The magma lands.->magma]]] :: leave forest [biome-info] {"position":"1750,675","size":"100,100"} You enter a clearing, it seems the forest ends here.(set: $enteringBiome to 0) (if: $biomeCounter is 2)[ An imposing structure is in view. It's the tower. You're just a few steps away from the front door. [[Enter the tower.->tower]]](else: )[The path appears to continue into the two biomes you saw earlier. The tower is much closer. Where should you go? [[The arid desert.->desert]] [[The magma lands.->magma]]] :: leave magma [biome-info] {"position":"1750,1275","size":"100,100"} The air seems to be cooling down, and the terrain is smoothing out. This bleak landscape appears to end here.(set: $enteringBiome to 0) (if: $biomeCounter is 2)[ An imposing structure is in view. It's the tower. You're just a few steps away from the front door. [[Enter the tower.->tower]]](else: )[The path appears to continue into the two biomes you saw earlier. The tower is much closer. Where should you go? [[The dense forest.->forest]] [[The arid desert.->desert]]] :: magma {"position":"1500,1400","size":"100,100"} { (set: $mainBiomePassage to "magma") (set: $enteringBiome to $enteringBiome + 1) (set: $leavingBiomePassage to "magma options") (if:$enteringBiome is 1)[(set: $enteringBiomePassage to "enter magma")] (if:$enteringBiome is 3)[(set: $leavingBiomePassage to "leave magma")] }(display: $enteringBiomePassage)(set: $enteringBiomePassage to "generic outro1") (display: $leavingBiomePassage) :: magma options [biome-info] {"position":"1625,1275","size":"100,100"} (cond: $enteringBiome is 1, [(link: "Proceed forward.")[(either: [(display: "magma1")], [(display: "magma2")], [(display: "magma3")])]], [(either: [(display: "magma1")], [(display: "magma2")], [(display: "magma3")])]) :: magma1 {"position":"1625,1400","size":"100,100"} You find a chest sitting next to a rock. |noignore>[(link: "Open it.")[(hide:?noopen)(either: [(set: $randomnum1 to (random:20,50))You find (print: $randomnum1) gold. Awesome!($updateGold:$randomnum1) [[Proceed forward.->magma]]], [Wow! You find two diamonds! They look exactly like all the pictures you've seen.(set: $diamond to $diamond+2)($updateItems:0) [[Proceed forward.->magma]]], [(set: $randomnum1 to (random:1,5))There was a bomb inside! You try to jump away, but you get slightly singed, taking (print: $randomnum1) damage.($updateHP:-$randomnum1) (cond: $hp > 0, [[[Proceed forward.->magma]]], [[[You feel tired.->game over]]])])] ]|noopen>[(link: "Ignore it.")[(hide:?noignore)Seems the safest option would be to leave it alone. You pass it. [[Proceed forward.->magma]]]] :: magma2 {"position":"1750,1400","size":"100,100"} A huge rock monster appears from behind a boulder! { (set: $battleName to "Rock Monster") (set: $battleText to "It roars at you.") (set: $battleHP to 15) (set: $battleAtkMin to 3) (set: $battleAtkMax to 7) (set: $battleAttackText to "The monster smashes you.") (set: $battleEnd to "The monster crumbles into dust.") (set: $battleGoldMin to 20) (set: $battleGoldMax to 100) } [[Oh no.->battle start]] :: magma3 {"position":"1875,1400","size":"100,100"} Rocks are falling from above you! |option1>[(link: "Block them with your shield.")[(hide:?option2)You deflect the rocks with your shield. Good thing you brought it with you.(set: $specialChecks to $specialChecks+1) [[Proceed forward.->magma]]] ]|option2>[(link: "Dodge them.")[(hide:?option1)(either: [(set: $randomnum1 to (random:1,5))You dodge most of the rocks, but one hits you, taking (print: $randomnum1) damage.($updateHP:-$randomnum1)],[You dodge all the rocks.]) (cond: $hp > 0, [[[Proceed forward.->magma]]], [[[You feel tired.->game over]]])]](if:$shield is 0)[(hide:?option1)] :: startup [startup] {"position":"700,800","size":"100,100"} { (set: $gold to 0) (set: $hp to 100) (set: $atk to 2) (set: $def to 2) (set: $items to "Nothing") (set: $battleName to "Debug Cube") (set: $battleText to "It debugs at you.") (set: $battleHP to 10) (set: $battleAtkMin to 5) (set: $battleAtkMax to 5) (set: $battleAttackText to "The cube AGGRESIVELY debugs at you.") (set: $battleEnd to "Looks like the bug got fixed.") (set: $battleGoldMin to 10) (set: $battleGoldMax to 30) (set: $leavingBiomePassage to "exit intro options") (set: $mainBiomePassage to "exit intro") (set: $enemiesDefeated to 0) (set: $specialChecks to 0) (set: $updateGold to (macro: num-type _a, [ (set: $gold to (max:$gold + _a, 0)) (replace: ?gold,)[(print: $gold)] (output:)[] ])) (set: $updateHP to (macro: num-type _a, [ (set: $hp to (max:$hp + _a, 0)) (replace: ?hp,)[(print: $hp)] (output:)[] ])) (set: $updateBattleHP to (macro: num-type _a, [ (set: $battleHP to (max:$battleHP + _a, 0)) (output:)[] ])) (set: $updateItems to (macro: num-type _a, [ (set: $items to (cond: $sword > 0, "Sword", $shield > 0, "Shield", "Nothing")) (set: $items to $items + (cond: $diamond > 0, ", Diamond x(print: $diamond)", "")) (replace: ?items,)[$items] (output:)[] ])) (set: $updateStats to (macro: num-type _a, [ (set: $stats to "ATK: " + (str: $atk) + " DEF: " + (str: $def)) (replace: ?stats,)[$stats] (output:)[] ])) (set: $name to (prompt: [You are a cat. What is your name?], "Prince", "Use default", "Confirm")) } :: tower {"position":"2100,1100","size":"100,100"} You enter the tower.(set: $mainBiomePassage to "tower end") You finally made it. The interior of the tower is very run-down, you see ripped carpets and bricks missing from the walls. At the end of the hall is a spiral staircase. The princess is at the top of the tower. (link: "Go up the stairs.")[You take the first step and- |dragon>[RRROOOAAARRR!!!](change: ?dragon, (text-style:"double-underline", "shudder", "italic", "bold"))(change: ?dragon, (text-colour: red)) (link: "What was that!?")[You look back and... (link: "It's a dragon.")[ { (set: $battleName to "Dragon") (set: $battleText to " |dragon>[RRROOOAAARRR!!!]") (set: $battleHP to 25) (set: $battleAtkMin to 3) (set: $battleAtkMax to 7) (set: $battleAttackText to "The dragon shoots a fireball at you.") (set: $battleEnd to "You defeated the dragon.") (set: $battleGoldMin to 100) (set: $battleGoldMax to 500) } [[Oh no.->battle start]]]]] :: tower end {"position":"2300,1100","size":"100,100"} It was close, but you survived your encounter with the dragon. There's tales of cats having nine lives, but you're glad you didn't have to put that to the test. (link: "Go up the stairs.")[You take the first step and- (link: "Just keep walking up the stairs.")[Nothing happens. It seems there's nothing else to worry about. You make it to the top of the stairs and theres a wooden door. (link: "Open the door.")[You see the princess. They're peacefully sleeping in bed. You're surprised that battle with the dragon didn't wake them. (link: "Wake them up.")[(set: $namePrincess to (prompt: [The princess is a cat. What is their name?], "Princess", "Use default", "Confirm"))"Meow!" "Just kidding! My name is $namePrincess. Thank you for rescuing me! What's your name?" (link: "My name is $name!")["Thank you, $name. I declare you prince!" [[I won!->END]]]]]]]