- Joined
- Feb 22, 2016
- Messages
- 2,788
- Reaction score
- 2,232
- First Language
- English
- Primarily Uses
- RMMV
Is there a way for me to utilize both conditionally? Basically, I want a state to do X if removed, or do Y if turn decayed. What should I put in an "if" statement in order to do this? Is this even possible? I mean, it must be possible since those 2 tags exist, thus there must be a way to differentiate whether a state is removed via turn decay vs other means. If I can find the proper conditional, then I'd only have to use <Custom Remove Effect>.
Edit:
For context, the skill in question is called "Arrow to the Knee" (
), which causes the target to be immobilized for 1 turn and slowed for 3 turns. Thus, I need to create a state that lasts 1 turn, which then adds another state that lasts 2 more turns when the 1st state turn decays down to 0 turns. However, this should only occur if the 1st state is removed via turn decay and not by some other means. This is what I got so far...
State100:
State101:
It's pretty messy, so I'd love to have a conditional that can distinguish whether the state is being removed by turn decay vs other means.
Edit:
For context, the skill in question is called "Arrow to the Knee" (
State100:
JavaScript:
<letbs> //this makes it so the target cannot move
move_scope: circle(0)
</letbs>
<Custom Apply Effect> //this reduces the target's Speed (LUK) by 1/3 the caster's Dexterity (AGI)
var knee = Math.round(origin.agi / 3);
target._knee = target._knee || 0;
target._knee += knee; //it is also stackable, further reducing Speed when reapplied
target.minusLuk(knee);
</Custom Apply Effect>
<Custom Remove Effect>
target.addLuk(target._knee);
target._knee2 = target._knee;
delete target._knee;
</Custom Remove Effect>
<Custom Leave Effect>
target.addState(101); //state 101 is basically just this state w/o the immobilization
</Custom Leave Effect>
JavaScript:
<Custom Apply Effect>
target.minusLuk(target._knee2);
</Custom Apply Effect>
<Custom Remove Effect>
target.addLuk(target._knee2);
delete target._knee2;
</Custom Remove Effect>
It's pretty messy, so I'd love to have a conditional that can distinguish whether the state is being removed by turn decay vs other means.
Last edited: