I decided to make an rpg text battle adventure whatever.. I was bored, anyway all was going swell till I tried to implement a critical damage system where the hero/monster has a chance to deal basically critical damage x5 as much as regular I decided to try it only for the monster but it isn't working out this is my first time using twine so I don't know really, here's a copy of my code:
(if: (either: 0, 1) is 0)[
The ghoul takes a bite
(set: $hp to $hp - (if: (either:"yes","no") is "yes") [(random: 5,10)] is "no" [(random: 5,10)*5]))
(if: $hp < 1)[
You barely escape!]
(else:)[ Your health is $hp.
fight
main ]
]
(else:)[ You hit the ghoul somehow!
(set:$ghoul_hp = $ghoul_hp - (random: 5,10))
(if: $ghoul_hp < 1)[
What..What the hell are you!]
(else:)[
Its health is $ghoul_hp.
fight
main ]
]
Comments
(if: (either: 0, 1) is 0)[
The ghoul takes a bite
(set: $hp to $hp - $damage1) (set: $damage1 to (either:(random: 5,10),((random: 5,10)*5)))
(if: $hp < 1)[ You barely escape!]
(else:)[ Your health is $hp.
fight
main ]
]
(else:)[ You hit the ghoul somehow!
(set:$ghoul_hp = $ghoul_hp - $damageh) (set: $damageh to (either:(random: 5,10),((random: 5,10)*5)))
(if: $ghoul_hp < 1)[ What..What the hell are you!]
(else:)[
Its health is $ghoul_hp.
fight
main ]
]