Up to this point everything is golden, but I need to add another if command asking if it won a strength percentile, and if it did, then the token is thrown from the target. It would ask this after it determined the token's target was still alive.
Here's what I have. Individually they work, but once I get about 3 if's deep it doesn't want to work anymore.
Code: Select all
[if(state.Latch == 0),CODE:
{
[h:Essence = Essence - (15)]
[h:bar.Essence = Essence / MaxES]
<b>[r:token.name]</b> latches on to <b>[r:target]</b>, digging in hard with her teeth and dealing <b>[r:round(Strength*Level/2/4)] damage</b>!
[h: setState("Latch", 1)]};
{
[h:status = input(
"alive|Yes|Is your target alive?")]
[h:abort(status)]
[if(alive=="Yes"),CODE:
{
[h:status = input(
"win|Yes|Did you win your Strength Percentile?")]
[h:abort(status)]
[if(win=="Yes"),CODE:
{
<b>[r:token.name]</b> continues her hold on <b>[r:target]</b>, dealing <b>[r:round(Strength*Level/2/4)] damage</b>!
};
{<b>[r:token.name]</b> is thrown off <b>[r:target]</b>!
[h: setState("Latch", 0)]
};]
};
{
<b>[r:token.name]</b> releases her grip on <b>[r:target]</b>!
[h: setState("Latch", 0)]
};]
};]
Code: Select all
[if(win=="Yes"),CODE:
{
<b>[r:token.name]</b> continues her hold on <b>[r:target]</b>, dealing <b>[r:round(Strength*Level/2/4)] damage</b>!
};
{<b>[r:token.name]</b> is thrown off <b>[r:target]</b>!
[h: setState("Latch", 0)]
};]