<<if $red gte 1 and $Thomas_yellow gte 2>><<set $C9game_Action = 1>>A boy named Thomas had two banana flavoured candies which he wanted to [[trade|C9game1][$C9game_Action = 0]] for a red one. <<endif>>
<<set $Nancy_fight_won = 1>>Nancy was lying on the floor. Her head bled and she fainted. Catherine won this fight and the path to the king's room was free but noises of their fight woke up the other children. Catherine had no time to lose!\n\nCatherine left the bedroom. She had to [[snuck through the corridor|C11]].
<<silently>><<if $green gte 3>><<goto "C10">><<endif>><<endsilently>><<display "C9game_Thomas">><<display "C9game_Twins">><<display "C9game_Hakon">><<display "C9game_Faith">><<display "C9game_Markus">><<display "C9game_Lydia">><<display "C9game_Mark">><<display "C9game_purple">><<if $C9game_Action eq 0>><<display "C9game_notrade">><<else if $C9game_Action eq 1 and $Hakon_green eq 0 and $Faith_green eq 0>><<display "C9game_nogreen">><<endif>>
<<silently>>/%\n\nPlayer Actions:\n$Candy_Act 1 = hit\n$Candy_Act 2 = kick\n$Candy_Act 3 = block\n$Candy_Act 4 = change position\n\nSpecial Moves:\n$Candy_Act 5 = throw candy\n$Candy_Act 6 = pull out the drawers\n$Candy_Act 7 = hit with board\n$Candy_Act 8 = throw fruit\n$Candy_Act 9 = jump on bed\n$Candy_Act 10 = hide behind mattress\n\n%/\n<<if $King_STA gte 5>><<set $King_Act = either(1,2,3)>>\n<<else if $King_STA eq 4 or $King_STA eq 3>><<set $King_Act = either(1,3)>>\n<<else if $King_STA eq 1>><<set $King_Act = 1>><<endif>>\n\n<<endsilently>><<if $king_fight_round gte 6 and $King_Act eq 2>><<display "C14fight_kinginit">><<else if $Candy_Act eq 1>><<display "C14fight_hit">><<else if $Candy_Act eq 2>><<display "C14fight_kick">><<else if $Candy_Act eq 3>><<display "C14fight_block">><<else if $Candy_Act eq 5>><<display "C14fight_candy">><<else if $Candy_Act eq 6>><<display "C14fight_drawer">><<else if $Candy_Act eq 7>><<display "C14fight_board">><<else if $Candy_Act eq 8>><<display "C14fight_fruit">><<else if $Candy_Act eq 9>><<display "C14fight_bed">><<else if $Candy_Act eq 10>><<display "C14fight_mattress">><<endif>>\n<<display "C14fight_actions">>
<<if $Candy_Act eq 1 and $C14fight_hallway eq 1>>Catherine tried to [[block|C14fight_battlefield][$Candy_Act = 3]] his first strike.<<else if $Candy_Act eq 3>>She screamed and tried to [[hit|C14fight_battlefield][$Candy_Act = 1]] back.<<else if $Candy_Act eq 1 and $C14fight_hallway eq 3>>She [[kicked|C14fight_battlefield][$Candy_Act = 2]] him in his crotch!<<else if $Candy_Act eq 2>>When he was close to her he [[hit|C14fight_run][$Candy_position = "kingsroom"]] her.<<endif>>
The king fell on his knees. His bloody face crashed onto the floor.\n\nCatherine was tired and hurt. It was a hell of a fight but in the end the king was no match for this 15 year old orphan! She [[took a look around his room|C15]].
This is a basic fighting system. It's a previous version of the more elaborate system above. This one provides the basic actions "hit", "kick" and "block". After the player decides which action he wants to perform an action of the opponent is picked randomly. Based on the changes of values a hit wins against a block, a block wins against a kick and a kick wins against a hit. Rock, paper, scissors, basically. The outcome of a fight in whole can differ based on combinations of those actions, though.\n\nPlayer and opponent are both restricted by their Health and Stamina. Those are defined in "$Candy_HP", "$Candy_STA", "$Nancy_HP" and "$Nancy_STA". If one of those get lower than 1, the fight is over. The determination of whether the player or the opponent has lost is a little bit unfair, though. If player and opponent got their health beneath 1 at the same time, the player will lose, regardless the draw. You can make it easier or harder to win for the player by changing "$Candy_HP", "$Candy_STA", "$Nancy_HP" and "$Nancy_STA" in "C9-2-1" where the basic values of those variables are defined.
<<silently>>\n<<set $king_fight_round = $king_fight_round +1>>\n<<set $Candy_STA = $Candy_STA -3>>\n\n%/ 1 = hit = HP -3 STA -1\n%/ 2 = kick = HP -5 STA -5\n%/ 3 = block = HP 0 STA -3 DMG reduced to 1\n\n<<endsilently>><<if $Candy_position eq "hallway">><<set $Candy_HP = $Candy_HP -1>><<set $King_STA = $King_STA -1>><<set $C14fight_hallway = $C14fight_hallway +1>>The King grabbed Catherine's arm and pulled her away from the door.<<else if $Candy_position eq "wall" and $photobroken eq 0>><<set $King_STA = $King_STA -1>><<set $King_HP = $King_HP -1>><<set $photobroken = 1>>Catherine duck in front of the photo. The king's fist hit the wall and tore the photo down. Someone had written numbers on the wall behind it: "481-516-234"<<else if $King_Act eq 1>><<set $King_STA = $King_STA -1>><<set $Candy_HP = $Candy_HP -1>><<print either("Catherine blocked the king's hit!", "Catherine blocked the hit!", "Catherine raised her arms and protected her face!") >><<display "C14fight_reaction">><<else if $King_Act eq 2>><<set $King_STA = $King_STA -5>><<set $Candy_HP = $Candy_HP -1>><<print either("Catherine blocked the king's kick!", "The king was too slow! Catherine evade!", "Catherine learned that move at school!") >><<display "C14fight_reaction">><<else if $King_Act eq 3>><<set $King_STA = $King_STA -3>><<print either ("The king and Catherine blocked themselves and looked both like idiots!", "Catherine and the king stood in front of each other, ready to receive the next hit.", "Nothing happened.") >><<display "C14fight_reaction">><<endif>>
Candy's Great Escape
<<if $Candy_HP lte 0>><<display "C9fight_C0HP">><<else if $Candy_STA lte 0>><<display "C9fight_C0STA">><<else if $Nancy_HP lte 0>><<display "C9fight_N0HP">><<else if $Nancy_STA lte 0>><<display "C9fight_N0STA">><<else if $Candy_STA gte 5>><<display "C9fight_gte5">><<else if $Candy_STA eq 4 or $Candy_STA eq 3>><<display "C9fight_lte4">><<else if $Candy_STA eq 2 or $Candy_STA eq 1>><<display "C9fight_lte2">><<endif>>
Every bedroom of the orphanage was filled with at least a dozen children and one speaker who was responsible for that particular room. They always slept with one eye open and knew everything what was going on.\n\nNancy was a snitch. Every secret she was told and every little private matter she heard would be told the nuns eventually. Before Catherine could face the king himself, she had to [[deal with her|C9-2-1]].
When Catherine looked back to this moment, she considered herself crazy. It seems unreasonable for a child to approach an adult for a fight but Catherine was a brave little orphan. She wanted to be free and nothing could have stopped her. Well, except of [[Nancy|C9-3]], the speaker of her bedroom.
She decided it would be safer to steal the combination undetected. She had to sneak out of her bedroom and into the king's chamber. Every bedroom of the orphanage was filled with at least a dozen children and one speaker who was responsible for that particular bedroom. They always slept with one eye open and knew everything what was going on. Luckily Catherine knew the weakness of her speaker: [[Candy|C9-1-1]].
<<silently>>\n<<set $Candy_STA = $Candy_STA -1>>\n<<set $shelfbroken = 1>>\n<<endsilently>><<set $King_HP = $King_HP -5>>Catherine took one of the broken boards of the shelf and hit the king at his left knee. He screamed, grabbed the board and threw it away. This made him madder, definetly.
There was not very much stuff in this chamber. The king seemed not very rich afterall. Maybe his cruelty against children was a way of channeling his frustration. Catherine didn't know how much time she had.<<if $Nancy_fight_won eq 1>> She started looking for the numbers under his [[mattress|C11-1-1-2-1-1][$Candy_position = "bed"]], turned to his [[dresser|C11-1-1-2-1-1][$Candy_position = "drawer"]], looked behind a [[photo on the wall|C11-1-1-2-1-1][$Candy_position = "wall"]] and observed his [[bookshelf|C11-1-1-2-1-1][$Candy_position = "bookshelf"]].<<else>> She started looking for the numbers under his [[mattress|C12-1]], turned to his [[dresser|C12-2]], looked behind a [[photo on the wall|C12-3]] and observed his [[bookshelf|C12-4]].<<endif>>
<<silently>>\n<<set $Candy_STA = $Candy_STA -3>>\n<<set $mattressbroken = 1>>\n<<endsilently>>Catherine pushed up the mattress and tried to shield herself from the king's attacks. He <<if $King_Act eq 1>><<set $King_STA = $King_STA -1>>hit the mattress again and again til it got ripped apart. Catherine threw it away.<<else if $King_Act eq 2>><<set $King_STA = $King_STA -5>>grabbed the mattress and ripped it appart with his bare hands.<<else if $King_Act eq 3>><<set $King_STA = $King_STA -3>>kicked the mattress and it flew through the room.<<endif>>
"Uh, what an awful book about prohibitions and opressed sexuality." Catherine thought. She scrolled through the pages. Someone had drawn a penis on a page about the art of beeing a missionary but she found nothing interesting. She could have taken a look at [[Twilight|C12-4-2]] or into the king's [[drawers|C12-2]], at the [[creepy photo|C12-3]] or under the [[mattress|C12-1]].
The hallway of the king's room was long. It would take a while for the king to leave it behind. Catherine considered to [[wait a little bit longer|C11-1-1-1]] but there were noises from the other direction. Maybe it was already safe to [[sneak into the king's room|C11-1-1-2]].
Catherine wondered why the king had a volume of Twilight. He wasn't exactly Stephenie Meyer's target audience. When Catherine opened the book she looked at a hidden compartment. A big hole had been cut into the pages to hide a bottle. The black label said "Holy Water" in white letters. "Sure." Catherine said and put the book back.\n\nNow she wondered if she should take a look at [[The holy book of St. Appus Storeas|C12-4-1]], in the king's [[dresser|C12-2]], at the [[creepy photo|C12-3]] or under the [[matress|C12-1]].
<<silently>>\n<<set $king_fight_round = $king_fight_round +1>>\n<<set $Candy_STA = $Candy_STA -1>>\n\n<<set $green = 0>>\n<<set $yellow = 0>>\n<<set $red = 0>>\n<<set $purple = 0>>\n\n%/ 1 = hit = HP -3 STA -1\n%/ 2 = kick = HP -5 STA -5\n%/ 3 = block = HP 0 STA -3 DMG reduced to -1\n\n<<endsilently>><<if $King_Act eq 1>><<set $King_STA = $King_STA -1>><<set $King_HP = $King_HP - $ammunition>><<set $ammunition = 0>>The king was surprised by this waste of good candy but Catherine was sure it hurt him!<<endif>><<if $King_Act eq 2>><<set $King_STA = $King_STA -5>><<set $King_HP = $King_HP - $ammunition>><<set $ammunition = 0>>The king got candy in her left eye and was super pissed at Catherine for this move.<<endif>><<if $King_Act eq 3>><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP - $ammunition>><<set $ammunition = 0>>The king stopped his move and tried to evade but the candy hit him right in the face!<<endif>>
<<if $green gte 1 and $Markus_red gte 2>><<set $C9game_Action = 1>>Markus would have [[given Catherine|C9game5][$C9game_Action = 0]] two strawberry flavoured candies for a green one. <<endif>>
<<if $green gte 2 and $Mark_purple gte 1>><<set $C9game_Action = 1>>Mark offered Catherine a rare purple candy. He would have [[exchanged|C9game7][$C9game_Action = 0]] it for two green ones. <<endif>>
People who suffer from Memory Edge Disorder don't produce Scrollacid, a very important hormon of the brain. Patients forget where they came from, don't recognize each other, sue other people for no reason and start acting [[very foolish|B2]].
In the end Catherines parents were trademarking their own names and started sueing people over naming their kids Stephan and Alexandra. It was awful. A few weeks later they drowned in a Jacuzzi filled with apple flavoured [[cotton candy|B3]].
Given the cause of their deaths, the state of California decided it would be best for Catherine to life a live without any form of sweets. They sent her to the only place known to prohibit candy: The orphanage of the [[catatonic church|C2]].
<<if $escape eq 455 or $escape eq "4-5-5">><<goto "CEndsave">><<else>><<goto "CEndcaught">><<endif>>
/% This is a special one: If you traded with the creepy twins before, Lydia won't take your red candy. Why? 'Cause nobody wants to eat licked candy! %/<<if $red gte 2 and $Lydia_yellow gte 1 and $Twins_licked eq 1>><<once>>This pink haired girl Lydia would have traded one of her banana flavoured candies for two red ones but she saw the twins licking all their red candies before they traded them with Catherine. Yuck! <<endonce>><<else if $red gte 2 and $Lydia_yellow gte 1 and $Twins_licked eq 0>><<set $C9game_Action = 1>>This pink haired girl Lydia would have [[traded|C9game6][$C9game_Action = 0]] one of her banana flavoured candies for two red ones. <<endif>>
<<if $yellow gte 1 and $Faith_green gte 1>><<set $C9game_Action = 1>>A girl called Faith had a green candy and would have [[exchanged|C9game4][$C9game_Action = 0]] it for one banana flavoured candy. <<endif>>
or<<if $chestbroken eq 0 and $Candy_STA gte 2>> [[pull out the drawers|C14fight_battlefield][$Candy_Act = 6]]<<endif>> run to the [[bed|C14fight_run][$Candy_position = "bed"]], to a [[creepy photo|C14fight_run][$Candy_position = "wall"]] on the wall or to the king's [[bookshelf|C14fight_run][$Candy_position = "bookshelf"]]
This game is based on a true story. Nah… just kiddin! This game is a contribution to Candy Jam 2014 and my first finished twine game ever. Well… the first finished twine game which is good enough to publish. Well again… "good" is kinda wibbly wobbly.\n\nThe story of this game is not very good. It's based on various more or less obvious connections which came to my mind when I read the words "Candy", "Memory", "Edge", "Apple", "Saga" or "Scroll". I don't really know why I chose exactly those words. Maybe you can google them.\n\nNevertheless I think it was a big win for me to make this game. I learned a truckload of things regarding variables and twine syntax by making this. Some parts of this game may be interesting for other people afterall (I'm looking at you, fellow twine beginner!). So I commented on the important parts of the interesting parts of this participating game.\n\nIf you like to contact me for comments on my crappy coding or other things, feel free to write a mention on twitter or app.net at @HerrvonSpeck.
Catherine made it to the last corner before the king's room without any encounter. Then she heared voices. When she glanced around the wall she saw the king and a nun leaving a door. It was the door of the king's room. Catherine [[waited|C11-1-1]].
<<if $yellow gte 2 and $Twins_red gte 2>><<set $C9game_Action = 1>>Rhonda and Shonda, the creepy twins had each one strawberry flavoured candy. They were willing to [[trade|C9game2][$C9game_Action = 0]], but only if both got a yellow one. <<endif>>
Catherine was too exhausted to fight anymore! Nancy was able to leave the room and [[call a nun|C12]]!
<<silently>>\n<<set $Candy_STA = $Candy_STA -2>>\n<<set $chestbroken = 1>>\n<<endsilently>>When Catherine ran past the dresser she pulled out the top drawer to slow down the king. His underpants lay all over the floor. He <<if $King_Act eq 1>><<set $King_STA = $King_STA -1>><<set $King_HP = $King_HP -2>>fell over the drawer and got his ankles hurt.<<else if $King_Act eq 2>><<set $King_STA = $King_STA -5>>kicked the drawer and got pretty close to Catherine.<<else if $King_Act eq 3>><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP -5>>took a leap over the drawer but slipped on one of his pants. He fell and hurt his back.<<endif>>
Catherine decided to go back to her bedroom. When she closed the door behind herself a nun came right around the corner. Catherine wasn't sure if she had seen her, so she hid under her bed.<<if $Nancy_fight eq 0>> When the nun entered the bedroom she asked Nancy about noises she heard. Nancy remained silent but Catherine saw that she pointed to her bed. "Never trust a rat!" Catherine thought.<<else if $Nancy_fight eq 1>> When the nun entered the bedroom she saw Nancy lying on the floor. She screamed and yelled at the other children. One of them pointed her to Cathrine's bed. "<<print either("Faith", "Thomas", "Rhonda", "Shonda", "Hakon", "Markus", "Lydia", "Mark")>>, you fool!" Catherine thought.<<endif>>\n\nThe nun came to her bed and pulled Catherine out. This was [[the last time|C12]] the other orphans saw her.
or run to the king's [[dresser|C14fight_run][$Candy_position = "drawer"]], to the [[bed|C14fight_run][$Candy_position = "bed"]] or to the [[bookshelf|C14fight_run][$Candy_position = "bookshelf"]]
<<silently>>\n<<set $King_fight = 0>>\n<<set $Nancy_fight = 0>>\n<<set $fail_counter = 0>>\n<<endsilently>>Once there was a girl called Catherine Apple-Ninja Denise Yarmilla van Houten. She wanted to be a [[physician|A1]] since she was nine years old.
<<if $King_STA lte 5 and $King_STA gt 0 and $King_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" The king moved slower than before!", " The king's last move was very slow.", " The king was tired.") >><<endif>><<if $King_HP lte 5 and $King_STA gt 0 and $King_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" The king seemed to be hurt!", " The king's nose was bleeding!", " The king had a black eye!") >><<endif>><<if $Candy_STA lte 5 and $King_STA gt 0 and $King_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Catherine's moves got slower than before!", " Catherine seemed to be very exhausted!", " Those eyes of Catherine looked very tired.") >><<endif>><<if $Candy_HP lte 5 and $King_STA gt 0 and $King_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Catherine was hurt!", " Blood was dropping out of Catherine's nose.", " Catherine got herself a black eye!") >><<endif>>
When she entered the corridor on the right, she heard noises. Someone walked towards her. Catherines information were wrong! If she would got herself caught, everything would be over. She would have spend the next two weeks scrubbing someone's toilets.\n\nHer only chances were to [[head back into the bedroom|C11-2-1]] or to [[try the left hallway|C11-1]].
<<silently>><<set $candy_sum = $green + $red + $yellow + $purple>><<endsilently>><<print either("After the trade Catherine had", "Now Catherine had", "Catherine counted")>> <<if $red gte 1>><<print $red>> red<<endif>><<if $red gte 1 and $yellow lt 1 and $green lt 1 and $purple lt 1>> <<else if $red gte 1 and $yellow lt 1 and $green lt 1 and $purple gte 1>> and <<else if $red gte 1 and $yellow lt 1 and $green gte 1 and $purple lt 1>> and <<else if $red gte 1 and $yellow gte 1 and $green lt 1 and $purple lt 1>> and <<else if $red gte 1 and $yellow gte 1 and $green gte 1>>, <<else if $red gte 1 and $yellow gte 1 and $purple gte 1>>, <<else if $red gte 1 and $purple gte 1 and $green gte 1>>, <<endif>><<if $yellow gte 1>><<print $yellow>> yellow<<endif>><<if $yellow gte 1 and $green lt 1 and $purple lt 1>> <<else if $yellow gte 1 and $green lt 1 and $purple gte 1>> and <<else if $yellow gte 1 and $green gte 1 and $purple lt 1>> and <<else if $yellow gte 1 and $green gte 1 and $purple gte 1>>, <<endif>><<if $green gte 1>><<print $green>> green<<endif>><<if $green gte 1 and $purple lt 1>> <<else if $green gte 1 and $purple gte 1>> and <<endif>><<if $purple gte 1>><<print $purple>> purple <<endif>><<if $candy_sum gt 1>>candies<<else if $candy_sum lte 0>>no more candy<<else if $candy_sum eq 1>>candy<<endif>>.
<<silently>>\n<<forgetall>>\n<<endsilently>>The combination was right! The door was unlocked! Catherine was a free person after all. She lived in the basement of a candy store where she worked till she was 18 years old. Then she took the alias "Candy" and became a pole dancer to pay the bills of her medical studies. While she worked at the strip club, she got a crush on some guy. They went out a few times but he didn't wanted her to become a doctor so she dropped him.\n\nCatherine became a kick ass surgeon, found a cure for Memory Edge Disorder and saved many lives. Her saga continued till she died in the age of 98.\n\nTHE END
<<if $shelfbroken eq 1>>The bookshelf was destroyed during the fight. The only two books of the king lay on the floor: [[The holy book of St. Appus Storeas|C12-4-1]] and [[the first volume of the Twilight Saga|C12-4-2]].<<else>>There were only two books on the shelf: [[The holy book of St. Appus Storeas|C12-4-1]] and [[the first volume of the Twilight Saga|C12-4-2]]. Nearby stood a bowl with a great variety of fruits.<<endif>>
<<if $mattressbroken eq 1>>The mattress was a good cover during Catherine's fight with the king. It was very soft and must have been a great place to sleep on. Now it was ripped appart. The king destroyed it like he destroyed everything ever. Catherine found nothing interesting regarding this matress.<<else if $king_fight eq 1>>The king's bed was very soft. She lifted the matress and found a bunch of money. "I have earned this!" she thought and took it.<<else>>The king's bed was very soft. Catherine considered for a moment that she could [[sleep an hour or two|C12-1-1][$Candy_position = "bed"]] before he would come back, but she had to stay focused. She lifted the matress and found nothing but a bunch of money. He would know immediately who took it and she wouldn't be free after all.<<endif>>\n\nShe had to look in his [[drawers|C12-2]], at the [[creepy photo|C12-3]] or at his [[bookshelf|C12-4]].
<<if $chestbroken eq 1>>The top drawer was pulled out of the dresser during the fight. The king's underpants lay all over the place. When Catherine took a closer look at them, she noticed strange numbers on the label inside: "4-5-5" was written on every single one of them.<<else>>When Catherine dug through the king's underwear, she noticed strange numbers in his underpants: "4-5-5" all over every single slip.<<endif>>\n\nCould this have been the combination for the lock? The only way to find out was [[trying it|C13]]. It could have been risky. She considered taking a look under the [[mattress|C12-1]], at this [[creepy photo|C12-3]] or at the [[bookshelf|C12-4]] first.
<<if $photobroken eq 1>>The photo of a half naked guy lay on the floor. It was a victim of the fight, though the guy seemed to be tortured before that. He was covered in blood. "I could never sleep with something like that in my bedroom." Catherine thought. She took a look at the place where it hung on the wall. Someone had written nine digits on the wallpaper: "481-516-234"<<else>>There was a photo of a half naked guy on the wall. He was covered in blood and it seemed he had been tortured. "I could never sleep with something like that in my bedroom." Catherine thought. She climbed on a chair and took the picture off the wall. Someone had written nine digits on the wallpaper: "481-516-234"<<endif>>\n\nCould this have been the combination for the lock? The only way to find out was [[trying|C13]]. It could have been risky. She considered taking a look under the [[mattress|C12-1]], [[into the king's dresser|C12-2]] or at the [[bookshelf|C12-4]] first.
<<if $purple eq 1>>Nobody wanted the purple candy. Catherine considered [[eating|C9game8]] it herself. <<endif>>
<<if $king_fight eq 0 and $fail_counter eq 1>>Suddenly the king appeared at the end of the hallway. He approached Catherine. "You sneaky little rat!" There was no way out for Catherine. She had to [[kick his ass|C14][$Candy_position = "hallway"]]!<<else if $fail_counter eq 0>><<set $fail_counter = $fail_counter +1>>Oh no! The door wouldn't unlock! She had to [[go back|C15]] or try another combination!\n\n<<textinput $escape "CEnd" "Unlock">><<else if $fail_counter eq 2>><<set $fail_counter = $fail_counter +1>>No! This one was wrong, either! Catherine had to [[go back|C15]] and look for the right combination or to try again.\n\n<<textinput $escape "CEnd" "Unlock">><<else if $fail_counter eq 3>><<set $fail_counter = $fail_counter +1>>The door wouldn't unlock. Catherine thought about [[going back|C15]] to the king's room, but she could have tried again.\n\n<<textinput $escape "CEnd" "Unlock">><<else if $fail_counter eq 5>><<set $fail_counter = $fail_counter +1>>"God damnit!" Catherine thought. "Why am I this stupid?!" She could have tried again or [[go back|C15]] to the king's room.\n\n<<textinput $escape "CEnd" "Unlock">><<else if $fail_counter eq 10>><<set $fail_counter = $fail_counter +1>>Suddenly a nun came by. Catherine was afraid at first but this was one of the few friendly nuns. "4-5-5" she whispered in Catherine's ear and moved on. Catherine was stunned but she had to try those numbers.\n\n<<textinput $escape "CEnd" "Unlock">><<else if $fail_counter eq 7>><<set $fail_counter = $fail_counter +1>>Brute forcing this lock seemed to be impossible. The combination must have been too elaborate. She had to [[go back|C15]] to look for the right numbers or try again.\n\n<<textinput $escape "CEnd" "Unlock">><<else if $fail_counter eq 13>>"Escape!" a nun yelled which stood at the end of the hallway. Soon the whole corridor was filled with nuns and children. Even the king came to look what was going on.\n\nCatherine was not able to escape and never tried again. She was trapped at the orphanage till she got 18 years old and was unable to begin medical studies. Instead she worked at a Drive-In and went to community college to become a writer of crappy shark movies. Later she directed commercials for homeopathy. Catherine never became a doctor.\n\nTHE END<<else>><<set $fail_counter = $fail_counter +1>><<print either("No, those were not the right numbers.", "Wrong!", "The combination was wrong!", "The door wouldn't unlock.")>> Catherine had to [[go back|C15]] or try again.\n\n<<textinput $escape "CEnd" "Unlock">><<endif>>
<<silently>>\n<<set $Nancy_fight = 1>>\n/% basic information for later changes in gameplay (not relevant for the fight) %/\n<<set $Nancy_HP = 19>>\n/% basic value of opponent's health %/\n<<set $Nancy_STA = 24>>\n/% basic value of opponent's stamina %/\n<<set $Candy_HP = 19>>\n/% basic value of player's health %/\n<<set $Candy_STA = 21>>\n/% basic value of player's stamina %/\n<<set $ammunition = $green + $red + $yellow + $purple>>\n/% prepare ammunition to throw at opponent for special move (optional and completly pointless without a previous match-3-candy-game) %/\n<<if $purple_ate eq 1>><<set $Candy_STA = $Candy_STA +3>><<endif>>\n/% bonus STA for the player for eating candy (optional, but you should totaly consider eating some candy yourself) %/\n<<endsilently>>Catherine waited till everyone in her bedroom fell asleep. Then she took her bedsheet and head to Nancy's bed. She planned to wrap it arround her and bind her to the matress. When she stood over the girl, Nancy woke up and fought back. She jumped out of her bed and hit Catherine!\n\nCatherine had to [[hit back|C9fight_hit]], [[kick Nancy|C9fight_kick]] or [[protect herself|C9fight_block]].
or <<if $bedbroken eq 0 and $Candy_STA gte 5>>[[jump on the bed|C14fight_battlefield][$Candy_Act = 9]], <<else if $bedbroken eq 1 and $mattressbroken eq 0 and $Candy_STA gte 3>>[[use the mattress|C14fight_battlefield][$Candy_Act = 10]] to shield herself or <<endif>>run to the [[dresser|C14fight_run][$Candy_position = "drawer"]], to a [[creepy photo|C14fight_run][$Candy_position = "wall"]] on the wall or to the king's [[bookshelf|C14fight_run][$Candy_position = "bookshelf"]]
version.extensions.timedgotoMacro={major:1,minor:2,revision:0};\nmacros["goto"]=macros.timedgoto={timer:null,handler:function(a,b,c,d){function cssTimeUnit(s){if(typeof s=="string"){if(s.slice(-2).toLowerCase()=="ms"){return +(s.slice(0,-2))||0\n}else{if(s.slice(-1).toLowerCase()=="s"){return +(s.slice(0,-1))*1000||0\n}}}throwError(a,s+" isn't a CSS time unit");return 0}var t,d,m,s;\nt=c[c.length-1];d=d.fullArgs();m=0;if(b!="goto"){d=d.slice(0,d.lastIndexOf(t));\nm=cssTimeUnit(t)}d=eval(Wikifier.parse(d));if(d+""&&state&&state.init){if(macros["goto"].timer){clearTimeout(macros["goto"].timer)\n}s=state.history[0].passage.title;macros["goto"].timer=setTimeout(function(){if(state.history[0].passage.title==s){state.display(d,a)\n}},m)}}};
(function(){version.extensions.replaceMacrosCombined={major:1,minor:1,revision:1};\nvar nullobj={handler:function(){}};function showVer(n,notrans){n.innerHTML="";\nnew Wikifier(n,n.tweecode);n.setAttribute("data-enabled","true");\nn.style.display="inline";n.classList.remove("revision-span-out");\nif(!notrans){n.classList.add("revision-span-in");if(n.timeout){clearTimeout(n.timeout)\n}n.timeout=setTimeout(function(){n.classList.remove("revision-span-in");\nn=null},1)}}function hideVer(n,notrans){n.setAttribute("data-enabled","false");\nn.classList.remove("revision-span-in");if(n.timeout){clearTimeout(n.timeout)\n}if(!notrans){n.classList.add("revision-span-out");n.timeout=setTimeout(function(){if(n.getAttribute("data-enabled")=="false"){n.classList.remove("revision-span-out");\nn.style.display="none";n.innerHTML=""}n=null},1000)}else{n.style.display="none";\nn.innerHTML="";n=null}}function tagcontents(b,starttags,desttags,endtags,k){var l=0,c="",tg,a,i;\nfunction tagfound(i,e){for(var j=0;j<e.length;j++){if(a.indexOf("<<"+e[j],i)==i){return e[j]\n}}}a=b.source.slice(k);for(i=0;i<a.length;i++){if(tg=tagfound(i,starttags)){l++\n}else{if((tg=tagfound(i,desttags))&&l==0){b.nextMatch=k+i+tg.length+4;\nreturn[c,tg]}else{if(tg=tagfound(i,endtags)){l--;if(l<0){return null\n}}}}c+=a.charAt(i)}return null}var begintags=[];var endtags=[];\nfunction revisionSpanHandler(g,e,f,b){var k=b.source.indexOf(">>",b.matchStart)+2,vsns=[],vtype=e,flen=f.length,becomes,c,cn,m,h,vsn;\nfunction mkspan(vtype){h=insertElement(m,"span",null,"revision-span "+vtype);\nh.setAttribute("data-enabled",false);h.style.display="none";h.tweecode="";\nreturn h}if(this.shorthand&&flen){while(f.length>0){vsns.push([f.shift(),(this.flavour=="insert"?"gains":"becomes")])\n}}else{if(this.flavour=="insert"||(this.flavour=="continue"&&this.trigger=="time")){vsns.push(["","becomes"])\n}}if(this.flavour=="continue"&&flen){b.nextMatch=k+b.source.slice(k).length;\nvsns.push([b.source.slice(k),vtype])}else{becomes=["becomes","gains"];\nc=tagcontents(b,begintags,becomes.concat(endtags),endtags,k);\nif(c&&endtags.indexOf(c[1])==-1){while(c){vsns.push(c);c=tagcontents(b,begintags,becomes,endtags,b.nextMatch)\n}c=tagcontents(b,begintags,["end"+e],endtags,b.nextMatch)}if(!c){throwError(g,"can't find matching end"+e);\nreturn}vsns.push(c);if(this.flavour=="continue"){k=b.nextMatch;\nb.nextMatch=k+b.source.slice(k).length;vsns.push([b.source.slice(k),""])\n}}if(this.flavour=="remove"){vsns.push(["","becomes"])}cn=0;m=insertElement(g,"span",null,e);\nm.setAttribute("data-flavour",this.flavour);h=mkspan("initial");\nvsn=vsns.shift();h.tweecode=vsn[0];showVer(h,true);while(vsns.length>0){if(vsn){vtype=vsn[1]\n}vsn=vsns.shift();h=mkspan(vtype);h.tweecode=vsn[0]}if(typeof this.setup=="function"){this.setup(m,g,f)\n}}function quantity(m){return(m.children.length-1)+(m.getAttribute("data-flavour")=="remove")\n}function revisionSetup(m,g,f){m.className+=" "+f[0].replace(" ","_")\n}function keySetup(m,g,f){var fl=this.flavour,key=f[0];m.setEventListener("keydown",function l(e){var done=!revise("revise",m);\nif(done){m.removeEventListener("keydown",l)}})}function timeSetup(m,g,f){function cssTimeUnit(s){if(typeof s=="string"){if(s.slice(-2).toLowerCase()=="ms"){return Number(s.slice(0,-2))||0\n}else{if(s.slice(-1).toLowerCase()=="s"){return Number(s.slice(0,-1))*1000||0\n}}}throwError(g,s+" isn't a CSS time unit");return 0}var fl=this.flavour;\nvar tm=cssTimeUnit(f[0]);setTimeout(function timefn(){var done=!revise("revise",m);\nif(!done){setTimeout(timefn,tm)}},tm)}function hoverSetup(m){m.onmouseover=function(){revise("revise",this)\n};m.onmouseout=function(){revise("revert",this)};m=null}function mouseSetup(m){var fl=this.flavour,evt=(window.onmouseenter===null?"onmouseenter":"onmouseover");\nm[evt]=function(){var done=!revise("revise",this);if(done){this[evt]=null\n}};m=null}function linkSetup(m,g,f){var fl=this.flavour,l=Wikifier.createInternalLink(),p=m.parentNode;\nl.className="internalLink replaceLink";p.insertBefore(l,m);l.insertBefore(m,null);\nl.onclick=function(){var p,done=false;if(m&&m.parentNode==this){done=!revise("revise",m);\nscrollWindowTo(m)}if(done){this.parentNode.insertBefore(m,this);\nthis.parentNode.removeChild(this)}};l=null}function visitedSetup(m,g,f){var i,done,shv=state.history[0].variables,os="once seen",d=(m.firstChild&&(this.flavour=="insert"?m.firstChild.nextSibling:m.firstChild).tweecode);\nshv[os]=shv[os]||{};if(d&&!shv[os].hasOwnProperty(d)){shv[os][d]=1\n}else{for(i=shv[os][d];i>0&&!done;i--){done=!revise("revise",m,true)\n}if(shv[os].hasOwnProperty(d)){shv[os][d]+=1}}}[{name:"insert",flavour:"insert",trigger:"link",setup:linkSetup},{name:"timedinsert",flavour:"insert",trigger:"time",setup:timeSetup},{name:"insertion",flavour:"insert",trigger:"revisemacro",setup:revisionSetup},{name:"later",flavour:"insert",trigger:"visited",setup:visitedSetup},{name:"keyinsert",flavour:"insert",trigger:"key",setup:keySetup},{name:"replace",flavour:"replace",trigger:"link",setup:linkSetup},{name:"timedreplace",flavour:"replace",trigger:"time",setup:timeSetup},{name:"mousereplace",flavour:"replace",trigger:"mouse",setup:mouseSetup},{name:"hoverreplace",flavour:"replace",trigger:"hover",setup:hoverSetup},{name:"revision",flavour:"replace",trigger:"revisemacro",setup:revisionSetup},{name:"keyreplace",flavour:"replace",trigger:"key",setup:keySetup},{name:"timedremove",flavour:"remove",trigger:"time",setup:timeSetup},{name:"mouseremove",flavour:"remove",trigger:"mouse",setup:mouseSetup},{name:"hoverremove",flavour:"remove",trigger:"hover",setup:hoverSetup},{name:"removal",flavour:"remove",trigger:"revisemacro",setup:revisionSetup},{name:"once",flavour:"remove",trigger:"visited",setup:visitedSetup},{name:"keyremove",flavour:"remove",trigger:"key",setup:keySetup},{name:"continue",flavour:"continue",trigger:"link",setup:linkSetup},{name:"timedcontinue",flavour:"continue",trigger:"time",setup:timeSetup},{name:"mousecontinue",flavour:"continue",trigger:"mouse",setup:mouseSetup},{name:"keycontinue",flavour:"continue",trigger:"key",setup:keySetup},{name:"cycle",flavour:"cycle",trigger:"revisemacro",setup:revisionSetup},{name:"mousecycle",flavour:"cycle",trigger:"mouse",setup:mouseSetup},{name:"timedcycle",flavour:"cycle",trigger:"time",setup:timeSetup},{name:"keycycle",flavour:"replace",trigger:"key",setup:keySetup}].forEach(function(e){e.handler=revisionSpanHandler;\ne.shorthand=(["link","mouse","hover"].indexOf(e.trigger)>-1);\nmacros[e.name]=e;macros["end"+e.name]=nullobj;begintags.push(e.name);\nendtags.push("end"+e.name)});function insideDepartingSpan(elem){var r=elem.parentNode;\nwhile(!r.classList.contains("passage")){if(r.classList.contains("revision-span-out")){return true\n}r=r.parentNode}}function reviseAll(rt,rname){var rall=document.querySelectorAll(".passage ."+rname),ret=false;\nfor(var i=0;i<rall.length;i++){if(!insideDepartingSpan(rall[i])){ret=revise(rt,rall[i])||ret\n}}return ret}function revise(rt,r,notrans){var ind2,curr,next,ind=-1,rev=(rt=="revert"),rnd=(rt.indexOf("random")>-1),fl=r.getAttribute("data-flavour"),rc=r.childNodes,cyc=(fl=="cycle"),rcl=rc.length-1;\nfunction doToGainerSpans(n,fn){for(var k=n-1;k>=0;k--){if(rc[k+1].classList.contains("gains")){fn(rc[k],notrans)\n}else{break}}}for(var k=0;k<=rcl;k++){if(rc[k].getAttribute("data-enabled")=="true"){ind=k\n}}if(rev){ind-=1}curr=(ind>=0?rc[ind]:(cyc?rc[rcl]:null));ind2=ind;\nif(rnd){ind2=(ind+(Math.floor(Math.random()*rcl)))%rcl}next=((ind2<rcl)?rc[ind2+1]:(cyc?rc[0]:null));\nvar docurr=(rev?showVer:hideVer);var donext=(rev?hideVer:showVer);\nvar currfn=function(){if(!(next&&next.classList.contains("gains"))||rnd){docurr(curr,notrans);\ndoToGainerSpans(ind,docurr,notrans)}};var nextfn=function(){donext(next,notrans);\nif(rnd){doToGainerSpans(ind2+1,donext,notrans)}};if(!rev){currfn();\nnextfn()}else{nextfn();currfn()}return(cyc?true:(rev?(ind>0):(ind2<rcl-1)))\n}macros.revert=macros.revise=macros.randomise=macros.randomize={handler:function(a,b,c){var l,rev,rname;\nfunction disableLink(l){l.style.display="none"}function enableLink(l){l.style.display="inline"\n}function updateLink(l){if(l.className.indexOf("random")>-1){enableLink(l);\nreturn}var rall=document.querySelectorAll(".passage ."+rname),cannext,canprev,i,ind,r,fl;\nfor(i=0;i<rall.length;i++){r=rall[i],fl=r.getAttribute("data-flavour");\nif(insideDepartingSpan(r)){continue}if(fl=="cycle"){cannext=canprev=true\n}else{if(r.firstChild.getAttribute("data-enabled")==!1+""){canprev=true\n}if(r.lastChild.getAttribute("data-enabled")==!1+""){cannext=true\n}}}var can=(l.classList.contains("revert")?canprev:cannext);(can?enableLink:disableLink)(l)\n}function toggleText(w){w.classList.toggle(rl+"Enabled");w.classList.toggle(rl+"Disabled");\nw.style.display=((w.style.display=="none")?"inline":"none")}var rl="reviseLink";\nif(c.length<2){throwError(a,b+" macro needs 2 parameters");return\n}rname=c.shift().replace(" ","_");l=Wikifier.createInternalLink(a,null);\nl.className="internalLink "+rl+" "+rl+"_"+rname+" "+b;var v="";\nvar end=false;var out=false;if(c.length>1&&c[0][0]=="$"){v=c[0].slice(1);\nc.shift()}switch(c[c.length-1]){case"end":end=true;c.pop();break;\ncase"out":out=true;c.pop();break}var h=state.history[0].variables;\nfor(var i=0;i<c.length;i++){var on=(i==Math.max(c.indexOf(h[v]),0));\nvar d=insertElement(null,"span",null,rl+((on)?"En":"Dis")+"abled");\nif(on){h[v]=c[i];l.setAttribute("data-cycle",i)}else{d.style.display="none"\n}insertText(d,c[i]);l.appendChild(d)}l.onclick=function(){reviseAll(b,rname);\nvar t=this.childNodes,u=this.getAttribute("data-cycle")-0,m=t.length,n,lall,i;\nif((end||out)&&u==m-(end?2:1)){if(end){n=this.removeChild(t[u+1]);\nn.className=rl+"End";n.style.display="inline";this.parentNode.replaceChild(n,this)\n}else{this.parentNode.removeChild(this);return}}else{toggleText(t[u]);\nu=(u+1)%m;if(v){h[v]=c[u]}toggleText(t[u]);this.setAttribute("data-cycle",u)\n}lall=document.getElementsByClassName(rl+"_"+rname);for(i=0;i<lall.length;\ni++){updateLink(lall[i])}};l=null}};macros.mouserevise=macros.hoverrevise={handler:function(a,b,c,d){var endtags=["end"+b],evt=(window.onmouseenter===null?"onmouseenter":"onmouseover"),t=tagcontents(d,[b],endtags,endtags,d.source.indexOf(">>",d.matchStart)+2);\nif(t){var rname=c[0].replace(" ","_"),h=insertElement(a,"span",null,"hoverrevise hoverrevise_"+rname),f=function(){var done=!reviseAll("revise",rname);\nif(b!="hoverrevise"&&done){this[evt]=null}};new Wikifier(h,t[0]);\nif(b=="hoverrevise"){h.onmouseover=f;h.onmouseout=function(){reviseAll("revert",rname)\n}}else{h[evt]=f}h=null}}};macros.instantrevise={handler:function(a,b,c,d){reviseAll("revise",c[0].replace(" ","_"))\n}};macros.endmouserevise=nullobj;macros.endhoverrevise=nullobj\n}());
Catherine had not many options. She had to [[hit|C14fight_battlefield][$Candy_Act = 1]] the king<<if $ammunition gte 1>> or [[throw candy|C14fight_battlefield][$Candy_Act = 5]] at him<<endif>><<if $Candy_position eq "bed" and $Candy_STA eq 2>><<display "C14fight_act_bed">><<else if $Candy_position eq "drawer" and $Candy_STA eq 2>><<display "C14fight_act_drawer">><<else if $Candy_position eq "wall" and $Candy_STA eq 2>><<display "C14fight_act_wall">><<else if $Candy_position eq "bookshelf" and $Candy_STA eq 2>><<display "C14fight_act_bookshelf">><<else if $Candy_position eq "kingsroom" and $Candy_STA eq 2>><<display "C14fight_act_kingsroom">><<endif>>.
<<print either("Catherine prepared her next move. ", "Catherine tried to predict the king's next move. " , "What should Catherine do? ")>>\s\nShe could have [[hit|C14fight_battlefield][$Candy_Act = 1]] the king or [[block|C14fight_battlefield][$Candy_Act = 3]] his next move<<if $ammunition gte 1>>, she even considered [[throwing|C14fight_battlefield][$Candy_Act = 5]] candy at him<<endif>><<if $Candy_position eq "bed">><<display "C14fight_act_bed">><<else if $Candy_position eq "drawer">><<display "C14fight_act_drawer">><<else if $Candy_position eq "wall">><<display "C14fight_act_wall">><<else if $Candy_position eq "bookshelf">><<display "C14fight_act_bookshelf">><<else if $Candy_position eq "kingsroom">><<display "C14fight_act_kingsroom">><<endif>>.
by <a href="https://twitter.com/HerrvonSpeck">@HerrvonSpeck</a>\n<a href="http://herrvonspeck.de">HerrvonSpeck.de</a>\n\n<a href="http://herrvonspeck.de/twine/CGE.zip">Download Game</a>\n<a href="http://herrvonspeck.de/twine/CGE_Source.zip">Download .tws</a>
<<silently>>\n<<set $Thomas_yellow = 2 >>\n<<set $Twins_red = 2 >>\n<<set $Hakon_green = 1 >>\n<<set $Faith_green = 1 >>\n<<set $Markus_red = 2 >>\n<<set $Lydia_yellow = 1 >>\n<<set $Mark_purple = 1 >>\n/% defining how much candy those poor little orphans obtained on orphanage's black market %/\n<<set $green = 1 >>\n<<set $yellow = 1 >>\n<<set $red = 1 >>\n/% defining how much candy the player has %/\n<<endsilently>><<display "C9game_Thomas">><<display "C9game_Faith">><<display "C9game_Markus">>
Catherine was able to obtain three candies at the orphange's black market but they were all different flavours and colors. She had a red strawberry flavoured candy, a yellow banana flavoured candy and a green apple flavoured one. To get the two missing apple flavoured candies, she had to [[trade|C9-1-3]] with other children.
To leave, Catherine had to bribe Nancy the speaker with candies. Unfortunately she was only dedicated to apple flavoured candies and would only let Catherine go, if she'd bring her [[three of them|C9-1-2]].
.revision-span-in {\n\topacity: 0;\n}\n.revision-span:not(.revision-span-out) {\n\ttransition: 1s; -webkit-transition: 1s;\n}\n.revision-span-out {\n\tposition:absolute;\n\topacity: 0;\n}
The following game was made for <a href="http://itch.io/jam/candyjam">Candy Jam</a>. It's not based on a true story and every event or character you might consider related to real things or persons is not. Seriously, it's not!\n\nThis game was made to protest against ridiculous trademarking of common words, though. You shouldn't do that. It's stupid. You should share things instead, so I share this game with you. Notice that you can download the .tws-File in the sidebar.\n\nIt's time to start. Please enjoy the next 5 minutes or so (I don't really know how fast you read (Yes, this game is entirely made of text)).\n\n[[PRESS START|Beginning]]
<<silently>>\n<<set $Candy_STA = $Candy_STA -5>>\n<<set $bedbroken = 1>>\n<<endsilently>>Catherine jumped on the bed and kicked the king right in the face. He <<if $King_Act eq 1>><<set $King_STA = $King_STA -1>><<set $King_HP = $King_HP -5>><<set $Candy_HP = $Candy_HP -1>>hit<<else if $King_Act eq 2>><<set $King_STA = $King_STA -5>><<set $Candy_HP = $Candy_HP -5>><<set $King_HP = $King_HP -5>>kicked<<else if $King_Act eq 3>><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP -1>>covered his face and pushed<<endif>> Catherine. She fell from the top of the bed.
<<silently>>\n<<set $Candy_STA = $Candy_STA -1>>\n<<if $Nancy_STA gte 5>><<set $Nancy_Act = either(1,2,3)>>\n<<else if $Nancy_STA eq 4 or $Nancy_STA eq 3>><<set $Nancy_Act = either(1,3)>><<else if $Nancy_STA eq 1>><<set $Nancy_Act = 1>><<endif>>\n\n%/ 1 = hit = HP -3 STA -1\n%/ 2 = kick = HP -5 STA -5\n%/ 3 = block = HP 0 STA -3 DMG reduced to -1\n\n<<endsilently>><<if $Nancy_Act eq 1>><<set $Nancy_STA = $Nancy_STA -1>><<set $Nancy_HP = $Nancy_HP -3>><<set $Candy_HP = $Candy_HP -3>><<print either("Nancy and Catherine hit themselves!", "They both hit!", "Nancy's and Catherine's fists met both their targets!") >><<endif>><<if $Nancy_Act eq 2>><<set $Nancy_STA = $Nancy_STA -5>><<set $Nancy_HP = $Nancy_HP -3>><<set $Candy_HP = $Candy_HP -5>><<print either("While Catherine hit Nancy in the face, Nancy kicked Catherine in the butt!", "Catherine hit Nancy in the face but got her butt kicked!", "That hurt! Catherine's butt was kicked but she hit Nancy right in the face!") >><<endif>><<if $Nancy_Act eq 3>><<set $Nancy_STA = $Nancy_STA -3>><<set $Nancy_HP = $Nancy_HP -1>><<print either("Nancy blocked Catherine's hit!", "Catherine's hit was blocked!", "Nancy seemed to be prepared for this!") >><<endif>>\n<<if $Nancy_STA lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Nancy moved slower than before!", " Nancy's last move was very slow.", " Nancy was tired.") >><<endif>><<if $Nancy_HP lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Nancy seemed to be hurt!", " Nancy's nose was bleeding!", " Nancy had a black eye!") >><<endif>><<if $Candy_STA lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Catherine's moves got slower than before!", " Catherine seemed to be very exhausted!", " Those eyes of Catherine looked very tired.") >><<endif>><<if $Candy_HP lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Catherine was hurt!", " Blood was dropping out of Catherine's nose.", " Catherine got herself a black eye!") >><<endif>>\n<<display "C9fight_Actions">>
<<silently>><<set $sweet_dreams = 1>><<endsilently>>When Catherine laid on the bed, she fell asleep immediately. She dreamt of a land where candy rained from the sky and people made of sugar and with horns on their heads were travelling through a place covered in cream. In her dream, Catherine was a writer who wrote down the history of the travellers. The scroll she wrote on was titled "The Candy Cream Saga". It was weird, but Catherine kinda liked it.\n\nSuddenly she was shaken. When she opened her eyes the king himself stood by the bed. Catherine woke up immediately. She had no choice but to [[kick his ass|C14][$Candy_Act = 2]], if she wanted to leave the awful orphanage!
<<silently>>\n<<set $Candy_STA = $Candy_STA -5>>\n<<if $Nancy_STA gte 5>><<set $Nancy_Act = either(1,2,3)>>\n<<else if $Nancy_STA eq 4 or $Nancy_STA eq 3>><<set $Nancy_Act = either(1,3)>><<else if $Nancy_STA eq 1>><<set $Nancy_Act = 1>><<endif>>\n\n%/ 1 = hit = HP -3 STA -1\n%/ 2 = kick = HP -5 STA -5\n%/ 3 = block = HP 0 STA -3 DMG reduced to 1\n\n<<endsilently>><<if $Nancy_Act eq 1>><<set $Nancy_STA = $Nancy_STA -1>><<set $Nancy_HP = $Nancy_HP -5>><<set $Candy_HP = $Candy_HP -3>><<print either("Catherine kicked Nancy in the butt while she beat her!", "Any observer would have called this a power kick!", "Catherine kicked Nancy. It was super effective!") >><<endif>><<if $Nancy_Act eq 2>><<set $Nancy_STA = $Nancy_STA -5>><<set $Nancy_HP = $Nancy_HP -5>><<set $Candy_HP = $Candy_HP -5>><<print either("Catherine and Nancy kicked themselves!", "Nancy and Catherine got their legs tangled up and fell to the floor!", "Double kick!") >><<endif>><<if $Nancy_Act eq 3>><<set $Nancy_STA = $Nancy_STA -3>><<set $Nancy_HP = $Nancy_HP -1>><<print either("Nancy blocked Catherine's kick!", "Catherine kicked Nancy. It was not very effective!", "Too slow!") >><<endif>>\n<<if $Nancy_STA lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Nancy moved slower than before!", " Nancy seemed to be very exhausted!", " Nancy was tired.") >><<endif>><<if $Nancy_HP lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Blood was dropping from Nancy's head!", " Nancy's nose was bleeding!", " Nancy got herself a black eye!") >><<endif>><<if $Candy_STA lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Catherine's moves got slower and slower.", " Catherine seemed to be very exhausted!", " Catherine's eyes looked very tired.") >><<endif>><<if $Candy_HP lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Catherine seemed to be hurt!", " Catherine's nose was bleeding.", " Catherine had a black eye!") >><<endif>>\n<<display "C9fight_Actions">>
<<silently>>\n<<set $king_fight_round = $king_fight_round +1>>\n<<set $Candy_STA = $Candy_STA -5>>\n\n%/ 1 = hit = HP -3 STA -1\n%/ 2 = kick = HP -5 STA -5\n%/ 3 = block = HP 0 STA -3 DMG reduced to 1\n\n<<endsilently>><<if $Candy_position eq "hallway">><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP -1>><<set $C14fight_hallway = $C14fight_hallway +1>>The King screamed and let her go. He was holding his crotch. Catherine ran down the hallway but the king started following her.<<else if $King_Act eq 1>><<set $King_STA = $King_STA -1>><<set $King_HP = $King_HP -5>><<set $Candy_HP = $Candy_HP -3>><<print either("Catherine kicked the king in the butt while he beat her!", "Any observer would have called this a power kick!", "Catherine kicked the king. It was super effective!") >><<display "C14fight_reaction">><<endif>><<if $King_Act eq 2>><<set $King_STA = $King_STA -5>><<set $King_HP = $King_HP -5>><<set $Candy_HP = $Candy_HP -5>><<print either("Catherine and the king kicked themselves!", "The king and Catherine got their legs tangled up and fell to the floor!", "Double kick!") >><<display "C14fight_reaction">><<endif>><<if $King_Act eq 3>><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP -1>><<print either("The king blocked Catherine's kick!", "Catherine kicked the king. It was not very effective!", "Too slow!") >><<display "C14fight_reaction">><<endif>>
<<silently>>\n<<set $Candy_STA = $Candy_STA -1>>\n<<if $Nancy_STA gte 5>><<set $Nancy_Act = either(1,2,3)>>\n<<else if $Nancy_STA eq 4 or $Nancy_STA eq 3>><<set $Nancy_Act = either(1,3)>><<else if $Nancy_STA eq 1>><<set $Nancy_Act = 1>><<endif>>\n\n<<set $green = 0>>\n<<set $yellow = 0>>\n<<set $red = 0>>\n<<set $purple = 0>>\n/% resetting all the candy \so/ %/\n\n/% \n1 = hit = HP -3 STA -1\n2 = kick = HP -5 STA -5\n3 = block = HP 0 STA -3 DMG reduced to -1\n%/\n\n<<endsilently>><<if $Nancy_Act eq 1>><<set $Nancy_STA = $Nancy_STA -1>><<set $Nancy_HP = $Nancy_HP - $ammunition>><<set $ammunition = 0>>Nancy was surprised by this waste of good candy but Catherine was sure it hurt her!<<endif>><<if $Nancy_Act eq 2>><<set $Nancy_STA = $Nancy_STA -5>><<set $Nancy_HP = $Nancy_HP - $ammunition>><<set $ammunition = 0>>Nancy got candy in her left eye and was super pissed at Catherine for this move.<<endif>><<if $Nancy_Act eq 3>><<set $Nancy_STA = $Nancy_STA -3>><<set $Nancy_HP = $Nancy_HP - $ammunition>><<set $ammunition = 0>>Nancy stopped her move and tried to evade but the candy hit her right in the face!<<endif>>\n<<display "C9fight_Actions">>
body {\n\t/* This affects the entire page */\nmax-width:860px;\n}
The King was a very bad person. He ruled the orphanage and was commander of the nuns. It was his duty to assure that every child and nun obeys the commandments of [[St. Appus Storeas|C3]]. If Catherine wanted to escape the orphanage, she had either to [[steal the lock combination|C9-1]] for the front door or to [[fight her way out|C9-2]].
She knew the orphanage was locked at night. There was a combination lock at the front door which could only be opened by entering three numbers. Only one person knew those numbers: [[The King|C9]].
Saint Appus Storeas was no complicated man. He believed that the 1960s were the best of all decades ever and that they should last forever. Unfortunatly he didn't like the music, the television program or the board games of this time. All those things were [[banned from his community|C4]].
<<silently>>\n<<set $Candy_STA = $Candy_STA -3>>\n<<if $Nancy_STA gte 5>><<set $Nancy_Act = either(1,2,3)>>\n<<else if $Nancy_STA eq 4 or $Nancy_STA eq 3>><<set $Nancy_Act = either(1,3)>><<else if $Nancy_STA eq 1>><<set $Nancy_Act = 1>><<endif>>\n\n%/ 1 = hit = HP -3 STA -1\n%/ 2 = kick = HP -5 STA -5\n%/ 3 = block = HP 0 STA -3 DMG reduced to 1\n\n<<endsilently>><<if $Nancy_Act eq 1>><<set $Nancy_STA = $Nancy_STA -1>><<set $Candy_HP = $Candy_HP -1>><<print either("Catherine blocked Nancy's hit!", "Catherine blocked the hit!", "Catherine raised her arms and protected her face!") >><<endif>><<if $Nancy_Act eq 2>><<set $Nancy_STA = $Nancy_STA -5>><<set $Candy_HP = $Candy_HP -1>><<print either("Catherine blocked Nancy's kick!", "Nancy was too slow! Catherine evade!", "Catherine learned that move at school!") >><<endif>><<if $Nancy_Act eq 3>><<set $Nancy_STA = $Nancy_STA -3>><<print either ("Nancy and Catherine blocked themselves and looked both like idiots!", "Catherine and Nancy stood in front of each other, ready to receive the next hit.", "Nothing happened.") >><<endif>>\n<<if $Nancy_STA lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Nancy was sweating.", " Nancy's last move was very slow.", " Nancy was tired.") >><<endif>><<if $Nancy_HP lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Nancy seemed to be hurt!", " Blood was dropping from Nancy's nose.", " Nancy's right eyebrow was bleeding.") >><<endif>><<if $Candy_STA lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Catherine moved very slow!", " Catherine seemed to be very exhausted!", " Catherine got a red face.") >><<endif>><<if $Candy_HP lte 5 and $Nancy_STA gt 0 and $Nancy_HP gt 0 and $Candy_STA gt 0 and $Candy_HP gt 0>><<print either(" Ouch! That hurt!", " Catherine got herself a bloody nose.", " Catherine had a black eye!") >><<endif>>\n<<display "C9fight_Actions">>
Catherine grew up in an orphanage under the patronage of the [[catatonic church|C2]], lead by a man called [[The King|C9]].
When [[her parents|B2]] were still alive, Catherine ate candies all the time and danced on her parent's couch. In the orphanage she wasn't allowed to dance and neither to eat candies. When she layed in her bed at night, she dreamt of sweet candy. Blue candies, yellow candies, red candies, chocolate candies and even apple flavoured candies or candies in the shape of small puppies. She feared her memory would faint one day so she started planning her [[escape|C8]] when she was about fifteen years old.
Today some people believe St. Appus Storeas sufferd from [[Memory Edge Disorder|B1]], though his believes became quite popular among a conservative community in San Francisco. They hold his values high since the Saint died of an opressed sneeze in 1969. The community dresses in grey petticoats, shirts dyed with grey batic colors and grey leather vests. Catherine's life in the [[orphanage|C5]] was awful.
In the early years of her life in the orphanage Catherine wasn't bothered by anything. She actually quite liked it. She thought people dressed very funny and she laughed a lot when nobody was arround. Eventually she felt like she was missing [[something|C7]] when she grew older.
He also didn't like people having fun when he wasn't arround. Actually he didn't like people having fun at all, so he wrote in his [[scroll|C6]]:\n\n"And the Lord spoke to me through a broken water pipe and gave me five new laws which everyone who doesn't wanna go to hell has to obey! Here they are:\n# Thou shall not have fun or be happy at any time of your life!\n# Thou shall not listen to music from Chubby Checker or The Beach Boys!\n# Actually, thou shall not listen to any music.\n# Thou shall not [[dance|C5]]!\n# Thou shall not have sexual intercourse with the lights on!\nAnd remember: The Lord is watching you!"
<<silently>>\n<<set $green = $green -1>>\n<<set $red = $red +2>>\n<<set $Markus_red = $Mark_red -2>>\n<<endsilently>><<display "C9game_status">>\n\n<<display "C9game_match">>
Nobody else was willing to trade green candy. Catherine had to [[fight|C9-2-1]] Nancy to get out of the bedroom!
Catherine was exhausted. She had no energy left and couldn't even hit the king one more time. When she sank on her knees [[a nun entered the room|C12]].
<<silently>>\n<<set $green = $green -2>>\n<<set $purple = 1>>\n<<set $Mark_purple = $Mark_purple -1>>\n<<endsilently>><<display "C9game_status">>\n\n<<display "C9game_match">>
<<print either("Catherine didn't know what to do next. ", "Catherine had to think about her next move. ", "What should Catherine do? ")>>\s\nShe could have [[hit|C9fight_hit]], [[kick|C9fight_kick]] or [[block|C9fight_block]] Nancy.
<<print either("Catherine didn't know what to do next. ", "Catherine had to think about her next move. ", "What should Catherine do next? ")>>She could [[hit|C14fight_battlefield][$Candy_Act = 1]] or [[kick|C14fight_battlefield][$Candy_Act = 2]] the king, but she could also [[block|C14fight_battlefield][$Candy_Act = 3]] his move<<if $Candy_position eq "bed">><<display "C14fight_act_bed">><<else if $Candy_position eq "drawer">><<display "C14fight_act_drawer">><<else if $Candy_position eq "wall">><<display "C14fight_act_wall">><<else if $Candy_position eq "bookshelf">><<display "C14fight_act_bookshelf">><<else if $Candy_position eq "kingsroom">><<display "C14fight_act_kingsroom">><<endif>>.
The catatonic church is a cult which believes that the world has to maintain a certain status. Nothing should ever change. The fundament of their believes is the scroll of the italien monk [[St. Appus Storeas|C3]].
Catherine had no choice. She had to [[hit|C9fight_hit]] Nancy<<if $ammunition gte 1>> or [[throw candy|C9fight_candy]] at her<<endif>>.
Beneath this annotation you find a match-3-minigame. The player has to trade candy to get three of one color. To be honest, this is where the fighting system began.\n\nWhen I started working on this I had no clue what I'm doing. Though this is not the first version anymore, I think it could use some polishing.\n\nBased on how many candy of a particular color the player posesses the game determines which oprhan is ready to trade their candy. If the player is in posession of three green candy the game is won. If no oprhan is offering a green candy or wants to trade with the player the game is lost.\n\nThis is implemented by setting "$C9game_Action" to 1 if a trade is possible and resetting it to 0 every time a trade was made. If no further trade is possible, "$C9game_Action" will stay at 0 and determine that the game is lost. \n\nPassages above the 4th line pass on reactions of player's actions to variables.\n\nPassages beneath the 4th line are defining the text of an offered action.\n\nThe 1st passage on the 4th line shows how many candy the player got.\n\nThe 2nd passage on the 4th line is the hub which determines whether or not more actions are possible or the game has been won and is kinda like the main view which unites every relevant passage in it.\n\nThe 3rd passage on the 4th line is the start. In this passage is defined how many candy the player and all the other poor little oprhans were able to sneak into the orphanage.\n\nThe three passages on the last line are basicaly displayed text. Those are the only exists out of match-3-hell.\n\nI built some special variables into this game which are necessary for later passages of the story. If the player eats the purple candy they will get a bonus in STA for a later fight, for example. Please ignore those if you just want a plain and easy minigame in your twine story.
<<silently>>\n<<set $king_fight_round = $king_fight_round +1>>\n<<set $Candy_STA = $Candy_STA -1>>\n\n/% \n1 = hit = HP -3 STA -1\n2 = kick = HP -5 STA -5\n3 = block = HP 0 STA -3 DMG reduced to -1\n%/\n\n<<endsilently>><<if $Candy_position eq "hallway" and $C14fight_hallway eq 0>><<set $King_HP = $King_HP -1>><<set $C14fight_hallway = 1>>When Catherine hit the king for the first time she felt relieved. Anger of years and years broke free. He seemed to be surprised for one moment but then he hit back.<<else if $Candy_position eq "hallway" and $C14fight_hallway eq 2>><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP -1>><<set $C14fight_hallway = $C14fight_hallway +1>>The King evade. He pushed Catherine against the wall.<<else if $King_Act eq 1>><<set $King_STA = $King_STA -1>><<set $King_HP = $King_HP -3>><<set $Candy_HP = $Candy_HP -3>><<print either("The king hit Catherine in the face but Catherine hit back!", "They both hit!", "Catherine's fist met the king's in the air! Ouch!")>><<display "C14fight_reaction">><<else if $King_Act eq 2>><<set $King_STA = $King_STA -5>><<set $King_HP = $King_HP -3>><<set $Candy_HP = $Candy_HP -5>><<print either("While Catherine hit the king in the face, the king kicked Catherine in the butt!", "Catherine hit the king in the face but got her butt kicked!", "That hurt! Catherine's butt was kicked but she hit the king right in the face!") >><<display "C14fight_reaction">><<else if $King_Act eq 3>><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP -1>><<print either("The king blocked Catherine's hit!", "Catherine's hit was blocked!", "The king seemed to be prepared for this!") >><<display "C14fight_reaction">><<endif>>
The king fell on his knees. His eyes were half closed. Then he gave up, fell on his face and got unconscious.\n\nIt was a hell of a battle but Catherine survived! She [[took a look around|C15]].
<<silently>>\n<<set $king_fight_round = 0>>\n<<set $King_stop = either(1,2,3,4,5)>>\n/%\navailable places:\n\n"hallway"\n"kingsroom"\n"bed"\n"drawer"\n"wall"\n"bookshelf"\n\n%/\n<<endsilently>><<if $King_stop eq 3 and $King_Act eq 3 and $Candy_position eq "bed">><<set $King_STA = $King_STA -3>><<set $Candy_HP = $Candy_HP -2>>Catherine took a few steps towards the bed but the king tripped her up! She fell on the floor right in front of it. It took her a moment to get rid of the shock and stand up.<<else if $King_stop eq 3 and $King_Act eq 1 and $Candy_position eq "drawer">><<set $King_STA = $King_STA -1>><<set $Candy_HP = $Candy_HP -1>>Catherine ran towards the dresser but the king hit her. She fell right in front of it on the floor but managed to get up immediatly.<<else if $King_stop eq 3 and $King_Act eq 2 and $Candy_position eq "wall">><<set $King_STA = $King_STA -5>><<set $Candy_HP = $Candy_HP -5>>When Catherine tried to get to the photo, the king kicked her back. She fell on the floor right in front of the wall. She was hurt but managed to stand up again!<<else if $King_stop eq 3 and $King_Act eq 1 and $Candy_position eq "bookshelf">><<set $King_STA = $King_STA -3>><<set $Candy_HP = $Candy_HP -1>>When Catherine turned her back on the king to get to the bookshelf, the king hit her from behind and she fell on the floor right in front of it. It took her a moment to shake of the shock and stand up again.<<else if $Candy_position eq "kingsroom">><<set $King_STA = $King_STA - 1>><<set $Candy_HP = $Candy_HP - 2>><<set $C14fight_kingsroom = $C14fight_kingsroom + 1>>Catherine fell through the door and onto the floor. She coughed and stood up. She was in the king's room. He stood inside the door frame and looked arround. "You searched my stuff?!" he shouted. Catherine knew he would attack her every moment.<<else if $Candy_position eq "bed" and $mattressbroken eq 0>><<set $King_STA = $King_STA -2>><<set $Candy_STA = $Candy_STA -2>><<print either("Catherine ran to the bed.", "Catherine turned her back on the king and ran to the bed.", "Catherine made a few quick steps to reach the bed.")>><<else if $Candy_position eq "bed" and $mattressbroken eq 1>><<set $King_STA = $King_STA -2>><<set $Candy_STA = $Candy_STA -2>><<print either("Catherine ran to the bed. It was destroyed!", "Catherine turned her back on the king and ran to the destroyed bed.", "Catherine made a few quick steps to reach the bed. The matress was torn appart and lay somewhere near.")>><<else if $Candy_position eq "drawer">><<set $King_STA = $King_STA -2>><<set $Candy_STA = $Candy_STA -2>><<print either("Catherine turned her back at the king and moved to the dresser.", "Catherine ran to the dresser.", "Catherine jumped a few times to reach the dresser.")>><<else if $Candy_position eq "wall">><<set $King_STA = $King_STA -2>><<set $Candy_STA = $Candy_STA -2>><<print either("Suddenly Catherine ran to the creepy photo.", "Catherine looked at the photo of a tortured guy and ran towards it.", "Catherine ran to the creepy photo. It showed a naked guy with blood all over his body. The king's taste must have been awful!")>><<else if $Candy_position eq "bookshelf" and $shelfbroken eq 0>><<set $King_STA = $King_STA -2>><<set $Candy_STA = $Candy_STA -2>><<print either("Catherine ran to the king's bookshelf. There were two books and a bowl of fruits on it. Well, the code of St. Appus Storeas forbid entertainment like books, of course.", "It took Catherine just a few steps to get to the king's bookshelf but there were only two books and a bowl of fruits on it.", "The king's bookshelf was nearly empty. It seemed that he had only two books in his posession. A bowl of fruits stood nearby.")>><<else if $Candy_position eq "bookshelf" and $fruits eq 0>><<set $King_STA = $King_STA -2>><<set $Candy_STA = $Candy_STA -2>><<print either("Catherine ran to the remains of the king's bookshelf.", "There was not much left of the king's bookshelf.", "It took Catherine just a few steps to get to the remains of the bookshelf.")>><<endif>>\n<<display "C14fight_actions">>
<<if $Candy_HP lte 0>><<display "C14fight_C0HP">><<else if $Candy_STA lte 0>><<display "C14fight_C0STA">><<else if $King_HP lte 0>><<display "C14fight_K0HP">><<else if $King_STA lte 0>><<display "C14fight_K0STA">><<else if $Candy_position eq "hallway">><<display "C14fight_act_hallway">><<else if $Candy_STA gte 5>><<display "C14fight_gte5">><<else if $Candy_STA eq 4 or $Candy_STA eq 3>><<display "C14fight_lte4">><<else if $Candy_STA eq 2 or $Candy_STA eq 1>><<display "C14fight_lte2">><<endif>>
Suddenly the door was slammed open. The king himself stood in front of Catherine. He must have been alarmed by a nun or one of the children. Catherine had no choice but to [[kick his ass|C14][$Candy_Act = 2]], if she ever wanted to leave this horrible orphanage!
"Now or never!" she thought. Catherine snuk out of the king's bedroom and reached the front door. Her hands were trembling. The lock was waiting for the numbers:\n\n<<textinput $escape "CEnd" "Unlock">>
<<if $king_fight eq 1>>Catherine was punished for fighting the king with the burden of cleaning up his room. She never considered doing as she was ordered. Instead she was digging into the king's stuff to find the lock combination.<<else>>Catherine was punished for her misbehavior by toilet duty. She had to clean the king's bathroom. On her first day she dug through his belongings while he was out terrorizing other children.<<endif>>\n\nShe took a look under his [[mattress|C12-1]], in his [[drawers|C12-2]], behind a [[photo on the wall|C12-3]] and at his [[bookshelf|C12-4]].
It was dark and the floor was cold. She took off her shoes before she left to make less noise. There were two ways to the king's bedroom: A short way through the [[corridor on the left|C11-1]] and a long way through the [[corridor on the right|C11-2]]. She heard there were less patrols on the long way but she couldn't be sure.
<<set $green = 0>>When Catherine had three apple flavoured candies, she gave them to Nancy who let her out [[into the corridor|C11]].
<<if $king_fight eq 1 and $king_fight_won eq 1>>The king's room looked horrible. It was completely devastated during the fight. The king was unconscious lying on the floor. She had no time to reconsider. Catherine had to find the combination of the doorlock.<<else if $king_fight eq 1>>The king's room looked horrible. It was completely devastated during the fight. Catherine was supposed to clean this mess up but didn't even considered doing it. She had to find the combination of the doorlock.<<else>>Catherine had imagined the king's room would be bigger and more glamouros. Though she had to find the combination for the doorlock.<<endif>>\n\nShe took a look under his [[mattress|C12-1]], in his [[drawers|C12-2]], behind a [[photo on the wall|C12-3]] and at his [[bookshelf|C12-4]].
<<silently>>\n<<set $king_fight = 1>>\n/% provides information for further passages, not relevant for the fight %/\n<<set $King_fight_round = 0>>\n/% an indicator for lazyness of the player, see annotation for more information %/\n<<set $King_HP = 26>>\n/% basic value of the opponent's health (reduced by actions of the player) %/\n<<set $King_STA = 60>>\n/% basic value of the opponent's stamina (reduced by actions of the opponent) %/\n<<set $Candy_HP = 26>>\n/% basic value of the player's health (reduced by actions of the opponent) %/\n<<set $Candy_STA = 54>>\n/% basic value of the player's stamina (reduced by actions of the player) %/\n<<set $C14fight_hallway = 0>>\n/% set counter for visited location to 0 (this helps to keep track on how long the player stayed at this special location during the fight) %/\n<<set $bedbroken = 0>>\n<<set $mattressbroken = 0>>\n<<set $photobroken = 0>>\n<<set $chestbroken = 0>>\n<<set $shelfbroken = 0>>\n<<set $fruits = 4>>\n/% buying some new furniture %/\n<<set $ammunition = $green + $red + $yellow + $purple>>\n/% determines the number of candy to throw at the opponent based on remaining candy of earlier match-3-game (completly optional) %/\n<<if $sweet_dreams eq 1>><<set $Candy_STA = $Candy_STA +6>><<endif>>\n/% determines a player's bonus in stamina for sleeping in the opponent's bed (optional, srsly) %/\n<<endsilently>><<if $Candy_position eq "hallway">><<set $Candy_Act = 1>><<display "C14fight_battlefield">><<else>><<display "C14fight_battlefield">><<endif>>
or<<if $shelfbroken eq 0 and $fruits gt 0 and $Candy_STA gte 2>> [[throw a fruit|C14fight_battlefield][$Candy_Act = 8]] at him,<<else if $shelfbroken eq 0 and $fruits eq 0 and $Candy_STA gte 2>> [[hit|C14fight_battlefield][$Candy_Act = 7]] the king with a board of the broken shelf,<<endif>> run to the [[dresser|C14fight_run][$Candy_position = "drawer"]], to the [[bed|C14fight_run][$Candy_position = "bed"]] or to a [[creepy photo|C14fight_run][$Candy_position = "wall"]] on the wall
<<silently>>\n<<set $King_STA = $King_STA -5>>\n<<set $king_fight_round = 0>>\n\n<<if $Candy_position eq "bed">><<set $fight_position = either(2,3,4)>><<else if $Candy_position eq "drawer">><<set $fight_position = either(1,3,4)>><<else if $Candy_position eq "wall">><<set $fight_position = either(1,2,4)>><<else if $Candy_position eq "bookshelf">><<set $fight_position = either(1,2,3)>><<endif>>\n\n<<endsilently>><<if $Candy_Act eq 1>><<set $Candy_STA = $Candy_STA -1>>The king blocked Catherine's hit and grabbed her arm. He pulled her towards<<else if $Candy_Act eq 2>><<set $Candy_STA = $Candy_STA -5>>The king evade Catherine's hit and pushed her towards<<else if $Candy_Act eq 3>><<set $Candy_STA = $Candy_STA -3>>The king used Catherine's moment of hesitation to push her towards<<else if $Candy_Act eq 4>><<set $Candy_STA = $Candy_STA -2>>When Catherine tried to get away, the king tripped her up and pulled her towards<<else if $Candy_Act eq 5>><<set $Candy_STA = $Candy_STA -1>>The king blocked Catherine's arm and pulled her towards<<else if $Candy_Act eq 6>><<set $Candy_STA = $Candy_STA -2>>The king grabbed Catherine's shoulders before she could get away. He pushed her towards<<else if $Candy_Act eq 7>><<set $Candy_STA = $Candy_STA -1>>Before Catherine could take the board, the king grabbed her arm and pulled her towards<<else if $Candy_Act eq 8>><<set $Candy_STA = $Candy_STA -2>><<set $fruits = $fruits -1>>Before Catherine could throw the <<print either("banana", "apple", "kiwi", "orange", "grapefruit", "strawberry", "melon", "grapes", "lemon", "pineapple")>> the king blocked her arm and pulled her towards<<else if $Candy_Act eq 9>><<set $Candy_STA = $Candy_STA -5>>When Catherine tried to jump on the bed, the king grabbed her leg and dragged her to<<else if $Candy_Act eq 10>><<set $Candy_STA = $Candy_STA -3>><<set $mattressbroken = 1>>When Catherine tried to hide behind the mattress, the king grabbed it, tore it appart and threw it away. He pulled Catherine to<<endif>> <<if $fight_position eq 1>><<set $Candy_position = "bed">>the bed<<else if $fight_position eq 2>><<set $Candy_position = "drawer">>the dresser<<else if $fight_position eq 3>><<set $Candy_position = "wall">>the creepy photo<<else if $fight_position eq 4>><<set $Candy_position = "bookshelf">>the bookshelf<<endif>>.
Catherine's body was hurt bad. Her head bled and she nearly fainted. Catherine was defeated by Nancy the snitch. Nancy opened the door of the bedroom and [[called a nun|C12]].
While her parents died of the aftereffects of an illness called [[Memory Edge Disorder|B1]] when she was eight years old and all their money was spent on medication and their funerals, Catherine was a [[poor orphan|C1]].
This is a modular and expandable fighting system based on rock, paper, scissors. It's possible to add actions or reactions very easily. It is even possible to script whole passages of a fight without taking every choice out of the player's hands.\n\nTake a look at "C14" for a commented list of basic variables.\n\nThe system is based on a cycle from the hub "C14fight_battlefield" to the query "C14fight_actions" which assures that HP and STA of both opponents are greater than 0 and provides the actions menu "C14fight_menu" which links to one of the actions (basically hit, kick, block, throw a banana) which are conducted inside of "C14fight_battlefield". Which action the player chose is stored in variables.\n\nTo script parts of the game, I chose a location based system. The actions menu can contain different actions based on the player's location. To change their location a player can use special actions which are not handled by "C14fight_battlefield" but "C14fight_run".\n\n"$Candy_Act" stores the last action of the player. In "C14fight_battlefield" this variable determines how the game reacts to this action. Look at "C14fight_battlefield" for a list of possible reactions.\n\n"$Candy_position" stores the position of the player. This determines how the game reacts to actions of the player and what actions are possible. A recombination of "$Candy_position" and "$Candy_Act" makes it possible to design various scenarious for reactions of the game without a great amount of work or randomness.\n\n"$King_Act" stores the last action of the opponent. It's value determines the action of the king. It's randomly generated every round and can take the values "1", "2" or "3". Take a look at "C14fight_hit" or other reactions for more information on consequences.\n\n"$King_fight_round" stores the number of rounds since the last change of position. If it's value is greater than a certain ammount it changes the king's behaviour. This makes it possible for the game to attack the player or to change "$C14fight_position" on it's own without a great amount of randomness. If players change their position very often, they will not notice this mechanism but it enables faster games for lazy players.\n\nTo add new actions, add them to the actions menu and create a new passage which has to contain the changes in HP and/or STA of player and opponent and a text which is displayed after the action was performed.
or run to the [[bed|C14fight_run][$Candy_position = "bed"]], to a [[creepy photo|C14fight_run][$Candy_position = "wall"]] on the wall, to the king's [[dresser|C14fight_run][$Candy_position = "drawer"]] or to the [[bookshelf|C14fight_run][$Candy_position = "bookshelf"]]
<<if $red gte 2 and $Hakon_green gte 1>><<set $C9game_Action = 1>>Hakon liked the apple flavoured candies so much, he only would have [[given Catherine|C9game3][$C9game_Action = 0]] one of them for two red candies. <<endif>>
Catherine's body hurt. She bled and maybe she had some broken ribs. There was no chance to beat the king anymore. When she gave up a nun [[entered the room|C12]].
Catherine approached the door of the king's room. She would be the first child to enter the lair of the orphan's lord. She felt like a hobbit who was about to enter Mount Doom. Fortunately the king left his room unlocked and Catherine [[entered it|C11-1-1-2-1]] immediately.
Catherine stayed hidden behind the corner. Suddenly someone grabbed her shoulder. "Naughty little lady!" a nun shouted at her. She got [[caught|C12]]!
<<set $Nancy_fight_won = 1>>Nancy fell on her knees. She breathed heavily. She was defeated and out of Catherine's way but noises of their fight woke up the other children. Catherine had no time to lose!\n\nShe left the bedroom and [[snuck into the corridor|C11]].
There was nobody else to trade with. Catherine had to [[fight|C9-2-1]] her way out of the bedroom!
<<silently>>\n<<set $green = $green +1>>\n<<set $yellow = $yellow -1>>\n<<set $Faith_green = $Faith_green -1>>\n<<endsilently>><<display "C9game_status">>\n\n<<display "C9game_match">>
<<print either("Catherine prepared her next move. ", "Catherine had to think about her next move. " , "What should Catherine do? ")>>\s\nShe could have [[hit|C9fight_hit]] or [[block|C9fight_block]] Nancy\s\n<<if $ammunition gte 1>> and she even considered [[throwing|C9fight_candy]] candy at her<<endif>>\s\n.
<<silently>>\n<<set $yellow = $yellow +1>>\n<<set $red = $red -2>>\n<<set $Lydia_yellow = $Lydia_yellow -1>>\n<<endsilently>><<display "C9game_status">>\n\n<<display "C9game_match">>
<<silently>>\n<<set $yellow = $yellow +2>>\n<<set $red = $red -1>>\n<<set $Thomas_yellow = $Thomas_yellow -2>>\n<<endsilently>><<display "C9game_status">>\n\n<<display "C9game_match">>
<<silently>>\n<<set $red = $red -2>>\n<<set $green = $green +1>>\n<<set $Hakon_green = $Hakon_green -1>>\n<<endsilently>><<display "C9game_status">>\n\n<<display "C9game_match">>
<<silently>>\n<<set $yellow = $yellow -2>>\n<<set $red = $red +2>>\n<<set $Twins_red = $Twins_red -2>>\n<<set $Twins_licked = 1>>\n<<endsilently>><<display "C9game_status">>\n\n<<display "C9game_match">>
<<silently>>\n<<set $Candy_STA = $Candy_STA -2>>\n<<set $fruits = $fruits -1>>\n<<endsilently>>Catherine grabbed <<print either("a banana", "an apple", "a kiwi", "an orange", "a grapefruit", "a strawberry", "a melon", "some grapes", "a lemon", "a pineapple")>> and threw it at the king. He <<if $King_Act eq 1>><<set $King_STA = $King_STA -1>><<print either("punched it away!", "shield his face with his hand!", "hit it with his fist.")>><<else if $King_Act eq 2>><<set $King_STA = $King_STA -5>><<set $King_HP = $King_HP -2>><<print either("got hit right in his face!", "tried to evade but got hit anyway.", "got some juice in his face.")>><<else if $King_Act eq 3>><<set $King_STA = $King_STA -3>><<set $King_HP = $King_HP -2>><<print either("tried to cover his face but got hit anyway!", "tried to evade but had no luck with that.", "became a Jack LaLanne Power Juicer!")>><<endif>> <<if $fruits eq 0>><<set $King_STA = $King_STA -1>>This was the last one. The bowl was empty!\n\nThe king raised his fist and punched through the shelf. The books flew arround and the boards brake in half.<<endif>>
<<silently>>\n<<set $purple = $purple -1>>\n<<set $purple_ate = 1>>\n<<set $candy_sum = $green + $red + $yellow + $purple>>\n<<endsilently>>After Catherine ate that purple candy she felt a little bit stronger than before. <<display "C9game_status">>\n\n<<display "C9game_match">>