{<div class="fightpassage"> (set: _hitchange to (random: 0,50)) (if: _hitchange > 10)[ You (text-style: "shudder")[**STRATCH**] at him with your claws! (if: $badguydefense is 0)[ (set: $currentphoto to 8) (replace: ?currentphoto)[$currentphoto] You hit him for (css: "color: black; font-size: 120%")[**_hitchange**] damage(track: 'hit', 'playwhenpossible') (set: $badguyhealth to it - _hitchange) (if:$badguyhealth <=0)[(set:$badguyhealth to 0)] (replace: ?badguyhealth)[$badguyhealth] (display: "Update Health Bar") ](else-if: $badguydefense is 1)[ (track: 'dodge', 'playwhenpossible') (set: $currentphoto to 9) (replace: ?currentphoto)[$currentphoto] He (text-style: "fade-in-out")[**DODGED**] out of the way!] ](else:)[ (set: $currentphoto to 9) (replace: ?currentphoto)[$currentphoto] You (text-style: "shudder")[**STRATCH**] at him with your claws! He's too fast! You missed.(track: 'missed', 'playwhenpossible') ]</div>}{<div class="commandpassage">[[Continue ->Histurn]]</div>}{<div class="fightpassage"> (set: $currentphoto to 5) (replace: ?currentphoto)[$currentphoto] You defend yourself... Ready to (text-style: "fade-in-out")[**DODGE.**](track: 'defend', 'playwhenpossible') (set: $goodguydefense = 1) (display: "Update Health Bar")</div>}{<div class="commandpassage">[[Continue ->Histurn]]</div>} {<div class="header"><img src="Pictures/herowin.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">(track: 'button', 'playwhenpossible') GOTCHA! You've landed a devastating blow and it's all over. You've got him beat. (set: $winfight to 1) </div>}{<div class="commandpassage">[[Continue ->win2]]</div>} (track: 'battlemusic', 'fadeout', 1) (track: 'lowhp', 'fadeout', 1) (track: 'winmusic', 'loop', true) (track: 'winmusic', 'playwhenpossible'){<div class="header"><img src="Pictures/badguywin.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">(track: 'button', 'playwhenpossible') Bad Eye pins you to the ground, the stench of garbage fills your nostrils. It's over, he's stronger than you. </div>}{<div class="commandpassage">[[Continue ->Lose2]]</div>} (track: 'battlemusic', 'fadeout', 1) (track: 'lowhp', 'fadeout', 1) (track: 'losemusic', 'loop', true) (track: 'losemusic', 'playwhenpossible'){<div class="fightpassage"> (set: _hitchange to (random: 0,70)) (if:$bottlecount is 0)[ (set: $currentphoto to 10) (replace: ?currentphoto)[$currentphoto] You try to pounce.. but your too exhausted... you should REST](if:$bottlecount > 0)[ (if: _hitchange > 40)[ (set: $currentphoto to 6) (replace: ?currentphoto)[$currentphoto] You (text-style: "rumble")[**POUNCE**] at him! Claws out! (if: $badguydefense is 0)[ You hit him for (css: "color: black; font-size: 120%")[**_hitchange**] damage (set: $badguyhealth to it - _hitchange)(track: 'pounce', 'playwhenpossible')(if:$badguyhealth <=0)[(set:$badguyhealth to 0)] (replace: ?badguyhealth)[$badguyhealth] (set:$bottlecount to it - 1) ](else:)[ (set: $currentphoto to 7) (replace: ?currentphoto)[$currentphoto] He (text-style: "fade-in-out")[**DODGED**] out of the way!(track: 'dodge', 'playwhenpossible') ]](else:)[ (set: $currentphoto to 7) (replace: ?currentphoto)[$currentphoto] You (text-style: "rumble")[**POUNCE**] at him! Claws out! But, you jumped too far and missed!(track: 'missed', 'playwhenpossible') (set:$bottlecount to it - 1) ]](display: "Update Health Bar")</div>}{<div class="commandpassage">[[Continue ->Histurn]]</div>} {<div class="fightpassage"> You try to get away! (set: _hitchange to (random: 0,10)) (if: _hitchange > 8)[ You got away safely....(track: 'run', 'playwhenpossible') ](else:)[ You weren't quick enough! He catches up to you.(track: 'runfailed', 'playwhenpossible') ] (display: "Update Health Bar") </div>}{<div class="commandpassage">{(if: _hitchange > 8)[ [[Continue ->FleeEnding]] ](else:)[ [[Continue ->Histurn]] ]}</div>} {<div class = "fightpassage"> {(set: $currentphoto to 10)(replace: ?currentphoto)[$currentphoto](set: $goodguydefense = 0)}What will you do? </div>}<div class="commandpassage"><div class = "twocolumn"> [[SCRATCH->hit]] {(if: $bottlecount is 0)[ [[[REST ->rest]]] ](else:)[ [[POUNCE ->throwbottle]] ]} [[DODGE ->dodge]] [[FLEE ->Flee]] {</div></div>} {<div class="fightpassage"> Bad Eye gets ready...(set: $badguydefense to 0) (set: _RandomAttack to (random: 0,3))(set: _swingchange to (random: 0,50))(set: _hitchange to (random: 0,70)) (if: _RandomAttack <= 1)[ (if: _swingchange > 15)[ He (text-style: "shudder")[**SCRATCHES**] at you! (if:$goodguydefense is 0)[ He hits you for (css: "color: black; font-size: 120%")[**_swingchange**] damage(track: 'hit', 'playwhenpossible') (set: $goodguyhealth to it - _swingchange) (if:$goodguyhealth <=0)[(set:$goodguyhealth to 0)] (replace: ?goodguyhealth)[$goodguyhealth] (display: "Update Health Bar") (set: $currentphoto to 3) (replace: ?currentphoto)[$currentphoto] ](else:)[ (set: $currentphoto to 4) (replace: ?currentphoto)[$currentphoto] You (text-style: "fade-in-out")[**DODGED**] out of the way! (track: 'dodge', 'playwhenpossible') ] ](else:)[ (set: $currentphoto to 4) (replace: ?currentphoto)[$currentphoto] He (text-style: "shudder")[**SCRATCHES**] at you! Too slow! He missed! (track: 'missed', 'playwhenpossible') ] ](if: _RandomAttack is 2)[ (if: _hitchange > 50)[ He (text-style: "rumble")[**POUNCES**] on you with his claws! (if:$goodguydefense is 0)[ He pins you for (css: "color: black; font-size: 120%")[**_hitchange**] damage!(track: 'pounce', 'playwhenpossible') (set: $currentphoto to 1) (replace: ?currentphoto)[$currentphoto] (set:$goodguyhealth to it - _hitchange) (if:$goodguyhealth <=0)[(set:$goodguyhealth to 0)] (replace: ?goodguyhealth)[$goodguyhealth] (display: "Update Health Bar") ](else:)[ (set: $currentphoto to 2) You (text-style: "fade-in-out")[**DODGED**] his pounce! (track: 'dodge', 'playwhenpossible') ]](else:)[ (set: $currentphoto to 2) (replace: ?currentphoto)[$currentphoto] He (text-style: "rumble")[**POUNCES**] on you with his claws! (track: 'missed', 'playwhenpossible') But, he jumped too high and missed! ]](if: _RandomAttack is 3)[ (set: $currentphoto to 0) (replace: ?currentphoto)[$currentphoto] He defends himself... Ready to (text-style: "fade-in-out")[**DODGE.**](track: 'defend', 'playwhenpossible') (set: $badguydefense to 1)]</div></div>}{<div class="commandpassage">[[Continue ->Yourturn]]</div>}{<div class="header"><img src="Pictures/Intro_blackscene.jpg" class="centerImage" alt="Cat"></div>}<div class="passage">**"CATFIGHT: SHOWDOWN IN THE ALLEYWAY"** *A Pokemon Fighting Game made in Twine* by Mike Yi Ren </div>{<div class="commandpassage">[[Begin ->Combatstart]]</div>} {(set: $badguymaxhealth = 250) (set: $badguyhealth = $badguymaxhealth) (replace: ?badguyhealth)[$badguyhealth] (set: $goodguymaxhealth = 200) (set: $goodguyhealth = $goodguymaxhealth) (replace: ?goodguyhealth)[$goodguyhealth] (set: $badguydefense = 0) (set: $goodguydefense = 0) (set: $startfight = 1) (set:$bottlecount to 3) (set:$timeoutcounter to 20)} (track: 'winmusic', 'fadeout', 1) (track: 'battlemusic', 'fadeout', 1) (track: 'losemusic', 'fadeout', 1) (track: 'lowhp', 'fadeout', 1) (track: 'gameovermusic', 'fadeout', 1) {<div class="header"><img src="Pictures/badguy_portrait.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">(track: 'button', 'playwhenpossible') You run away... this fight isn't going well. Bad Eye laughs as you flee. He's the boss now, how embarrassing. Save your energy and maybe you'll live to fight again another day. </div>}{<div class="commandpassage">[[Continue ->FightingEnd]]</div>} (track: 'battlemusic', 'fadeout', 1) (track: 'lowhp', 'fadeout', 1) (track: 'losemusic', 'loop', true) (track: 'losemusic', 'playwhenpossible'){<div class="header"><img src="Pictures/Intro_blackscene.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">}Made with Twine Harlowe 2.3 Writing, Art, and Design by Mike Yi Ren. (track: 'button', 'playwhenpossible') Music and Sound Effects from Pokemon GB 1998. "Battle Theme", "Victory", "Lavendar Town", "Bonus Track" Composed by Junichi Masuda {</div><div class="commandpassage">}[[Rematch->Quickretry]] [[Restart->BeginCombat]]{</div>} (track: 'winmusic', 'fadeout', 1) (track: 'battlemusic', 'fadeout', 1) (track: 'losemusic', 'fadeout', 1) (track: 'lowhp', 'fadeout', 1) {<div class="fightpassage"> (set: $currentphoto to 10) (replace: ?currentphoto)[$currentphoto] You catch your breath. Now you can pounce again.(track: 'rest', 'playwhenpossible') (set:$bottlecount to 3) (display: "Update Health Bar") </div>}{<div class="commandpassage">[[Continue ->Histurn]]</div>} {(track: 'button', 'playwhenpossible')<div class="header"><img src="Pictures/herocat_portrait.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage"> You are a cat and this is your territory. You fought hard for this Alleyway, marking every corner with your scent. Day and night, rain and shine, you watch over this place you call home. </div>}{<div class="commandpassage">[[Smell the air->Scent]]</div>} { (track: 'music', 'loop', true) (track: 'music', 'playwhenpossible') }{(track: 'button', 'playwhenpossible')<div class="header"><img src="Pictures/badguy_portrait_default.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage"> A rotten smell. Something wicked comes your way. It's Bad Eye the black cat. Bad Eye's been around the block a few times. He's notorious for stealing land... </div>}{<div class="commandpassage">[[Get ready->wantshome]]</div>}{(track: 'button', 'playwhenpossible')<div class="header"><img src="Pictures/Intro_Faceoff.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage"> Today, Bad Eye wants your Alleyway. You won't go down without a fight. You walk up on Bad Eye marking his scent on your wall. It ends right here, right now. </div>}{<div class="commandpassage">[[Fight Bad Eye->beginfight]]</div>} <!-- fade a track out over five seconds --> (track: 'music', 'fadeout', 5){<div class="header"><img src="Pictures/Intro_Faceoff.jpg" class="centerImage" alt="Cat"></div>(track: 'battlemusic', 'loop', true) (track: 'battlemusic', 'playwhenpossible') (go-to:"white")} {(unless: (passage:)'s tags contains "no-header")[ <div class="header"> (live:)[{(if: $currentphoto is 0)[ <img src="Pictures/badguy_defend.jpg" class="centerImage" alt="Cat" > ] (else-if: $currentphoto is 1)[ <img src="Pictures/badguy_pounce_hit.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 2)[ <img src="Pictures/badguy_pounce_miss.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 3)[ <img src="Pictures/badguy_scratch_hit.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 4)[ <img src="Pictures/badguy_scratch_miss.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 5)[ <img src="Pictures/hero_defend.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 6)[ <img src="Pictures/hero_pounce_hit.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 7)[ <img src="Pictures/hero_pounce_missed.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 8)[ <img src="Pictures/hero_scratch_hit.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 9)[ <img src="Pictures/hero_scratch_missed.jpg" class="centerImage" alt="Cat"> ] (else-if: $currentphoto is 10)[ <img src="Pictures/Fight_Default.jpg" class="centerImage" alt="Cat"> ] (else:)[ <img src="Pictures/Fight_Default.jpg" class="centerImage" alt="Cat"> ] (if:$goodguyhealth <50)[ (track: 'lowhp', 'loop', true) (track: 'lowhp', 'playwhenpossible')] }]</div> {<div class ="HP">Bad Eye's HP: (css: "color: black; font-size: 150%")[[$badguyhealth]<badguyhealth|/250 ] <div id="health-barbad">\ <div class="barbad"></div>\ </div>} {Your HP: (css: "color: black; font-size: 150%")[[$goodguyhealth]<goodguyhealth|/200] <div id="health-bar">\ <div class="bar"></div>\ </div></div>} {(if: (passage:)'s name is not "BeginCombat")[ (if: (passage:)'s name is not "Lose" and $goodguyhealth < 1)[(goto: "Lose")] (if: (passage:)'s name is not "Win" and $badguyhealth < 1)[(goto: "Win")] ]}]}(print: "<script>GE.updateHeathBar(" + (text: $goodguymaxhealth) + "," + (text: $goodguyhealth) + ");") (print: "<script>BAD.updateHeathBar(" + (text: $badguymaxhealth) + "," + (text: $badguyhealth) + ");"){<div class="header"><img src="Pictures/goodguy_defeat_walk.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">(track: 'button', 'playwhenpossible') Bad Eye knows it and shuffles away. Reeling from the fight, he limps off. You watch him walk off until you can't smell him anymore. </div>}{<div class="commandpassage">[[Continue ->Win3]]</div>} {<div class="header"><img src="Pictures/herowinportrait.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">(track: 'button', 'playwhenpossible') You've defeated Bad Eye the Black Cat! </div>}{<div class="commandpassage">[[Continue->FightingEnd]]</div>}{<div class="header"><img src="Pictures/badguy_defeat_walk.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">(track: 'button', 'playwhenpossible') There's nothing left to do, but to accept defeat and limp away. Bad Eye smirks as you leave, knowing that he's won. This home is no longer yours. </div>}{<div class="commandpassage">[[Continue ->Lose3]]</div>}{<div class="header"><img src="Pictures/badguy_portrait.jpg" class="centerImage" alt="Cat"></div>}{<div class="passage">(track: 'button', 'playwhenpossible') You've lost to Bad Eye the Black Cat... (set: $winfight to 1) </div>}{<div class="commandpassage">[[Continue ->FightingEnd]]</div>}(set: $badguymaxhealth = 250) (set: $badguyhealth = $badguymaxhealth) (replace: ?badguyhealth)[$badguyhealth] (set: $goodguymaxhealth = 200) (set: $goodguyhealth = $goodguymaxhealth) (replace: ?goodguyhealth)[$goodguyhealth] (set: $badguydefense = 0) (set: $goodguydefense = 0) (set: $startfight = 1) (set:$bottlecount to 3) (set:$timeoutcounter to 10)} (go-to: "beginfight")music: ./Sounds/music.mp3 button: ./Sounds/button.wav battlemusic: ./Sounds/battlemusic.mp3 winmusic: ./Sounds/winmusic.mp3 losemusic: ./Sounds/losemusic.mp3 gameovermusic: ./Sounds/gameover.mp3 defend: ./Sounds/defend.wav dodge: ./Sounds/dodge.wav hit: ./Sounds/hit.wav missed: ./Sounds/missed.wav pounce: ./Sounds/pounce.wav run: ./Sounds/run.wav runfailed: ./Sounds/runfailed.wav rest: ./Sounds/rest.wav lowhp: ./Sounds/lowhealth.wav showControls: false{<div class="header"><img src="Pictures/Intro_Faceoff.jpg" class="centerImage" alt="Cat"></div>(set:_timeoutcounterwhite to 1) (live: .15s)[ (set:_timeoutcounterwhite to it -1) (set:$timeoutcounter to it -1) (if: $timeoutcounter is <0)[(go-to: "Yourturn")] (if: _timeoutcounterwhite is 0)[(go-to: "black")] ]} {<div class="header"><img src="Pictures/blackscreen.jpg" class="centerImage" alt="Cat"></div>(set:_timeoutcounterblack to 1) (live: .15s)[ (set:_timeoutcounterblack to it -1) (set:$timeoutcounter to it -1) (if: $timeoutcounter is <0)[(go-to: "Yourturn")] (if: _timeoutcounterblack is 0)[(go-to: "white")] ]}