(set: $name to "Ellery")
(set: $surname to "Maverick")
(set: $cauldronpos to "on fire")
(set: $cauldronfull to false)
(set: $explosion to false)
(set: $timebrewed to 0)
(set: $temp to 0)
(set: $color to "")
(set: $steam to "")
(set: $partone to "")
(set: $parttwo to "")
(set: $heatcorrect to false)
(set: $stircorrect to false)
(set: $heatedbefore to false)
(set: $stirredc to 0)
(set: $stirredac to 0)
(set: $fangscorrect to false)
(redirect: "Visible Variables")
This passage sets all the defaults for variables (so there are no errors later) and then immediately sends you to the first setup page that the player sees.First Name: [Pick a Name]<nameselect|(click-replace: ?nameselect)[(set: $name to (prompt: "Choose a Name.", "Ellery"))$name]
Last Name: [Pick a Name]<nameselect2|(click-replace: ?nameselect2)[(set: $surname to (prompt: "Choose a Name.", "Maverick"))$surname]
Preferred Honorific: (cycling-link: bind $honorific, "Ms.", "Miss", "Mr.", "Mx.")
House: (cycling-link: bind $house, "Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin")
[[Next|Intro]]You make your way down to the dungeons, chatting with your friends. You're a first year $house student, and it's one of your first few potions classes with Professor Snape. He's a little intimidating(if: $house is "Slytherin")[, but he's your Head of House].
"Hey, $name!" your friend calls, rushing down the stairs to catch up to you. "We get to make our first potion today! Hopefully it goes well... I've heard a lot of horror stories.(unless: $house is "Slytherin")[ Professor Snape's pretty strict, isn't he?]"
You nod as everyone enters the classroom. Professor Snape stands at the front of the class and looks at everyone.
"Today, you will be brewing a simple cure for boils. I trust that you will be able to follow simple directions competently; I will not be curing any students who get doused in their own potions."
Instructions are written on the board with a flick of his wand.
"You may use ingredients from the storecloset; do not waste them or you will be paying for it. Your instructions are on the board; you may begin."
[[Get to it, dang it!|Cure For Boils Main]](set: $heattimer to 0)
(set: $waittimer to 0)
\Your ingredients:
[Snake Fangs]<fangoptions|(click: ?fangoptions)[
[[Crush Fangs]]
[[Cut Fangs]]
[[Add Fangs to Cauldron]]
]
[Horned Slugs]<slugoptions|(click: ?slugoptions)[
[[Crush Slugs]]
[[Cut Slugs]]
[[Add Slugs to Cauldron]]
]
[Porcupine Quills]<quilloptions|(click: ?quilloptions)[
[[Crush Quills]]
[[Cut Quills]]
[[Add Quills to Cauldron]]
]
[[Set Heat]]
[[Stir]]
(if: $cauldronpos is "on fire")[Your cauldron is on the fire right now.](else:)[Your cauldron is off the fire right now.]
[[Move cauldron]]
[[Sit back and let it brew.]]
(if: $explosion is true)[
\ Your cauldron is pitifully empty, with only a few remnants left. Also, you're covered in boils.
\](else:)[
\ (if: $cauldronfull is true)[
\ Your potion is $color. $steam
\ ](else:)[
\ All that's in your cauldron right now is the potion base.
\ ]
\]
[[Wave Wand]]
[[Finish Potion]](css: "line-height:90%")[(css: "font-size:small")[(unless: (passage:)'s tags contains "noheader")[The instructions are laid out on the board in the front:
=|=
Part 1
* Add 6 snake fangs to the mortar.
* Crush into a fine powder using the pestle.
* Add 4 measures of the crushed fangs to your cauldron.
* Heat the mixture to 250 for 10 seconds.
* Wave your wand.
* Leave to brew and return in 33-45 minutes.
=|=
Part 2
* Add 4 horned slugs to your cauldron.
* Take the cauldron off the fire before adding the next ingredient.
* Add 2 porcupine quills to your cauldron.
* Stir 5 times, clockwise.
* Wave your wand to complete the potion.
|==|
]]](if: $explosion is true)[<!-- prioritize the fail condition as it locks you out of everything else -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (if: $cutfangs >= 1)[<!-- if you already started cutting thme -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already started cutting your snake fangs. No point in crushing them too.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](elseif: $crushedfangs >= 4)[<!-- if you've come back to this passage after crushing your fangs into nothingness -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already ground your snake fangs into nothingness.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](else:)[<!-- if you haven't ground them to dust or cut them yet -->
\ (link-rerun: "Crush Snake Fangs")[
\ (set: $crushedfangs to it + 1)
\ (replace: ?phrase)[
\ (if: $crushedfangs is 1)[
\ You've crushed your snake fangs into large pieces.
\ ](elseif: $crushedfangs is 2)[
\ You've crushed your snake fangs into a coarse powder.
\ ](elseif: $crushedfangs is 3)[
\ You've crushed your snake fangs into a fine powder.
\ ](elseif: $crushedfangs >= 4)[
\ Professor Snape scowls at you.
You've crushed your snake fangs into oblivion.
\ ]
\ ]
\ ]
\ ]
[]<phrase|
[[I'm done.|Cure For Boils Main]]
\](if: $explosion is true)[
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[<!-- if you haven't caused an explosion, do stuff! -->
\ (if: $cauldronpos is "on fire")[<!-- if it's on the fire, you move it off and vice versa. -->
\ (set: $cauldronpos to "off fire")
\ You moved your cauldron off the fire.
[[OK.|Cure For Boils Main]]
\ ](else:)[
\ (set: $cauldronpos to "on fire")
\ You moved your cauldron onto the fire.
[[OK.|Cure For Boils Main]]
\ ]
\](if: $explosion is true)[<!-- prioritize the fail condition as it locks you out of everything else -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (if: $crushedfangs >= 1)[<!-- if you already started crushing thme -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already started crushing your fangs. No point in cutting them too.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](elseif: $cutfangs >= 4)[<!-- if you've come back to this passage after cutting your fangs into nothingness -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already cut your fangs into oblivion.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](else:)[<!-- destroyed or started crushing them -->
\ (link-rerun: "Cut Snake Fangs")[
\ (set: $cutfangs to it + 1)
\ (replace: ?phrase)[
\ (if: $cutfangs is 1)[
\ Professor Snape scowls at you.
You've cut your snake fangs into large pieces.
\ ](elseif: $cutfangs is 2)[
\ Professor Snape scowls at you.
You've cut your snake fangs into small pieces.
\ ](elseif: $cutfangs is 3)[
\ "$honorific $surname, just what do you think you're doing?"
You've finely minced your snake fangs.
\ ](elseif: $cutfangs >= 4)[
\ "Are you truly this incompetent, $honorific $surname?"
You've cut your snake fangs into oblivion.
\ ]
\ ]
\ ]
\ ]
[]<phrase|
[[I'm done.|Cure For Boils Main]]
\](set: _currentadded to 0)<!-- this is a temporary/local variable that counts how many fangs you've added in this instance of visiting the "add fangs" passage, in case you come here more than once. -->
\(if: $explosion is true)[<!-- priority given to whether your cauldron has already exploded or not (fail condition)-->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
](else:)[<!-- otherwise continue adding stuff -->
\ (if: $timebrewed is 0 and $totaltimeheated is 0)[<!-- this checks if you've put things in in the right order, i.e. the first thing you do before brewing or letting it heat -->
\ (set: $fangsaddedtime to "correct")
\ ](else:)[
\ (set: $fangsaddedtime to "incorrect")
\ ]
\
\ (if: $crushedfangs > 0)[<!-- if you've crushed your fangs (which is correct) -->
\ (link-repeat: "Add a measure of crushed snake fangs.")[
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (set: $fangsadded to it + 1)
\ (set: _currentadded to it + 1)
\ (if: $fangsadded is not 4)[
\ (set: $color to (either: "blue", "red", "green"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits thick clouds of blue steam.")
\ ]
\ ](else:)[
\ (set: $color to "a light teal")
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits thin wisps of red smoke.")
\ ]
\ (set: $fangscorrect to true) <!-- consolidating stuff so the if statement later isn't as horrendous -->
\ ]
\ (replace: ?dialogue)[
\ (if: $fangsadded > 4)[<!-- if you add too many fangs, Snape will also be unhappy. -->
\ Professor Snape watches you suspiciously.
]
\ You've added _currentadded measure(if: $fangsadded > 1)[s] of crushed snake fangs to your cauldron.
\ ]
\ ]
\ ](elseif: $cutfangs > 0)[<!-- if you've cut your fangs (incorrect) it produces new dialogue. -->
\ (link-repeat: "Add a measure of cut snake fangs.")[
\ (set: $fangsadded to it + 1)
\ (set: _currentadded to it + 1)
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (set: $color to (either: "purple", "red", "puce"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits a strange orange smoke.")
\ ]
\ (replace: ?dialogue)[
\ Professor Snape frowns at you.
You've added _currentadded measure(if: $fangsadded > 1)[s] of cut snake fangs to your cauldron.
\ ]
\ ]
\ ](else:)[<!-- if you haven't cut or crushed your fangs (incorrect) it changes the dialogue. This is also a catch-all for other weird circumstances -->
\ (link-repeat: "Add a snake fang.")[
\ (set: $fangsadded to it + 1)
\ (set: _currentadded to it + 1)
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (set: $color to (either: "blue", "red", "green"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits a gross green smoke.")
\ ]
\ (replace: ?dialogue)[
\ Professor Snape frowns at you.
You've added _currentadded whole snake fang(if: $fangsadded > 1)[s] to your cauldron.
\ ]
\ ]
\ ]
[]<dialogue|
[[That's enough.|Cure For Boils Main]]](if: $explosion is true)[<!-- if your cauldron exploded you DEFINITELY failed. -->
\ You don't have anything to turn in, really. Professor Snape banished everything. You leave class that day, knowing you definitely failed.
When you come back, you've recieved a (if: $house is "Slytherin")[P](else:)[T] on your assignment. <!-- score adjustment b/c BIAS -->
[[The End!]]
\](else:)[
\ (if: $cauldronfull is true)[
\ Your potion is $color. $steam
\ (if: $partone is "correct" and $parttwo is "correct")[
Looks good! You ladle some into a vial, mark it with your name, and leave it on Professor Snape's desk. You clean up and are dismissed from class.
When you come back two days later, your potion has been graded: you got an (if: $house is "Slytherin")[O](elseif: $house is "Gryffindor")[A](else:)[(either: "O", "E", "A")]!
[[The End!]]
\ ](elseif: ($partone is "correct" and $parttwo is "incorrect") or ($partone is "incorrect" and $parttwo is "incorrect"))[<!-- have to do it this clunky way because there's no XOR -->
Something went wrong... It doesn't look quite right, but it didn't //explode//, so hopefully it's alright... You ladle some into a vial, mark it with your name, and leave it on Professor Snape's desk. You clean up and are dismissed from class.
When you come back two days later, your potion has been graded: you got an (if: $house is "Slytherin")[A](elseif: $house is "Gryffindor")[D](else:)[(either: "P", "D")].
[[The End!]]
\ ](else:)[
Something went wrong... It definitely doesn't look right, but it didn't //explode//, so hopefully it's not too terrible... You ladle some into a vial, mark it with your name, and leave it on Professor Snape's desk. You clean up and are dismissed from class.
When you come back two days later, your potion has been graded: you got an (if: $house is "Slytherin")[P](elseif: $house is "Gryffindor")[T](else:)[(either: "P", "D", "T")].
[[The End!]]
\ ]
\ ](else:)[
\ There's nothing in your cauldron to turn in!
[[Back|Cure For Boils Main]]
\ ]
\](if: $explosion is true)[<!-- blah blah blah fail condition -->
There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[<!-- otherwise do stuff -->
\ (if: $wavedwand is 0)[<!-- if this is the first time you've done this it checks to make sure you did the part one stuff correctly -->
\ (if: $fangscorrect is true and $slugsadded is 0 and $quillsadded is 0 and $heatcorrect is true)[ <!-- in order to have the first part correct, you should have added 4 measures of finely crushed snake fangs and nothing else, and then heated it to 250 for 10 seconds and nothing else. -->
\ (set: $partone to "correct") <!-- notes that part one was done correctly -->
\ (set: $wavedwand to it + 1) <!-- notes that you did this step -->
\ (set: $color to "a delicate shade of blue") <!-- these two set the correct flavor text so the player knows they're on the right track. -->
\ (set: $steam to "It emits thin wisps of red steam.")
\ You wave your wand and the potion turns a delicate shade of blue.
[[OK.|Cure For Boils Main]]
\ ](else:)[
\ (set: $wavedwand to it + 1) <!-- notes that you waved your wand so next time it will evaluate for part 2 -->
\ (set: $partone to "incorrect") <!-- notes that you did it wrong -->
\ (set: $color to "a kind of pale pink")<!-- flavor text -->
\ You wave your wand and the potion turns a kind of pale pink.
[[OK.|Cure For Boils Main]]
\ ]
\ ](elseif: $wavedwand is 1)[ <!-- if you've done the part one check, evaluate part 2 -->
\ (if: $slugsadded is 4 and $cutslugs is 0 and $crushedslugs is 0 and $slugsaddedtime is "correct" and $quillsaddedtime is "correct" and $quillsadded is 2 and $cutquills is 0 and $crushedquills is 0 and $stircorrect is true)[<!-- this one has to check for a lot: that you put 4 whole slugs in at the right time and that you put in two whole quills at the right time AND stirred the potion the correct number of times and at the right time. didn't do a "quills/slugscorrect variable like the fangs cause you can't un-cut or un-crush them-->
\ (set: $parttwo to "correct")
\ (set: $wavedwand to it + 1)
\ (set: $color to "a perfect cobalt blue")
\ (set: $steam to "It emits a nice pink smoke.")
\ You wave your wand and it turns a perfect cobalt blue.
[[OK.|Cure For Boils Main]]
\ ](else:)[<!-- if you did any part of that wrong -->
\ (set: $parttwo to "incorrect")
\ (set: $wavedwand to it + 1)
\ (set: $color to "a kind of orangey color")
\ You wave your wand and it turns a kind of orangey color.
[[OK.|Cure For Boils Main]]
\ ]
\ ](else:)[<!-- if you've waved your wand more than the twice specified, it's also a failure -->
\ (set: $wavedwand to it + 1)
\ (set: $color to "a dingy blue-gray")
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits a pale lavender smoke.")
\ ]
\ You wave your wand and it turns a dingy blue-gray. $steam
[[OK.|Cure For Boils Main]]
\ ]
\]
(if: $explosion is true)[<!-- prioritize the fail condition as it locks you out of everything else -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (if: $cutslugs >= 1)[<!-- if you already started cutting thme -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already started cutting your horned slugs. No point in crushing them too.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](elseif: $crushedslugs >= 4)[<!-- if you've come back to this passage after crushing your slugs into nothingness -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already liquefied your slugs.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](else:)[<!-- if you haven't ground them to dust or cut them yet -->
\ (link-rerun: "Crush Horned Slugs")[
\ (set: $crushedslugs to it + 1)
\ (replace: ?phrase)[
\ (if: $crushedslugs is 1)[
\ Professor Snape gives you a funny look.
You've crushed your horned slugs into a chunky goop.
\ ](elseif: $crushedslugs is 2)[
\ "$honorific $surname, just what do you think you're doing?"
You've crushed your horned slugs into a thick paste.
\ ](elseif: $crushedslugs is 3)[
\ "$honorific $surname, why are you wasting my ingredients?"
You've crushed your horned slugs into a thin paste.
\ ](elseif: $crushedslugs >= 4)[
\ Professor Snape looks like he wants to snatch away your ingredients and fail you for the day.
You've crushed your horned slugs into nothing but liquid.
\ ]
\ ]
\ ]
\ ]
[]<phrase|
[[I'm done.|Cure For Boils Main]]
\](if: $explosion is true)[<!-- prioritize the fail condition as it locks you out of everything else -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (if: $crushedslugs >= 1)[<!-- if you already started crushing thme -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already started crushing your slugs. No point in cutting them too.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](elseif: $cutslugs >= 4)[<!-- if you've come back to this passage after cutting your slugs into nothingness -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already cut your slugs into a pile of mush.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](else:)[<!-- destroyed or started crushing them -->
\ (link-rerun: "Cut Horned Slugs")[
\ (set: $cutslugs to it + 1)
\ (replace: ?phrase)[
\ (if: $cutslugs is 1)[
\ Professor Snape scowls at you.
You've cut your horned slugs into large pieces.
\ ](elseif: $cutslugs is 2)[
\ Professor Snape scowls at you.
You've cut your horned slugs into small pieces.
\ ](elseif: $cutslugs is 3)[
\ "Are you really this stupid, $honorific $surname?"
You've finely minced your horned slugs.
\ ](elseif: $cutslugs >= 4)[
\ "What in Merlin's name are you doing, $honorific $surname?"
Your horned slugs are nothing but mush.
\ ]
\ ]
\ ]
\ ]
[]<phrase|
[[I'm done.|Cure For Boils Main]]
\](if: $explosion is true)[<!-- priority given to whether your potion has exploded, because if so you've already lost. -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[ <!-- if your potion hasn't exploded yet, you can add slugs. -->
\ (if: $timebrewed >= 33 and $timebrewed <= 45 and $slugsadded is 0)[<!-- has to be after you've brewed and you can't have already added slugs to trick it -->
\ (set: $slugsaddedtime to "correct")
\ ](else:)[
\ (set: $slugsaddedtime to "incorrect")
\ ] <!-- this first set of if-else statements just checks that you put these in at the correct time. -->
\ (set: $cauldronfull to true) <!-- this notes that something got put into the cauldron -->
\
\ (if: $cutslugs > 0)[<!-- if you've cut your slugs, it changes the dialogue and your potion's colors. -->
\ (link-repeat: "Add a measure of cut horned slugs.")[
\ (set: $slugsadded to it + 1)<!-- it still notes that you added slugs, though. -->
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (set: $color to (either: "orange", "red", "yellow"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits bright yellow steam.")
\ ]
\ (replace: ?dialogue)[
\ Professor Snape frowns at you.
You've added $slugsadded measure(if: $slugsadded > 1)[s] of cut horned slugs to your cauldron.
\ ]
\ ]
\ ](elseif: $crushedslugs > 0)[<!-- if you've crushed your slugs. Similar to the above. -->
\ (link-repeat: "Add a measure of crushed horned slugs.")[
\ (set: $slugsadded to it + 1)
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (set: $color to (either: "mauve", "violet", "scarlet"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits strange purple curls of steam.")
\ ]
\ (replace: ?dialogue)[
\ Professor Snape frowns at you.
You've added $slugsadded measure(if: $slugsadded > 1)[s] of crushed horned slugs to your cauldron.
\ ]
\ ]
\ ](else:)[<!-- if your slugs are whole -->
\ (link-repeat: "Add a horned slug.")[<!-- link-repeat means you can click on this many times. -->
\ (set: $slugsadded to it + 1) <!-- each time you click it, it counts that you added a slug. -->
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (if: $slugsadded is 4)[<!-- if you've added exactly four slugs, your potion will be the right color. -->
\ (set: $color to "cobalt blue")
\ (if: $totaltimeheated > 0)[<!-- and if you've heated it like you're supposed to, it will emit smoke. -->
\ (set: $steam to "It emits salmon colored smoke.")
\ ]
\ ](else:)[<!-- if you've added the wrong number of slugs, it'll set the color of the potion and its smoke to something other than what it should be. The player won't see this until they exit back to the main passage. -->
\ (set: $color to (either: "blue", "red", "green"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits a gross green smoke.")
\ ]
\ ]
\ (replace: ?dialogue)[<!-- When you click the link it also replaces the dialogue hook at the bottom of the page with the proper dialogue. -->
\ You've added $slugsadded whole horned slug(if: $slugsadded > 1)[s] to your cauldron.]
\ ]
\ ]
[]<dialogue|
[[That's enough.|Cure For Boils Main]]
\](if: $explosion is true)[<!-- prioritize the fail condition as it locks you out of everything else -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (if: $cutquills >= 1)[<!-- if you already started cutting thme -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already started cutting your quills. No point in crushing them too.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](elseif: $crushedquills >= 4)[<!-- if you've come back to this passage after crushing your quills into nothingness -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already crushed your quills into oblivion.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](else:)[<!-- if you haven't ground them to dust or cut them yet -->
\ (link-rerun: "Crush Porcupine Quills")[
\ (set: $crushedquills to it + 1)
\ (replace: ?phrase)[
\ (if: $crushedquills is 1)[
\ Professor Snape frowns at you.
You've crushed your porcupine quills into large fragments.
\ ](elseif: $crushedquills is 2)[
\ "$honorific $surname, why do you insist on wasting ingredients?"
You've crushed your porcupine quills into a coarse powder.
\ ](elseif: $crushedquills is 3)[
\ "I couldn't possibly imagine a student being more moronic than Longbottom, but it seems I have been proven wrong."
You've crushed your porcupine quills into a fine powder.
\ ](elseif: $crushedquills >= 4)[
\ Professor Snape looks like he might want to strangle you.
You've crushed your porcupine quills into oblivion.
\ ]
\ ]
\ ]
\ ]
[]<phrase|
[[I'm done.|Cure For Boils Main]]
\](if: $explosion is true)[<!-- prioritize the fail condition as it locks you out of everything else -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (if: $crushedquills >= 1)[<!-- if you already started crushing thme -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already started crushing your quills. No point in cutting them too.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](elseif: $cutquills >= 4)[<!-- if you've come back to this passage after cutting your quills into nothingness -->
\ (event: when time > 0.1s)[
\ (replace: ?phrase)[You've already cut your quills into oblivion.]
\ ]<!-- event is needed so this runs slightly after the passage is printed so ?phrase can actually be replaced; replace macro used to retain correct spacing. -->
\ ](else:)[<!-- if you haven't ground them to dust or cut them yet -->
\ (link-rerun: "Cut Porcupine Quills")[
\ (set: $cutquills to it + 1)
\ (replace: ?phrase)[
\ (if: $cutquills is 1)[
\ Professor Snape looks unhappy.
You've cut your porcupine quills into large pieces.
\ ](elseif: $cutquills is 2)[
\ Professor Snape looks unhappy.
You've cut your porcupine quills into small pieces.
\ ](elseif: $cutquills is 3)[
\ "$honorific $surname, what are you doing?"
You've finely minced your porcupine quills.
\ ](elseif: $cutquills >= 4)[
\ You're definitely going to fail this class.
You've cut your porcupine quills into oblivion.
\ ]
\ ]
\ ]
\ ]
[]<phrase|
[[I'm done.|Cure For Boils Main]]
\](if: $explosion is true)[<!-- if your potion has already exploded, check for that first. -->
\ You've already done enough damage.
[[That's enough.|Cure For Boils Main]]
\](else:)[
\ (if: $cauldronpos is "on fire")[<!-- if your cauldron is on the fire when you put quills in, it WILL explode, regardless of other factors. -->
\ (if: $crushedquills > 0)[
\ (set: $type to "measure of crushed porcupine quills")
\ ](elseif: $cutquills > 0)[
\ (set: $type to "measure of cut porcupine quills")
\ ](else:)[
\ (set: $type to "whole porcupine quill")
\ ]<!-- this set of statements just checks whether you've crushed or cut your quills to change the wording. -->
\ [Add a $type.]<badquills|
\ (click: ?badquills)[
\ (set: $explosion to true)<!-- this notes that your stuff exploded. -->
\ (set: $cauldronfull to true)<!-- and this notes that you did still try to add something to your cauldron (i.e. it's not just the base) -->
You add a $type to your cauldron. Suddenly, it starts spewing noxious green steam, melting your caldron, and getting everywhere! Professor Snape stands from his desk, furious, and banishes your potion before it can get on anyone... except for you (you've erupted in some rather painful boils). You definitely failed class today.
\ ]
[[That's enough.|Cure For Boils Main]]
\ ](else:)[<!-- if your cauldron hasn't already exploded AND it's off of the fire, you can add quills without disaster! -->
(if: $timebrewed >= 33 and $timebrewed <= 45)[
\ (set: $quillsaddedtime to "correct")
\ ](else:)[
\ (set: $quillsaddedtime to "incorrect")
\ ]<!-- this check makes sure you've done the steps in the right order and brewed your potion for the right amount of time previously. -->
\
\ (if: $crushedquills > 0)[<!-- if you've crushed your quills -->
\ (link-repeat: "Add a measure of crushed porcupine quills.")[
\ (set: $quillsadded to it + 1)
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (set: $color to (either: "dark red", "blush pink", "scarlet"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits some bright cyan steam.")
\ ]
\ (replace: ?dialogue)[
\ Professor Snape glowers at you.
You've added $quillsadded measure(if: $quillsadded > 1)[s] of crushed porcupine quills to your cauldron.
\ ]
\ ]
\ ](elseif: $cutquills > 0)[<!-- if you've cut your quills -->
\ (link-repeat: "Add a measure of cut porcupine quills.")[
\ (set: $quillsadded to it + 1)
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (set: $color to (either: "magenta", "green", "neon orange"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits a weird neon orange steam.")
\ ]
\ (replace: ?dialogue)[
\ Professor Snape frowns at you.
You've added $quillsadded measure(if: $quillsadded > 1)[s] of cut porcupine quills to your cauldron.
\ ]
\ ]
\ ](else:)[ <!-- if your quills are whole -->
\ (link-repeat: "Add a porcupine quill.")[
\ (set: $quillsadded to it + 1)
\ (set: $cauldronfull to true) <!-- once you start adding things, mark that something is in the cauldron. -->
\ (if: $quillsadded is 2)[
\ (set: $color to "a pale blue")
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits wisps of magenta smoke.")
\ ]
\ ](else:)[
\ (set: $color to (either: "orange", "red", "green"))
\ (if: $totaltimeheated > 0)[
\ (set: $steam to "It emits a gross green smoke.")
\ ]
\ ]
\ (replace: ?dialogue)[
\ You've added $quillsadded whole porcupine quill(if: $quillsadded > 1)[s] to your cauldron.
\ ]
\ ]
\ ]
[]<dialogue|
[[That's enough.|Cure For Boils Main]]
\ ]
\](set: _clickedsomething to false)<!-- local variable that tells us if we've clicked an option -->
\(set: _clickedstop to false)<!-- tells us if we've clicked stop -->
\(set: _multitemps to false)<!-- this tells us if you tried to use multiple temperatures in one instance of this passage. If you've been here before, heatedbefore should be true so you'll still fail.-->
\(if: $explosion is true)[<!--prioritize fail condition -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (link-repeat: "OFF")[
\ (set: $totaltimeheated to $heattimer)
\ (set: _clickedstop to true) <!-- notes that you clicked to stop the timer/live statement -->
\ (set: _clickedsomething to false) <!-- setting this back to false means you can theoretically turn the heat back on and not break it. -->
\ (if: $temp is 250 and $totaltimeheated is 10 and $heatedbefore is false and _multitemps is false and $fangsadded is 4)[<!-- if you heated at the correct heat for the correct time and this is the ONLY time you've heated the potion AND its after adding the fangs, it's correct -->
\ (set: $heatcorrect to true)
\ ](else:)[<!-- if this exact set of circumstances was not met, note that. -->
\ (set: $heatcorrect to false)
\ ]
\ (replace: ?desc)[
\ You heated your potion (unless: _multitemps is true)[to $temp] for $heattimer seconds.
[I'm done.]<leave|
\ (click: ?leave)[
\ (set: $heatedbefore to true)<!-- notes that you've visited this passage and heated your potion some for future visits -->
\ (goto: "Cure For Boils Main")<!-- THEN sends you to the main page. -->
\ ]
\ ]
\ ]
\
\ (link-repeat: "150")[
\ (set: _clickedstop to false)
\ (if: _clickedsomething is false)[<!-- basically, if you haven't already clicked on a temp it'll start the live statement going -->
\ (if: $temp is not 150 and $temp is not 0)[(set: _multitemps to true)]<!-- basically, if you've hit stop and then hit a different temp it should still mark that you've done multi temps. -->
\ (replace: ?desc)[<!-- clicking a time link starts writing that description -->
\ (set: $temp to 150) <!-- the temp is set BEFORE the live statement so it doesn't keep updating. -->
\ (set: _clickedsomething to true)<!-- says youve clicked somethig -->
\ (live: 1s)[
\ (if: _clickedstop is false)[
\ (set: $heattimer to it + 1)
\ (replace: ?desc)[
\ Your potion is heating at $temp degrees and has been heating for $heattimer seconds.
\ ]
\ ](else:)[(stop:)]<!-- if you click stop, it stops. This has to be here IN the live statement for it to work.-->
\ ]
\ ]
\ ](else:)[
\ (set: $temp to 150)
\ (set: _multitemps to true) <!-- notes that you've been fiddling with the temps -->
\ ]
\ ]
\
\ (link-repeat: "200")[
\ (set: _clickedstop to false)
\ (if: _clickedsomething is false)[<!-- basically, if you haven't already clicked on a temp it'll start the live statement going -->
\ (if: $temp is not 200 and $temp is not 0)[(set: _multitemps to true)]<!-- basically, if you've hit stop and then hit a different temp it should still mark that you've done multi temps. If you hit the same temp its ok. -->
\ (replace: ?desc)[
\ (set: $temp to 200)
\ (set: _clickedsomething to true)
\ (live: 1s)[
\ (if: _clickedstop is false)[
\ (set: $heattimer to it + 1)
\ (replace: ?desc)[
\ Your potion is heating at $temp degrees and has been heating for $heattimer seconds.
\ ]
\ ](else:)[(stop:)]
\ ]
\ ]
\ ](else:)[<!-- otherwise it JUST adjusts the temperature listed AND notes that you fiddled with the temps mid count -->
\ (set: $temp to 200)
\ (set: _multitemps to true) <!-- notes that you've been fiddling with the temps -->
\ ]
\ ]
\ (link-repeat: "250")[
\ (set: _clickedstop to false)
\ (if: _clickedsomething is false)[<!-- basically, if you haven't already clicked on a temp it'll start the live statement going -->
\ (if: $temp is not 250 and $temp is not 0)[(set: _multitemps to true)]<!-- basically, if you've hit stop and then hit a different temp it should still mark that you've done multi temps. If you hit the same temp its ok. -->
\ (replace: ?desc)[
\ (set: $temp to 250)
\ (set: _clickedsomething to true)
\ (live: 1s)[
\ (if: _clickedstop is false)[
\ (set: $heattimer to it + 1)
\ (replace: ?desc)[
\ Your potion is heating at $temp degrees and has been heating for $heattimer seconds.
\ ]
\ ](else:)[(stop:)]
\ ]
\ ]
\ ](else:)[<!-- otherwise it JUST adjusts the temperature listed AND notes that you fiddled with the temps mid count -->
\ (set: $temp to 250)
\ (set: _multitemps to true) <!-- notes that you've been fiddling with the temps -->
\ ]
\ ]
[]<desc|
\](set: _clickedsomething to false)<!-- local variable that tells us if we've clicked an option -->
\(set: _clickedstop to false)<!-- tells us if we've clicked stop -->
\(if: $explosion is true)[
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (link-repeat: "Let it Brew")[
\ (unless: _clickedsomething is true)[<!-- if you've already clicked on this, it won't start again -->
\ (set: _clickedsomething to true)
\ (set: _clickedstop to false) <!-- notes that you now clicked something other sthan stop last -->
\ (replace: ?desc)[
\ (live: 1s)[
\ (if: _clickedstop is false)[
\ (set: $waittimer to it + 1)
\ Going into fast forward, your potion has been brewing for $waittimer minutes.
\ ](else:)[<!-- if you click stop it stops the live statement -->
\ (stop:)
\ ]
\ ]
\ ]
\ ]
\ ]
\(link-repeat: "That's Enough.")[
\ (set: _clickedstop to true)<!-- notes you stopped it to stop the live statement -->
\ (set: _clickedsomething to false)<!-- but makes it so you could theoretically click to brew again -->
\ (replace: ?desc)[
\ (set:$timebrewed to it + $waittimer)
\ You brewed your potion for $timebrewed minutes total, and $waittimer minutes this brewing session.
[[OK.|Cure For Boils Main]]
\ (set: $waittimer to 0)<!-- put this at the end so it'll print above and then reset itself to avoid weirdness when stopping and then starting the timer -->
\ ]
\ ]
[]<desc|
\](if: $explosion is true)[<!-- if your cauldron exploded theres nothing to stir -->
\ There's no saving your potion now. Also you're in pain and should probably go to see Madam Pomfery before these boils get worse.
[[I'm done.|Cure For Boils Main]]
\](else:)[
\ (link-repeat: "Stir Clockwise")[
\ (set: $stirredc to it + 1)
\ (replace: ?clock)[$stirredc]
\ ]
\ (link-repeat: "Stir Counter-Clockwise")[
\ (set: $stirredac to it + 1)
\ (replace: ?aclock)[$stirredac]
\ ]
You've stirred your potion clockwise [0]<clock| times and you've stirred it counter-clockwise [0]<aclock| times.
[I'm done.]<finish|
\ (click: ?finish)[<!-- on clicking that you're done it calculates whether you've done the correct stirring, and then sends you back to the main passage. -->
\ (if: $stirredc is 5 and $stirredac is 0 and $partone is not "" and $quillsadded is not 0)[<!-- if you stirred the correct number of times in the correct direction, and are doing this step at the right time (during part 2 AND after added quills) it'll set this to correct even if other parts of your part 2 are incorrect. Those will be checked in the wave wand passage. -->
\ (set: $stircorrect to true)
\ ](else:)[
\ (set: $stircorrect to false)
\ ]
\ (goto: "Cure For Boils Main")
\ ]
\]Short Twine game by "Nathalia Mañana"
Harry Potter (and by extension, Professor Snape) belongs to J.K. Rowling[*]<disc|(click-replace: ?disc)[ (whose political and personal views this Author does not agree with)].
[Play Again?]<restart|(click:?restart)[(reload:)]