Hello, I would like to have a skill check the target battler for a state, and if true, apply another state. This is to create a cumulative state effect, where each is more powerful than the last (with a total of 10 stacks possible).
I'm using Yanfly's Skill Core to try and solve this problem, but I'm struggling to get it working correctly. The code below is essentially what I want to put into the skill note tag, but I couldn't get it working as a custom effect.
For what it's worth, I'm also using Shaz's state add/remove commands so that when a higher state is applied, a lower one is removed automatically.
I'm using Yanfly's Skill Core to try and solve this problem, but I'm struggling to get it working correctly. The code below is essentially what I want to put into the skill note tag, but I couldn't get it working as a custom effect.
For what it's worth, I'm also using Shaz's state add/remove commands so that when a higher state is applied, a lower one is removed automatically.
Code:
if (target.isStateAffected(208)) { target.addState(209); }
else if (target.isStateAffected(209)) { target.addState(210); }
else if (target.isStateAffected(210)) { target.addState(211); }
else if (target.isStateAffected(211)) { target.addState(212); }
else if (target.isStateAffected(212)) { target.addState(213); }
else if (target.isStateAffected(213)) { target.addState(214); }
else if (target.isStateAffected(214)) { target.addState(215); }
else if (target.isStateAffected(215)) { target.addState(216); }
else if (target.isStateAffected(216)) { target.addState(217); }