Hello all!
I am new to Twine and SugarCube. I am writing a "Pen and Paper solo adventure" and i am stuck unfortunately. I just can't figure out how i have to use the ifelse loop for a fight. I have several actions during a fight. The question if the player hit the target (Yes/no), then entering the amount of damage the player did via player input, or skip the player input, if the player missed the target and after that the damage the target does to the player. And of course the damage the target does to the player. Here is a not that good example what i mean:
<<if>> $target < 0 (if the target is dead)
Gratulations! You beat the example boss
or $healthpoints < 0
You are dead, noob
<<else>>
Did you hit the target?
<<button Yes >><</button>>
$target -= 5 <<else>>
You hit the target.
The target hits you with XY amount of damage
$lifepoints -= 10
<<else>>
You missed the target!
The target hits you with XY amount of damage
$lifepoints -= 10
I hope this is somehow understandable. It's very hard to explain what i need sonce english isn't my native language. I still hope than someone can help me. I am sitting here since hours but unfortunately i can't really find a usefull guide or how to or video. Can someone please help me?