Folks,
I'm working on a mechanic that manages a state (states) depending on the current TP.
It's like a Limit Breaker that adds buffs/debuffs, hence the states, as it goes up.
So I need constant checks whenever TP is altered (action, damage, items etc.) and for the state to replace the previous one, as they're "same" state but getting better (at 25% the buff is X, at 50% the buff is Y, etc.).
It kinda looks like this:
0-24% = no States, removes States 1-4
25-49% = add State 1, removes States 2-4
50-74% = add State 2, removes States 1, 3, 4
75-99% = add State 3, removes States 1, 2, 4
100% = add State 4, removes States 1-3
The states should be applied instantly as soon as there's any TP alteration.
What's the best way to go about this?
I'm working on a mechanic that manages a state (states) depending on the current TP.
It's like a Limit Breaker that adds buffs/debuffs, hence the states, as it goes up.
So I need constant checks whenever TP is altered (action, damage, items etc.) and for the state to replace the previous one, as they're "same" state but getting better (at 25% the buff is X, at 50% the buff is Y, etc.).
It kinda looks like this:
0-24% = no States, removes States 1-4
25-49% = add State 1, removes States 2-4
50-74% = add State 2, removes States 1, 3, 4
75-99% = add State 3, removes States 1, 2, 4
100% = add State 4, removes States 1-3
The states should be applied instantly as soon as there's any TP alteration.
What's the best way to go about this?