Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

What's wrong with my coding I'm using 2.0 Harlowe

$
0
0
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]]
[[flee|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]]
[[flee|main]] ]
]

Viewing all articles
Browse latest Browse all 1844

Trending Articles