Sup, everyone!
I'm currently dealing with 2/3 dillemas to implement some of the basic combat funcionality for a game.
The TP system will cause characters to go into a Passive Stun State for their next turn if they reach 0 TP in their turn. After the one penalty turn, they get +1 TP and the end of the turn, and can act as normal in the following turn.
I made the stun state conditional:
<JS Passive Condition>
condition=user.tp==0;
</JS Passive Condition>
It worked. Then I tried to add a +1TP gain in some shape. TP Regeneration backfired, it made the state never truly apply (the penalty stun turn wouldn't happen since the 1TP immediately cancelled the condition)
I think something on <Erase/Expire> should work, and set the Turn to 1 and setting auto removal on Turn End. But I'm not entirely sure how to write it like that.
Another issue that I'm assuming it could be happening is that it might be constantly checking the condition, so maybe an if (condition) = do nothing, else add state, sorta of thing is needed in the <Passive Condition> part? Or am I over-complicating things and the solution is simpler?
Thanks for your time!
I'm currently dealing with 2/3 dillemas to implement some of the basic combat funcionality for a game.
The TP system will cause characters to go into a Passive Stun State for their next turn if they reach 0 TP in their turn. After the one penalty turn, they get +1 TP and the end of the turn, and can act as normal in the following turn.
I made the stun state conditional:
<JS Passive Condition>
condition=user.tp==0;
</JS Passive Condition>
It worked. Then I tried to add a +1TP gain in some shape. TP Regeneration backfired, it made the state never truly apply (the penalty stun turn wouldn't happen since the 1TP immediately cancelled the condition)
I think something on <Erase/Expire> should work, and set the Turn to 1 and setting auto removal on Turn End. But I'm not entirely sure how to write it like that.
Another issue that I'm assuming it could be happening is that it might be constantly checking the condition, so maybe an if (condition) = do nothing, else add state, sorta of thing is needed in the <Passive Condition> part? Or am I over-complicating things and the solution is simpler?
Thanks for your time!