Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

5 Round Boss Fight (Harlowe)

edited January 2016 in Help! with 2.0
Say you have your health at 5000, and boss health at 50000, the fight goes on for 5 rounds, each dealing 20% damage. You have 3 options, and they give you a random chance of striking the boss or you dying in one hit. Say the options are Lunge, Roll and Block.

What I want is to have the 3 passages coming off each round to have a 1:2 chance of Win:Lose, and then it displays either the Winning passage, which then goes to the next round, or the Losing passage where you then restart the boss fight.

Comments

  • You can use sugarcube's random function within a click macro.
    <<nobr>>
    <<click "Lunge">>
    	<<if random(1, 2)<2>>
    		<<set $BossHP -=50000*0.2>>
    		<<if $BossHP>0>>
    			<<goto "Win Round">>
    		<<else>>
    			<<goto "Win Battle">>
    		<<endif>>
    	<<else>>
    		<<goto "Lose Battle">>
    	<<endif>>
    <</click>>
    
    <<set $round++>>
    <<if $round>6>>
    	<<goto "Lose Battle">>
    <<endif>>
    <<endnobr>>
    

    Something like this should work, just copy the first code chunk and replace the text within " " to generate links with different text but identical function. Don't forget to initialize the variables before hand and outside the battle passages, so you don't top off the boss hp during the rounds.
Sign In or Register to comment.