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
a. What is meant to happen if the defensive options (Roll and Block) are selected?
b. Your fight is very unbalanced, the boss has a 66% chance of killing you with a single hit each round, but the player only has a 33% chance of doing 10,000 points of damage each round and they have to be successful five time in a row to kill the boss. c. If the player is doing a set amount of damage (eg. 10,000 => 20% of 50000) then the number of rounds does not matter.
C) So, that would mean I can still add something like "The Dragon is pissed, he then tries to claw you", and change it as the fight goes on?
Also, I have a passage where if you die on the boss, you go there and restart the fight, I can make it go there after you die? I named that passage "Death Room"
Edit: The health would stay at 40000 even if its successful, is this a bug?
That example was not meant to be a solution, it was just meant to show you the steps required to determine randomly if the player hit the boss or the boss hit the player. If you want to use that example then Just place the (set: $bossHP to 50000) line in a prior passage to setup the health of the boss.
RE: A. It is unusual for a defensive action to deal the same amount of damage as an attack but if that is what you want then just use the combat example in point B. for each of the three options.
RE: B. As an example of how hard it will be for the player to win against the boss, add the following to the first passage of a Harlowe Twine project, Run the story and keep using the web-browser's refresh button (or F5) until you get five 1's.
(it may take a while!) RE: C. If you want to go to a different passage when the player dies then change the (else:) line in the point B. example to:
I am not sure if having each ability a 50 /50 chance of hitting would be easier, so then it would have a Success line and a Defeat line at an equal chance. Is that an easier option than doing it this way?
eg.
a. Based on a 33% to hit and five hits to kill the boss, the player has a 1 in 243 chance to win. (3x3x3x3x3) = 243 possible permutation of 1,2, and 3
b. Based on a 50% to hit and five hits to kill the boss, the player has a 1 in 32 chance to win. (2x2x2x2x2) = 32 possible permutation of 1 and 2
btw: The background image of your story current requires a person to be logged into the sharepoint site for it to be seen, because of this I was unable to read the yellow text on white background without modifying the story first.