Hello! I am looking for a way to create a state that, rather than making the target immune to states under the "Ailment" category, it prevents the next time that one of those states is added to the target, then the state removes itself. If anyone has played Etrian Odyssey 3, I am basically looking for a way to replicate the effect of the skill "Prevent Order" of the Sovereign class.
I am using a few Yanfly Engine plugins. I'm trying to use as few as possible, but, I do have all of them available if needed.
I already tried using the Buff&States Core Plugin to add this to each "Ailment" state:
(42 is the stateId of the "Prevention" state.)
However, that had the unfortunate consequence of removing the "Ailment" state even when it was already applied. For example:
If at all possible, it would be even better if I could affix this kind of prevention effect to the Prevention state itself, just so I don't have to go to every single "Ailment" state and copypaste a bunch of code.
Also, I do have the State Categories plugin, and I did assign the "Ailment" category to the "Ailment" states, but I haven't managed to take advantage of state categories in any meaningful way yet when it comes to this effect. Thanks in advance for your time!
I am using a few Yanfly Engine plugins. I'm trying to use as few as possible, but, I do have all of them available if needed.
I already tried using the Buff&States Core Plugin to add this to each "Ailment" state:
JavaScript:
<Custom Apply Effect>
// Check if target is affected by Prevention.
if user.isStateAffected(42) {
// Remove this state.
user.removeState(stateId);
// Remove Prevention.
user.removeState(42);
}
</Custom Apply Effect>
However, that had the unfortunate consequence of removing the "Ailment" state even when it was already applied. For example:
- - Enemy 1 afflicts Actor 1 with the "Poison" state for 3 turns.
- - Actor 2 grants Actor 1 the "Prevention" state. Actor 1's "Poison" state is still active for 3 turns.
- - Enemy 2 tries to extend the duration of Actor 1's Poison by 3 more turns by trying to inflict the Poison state again. However, the Custom Apply Effect kicks in: Actor 1 is cured of ALL Poison (even the Poison they already had), rather than simply preventing the new infliction and still being affected by Poison for 3 turns.
If at all possible, it would be even better if I could affix this kind of prevention effect to the Prevention state itself, just so I don't have to go to every single "Ailment" state and copypaste a bunch of code.
Also, I do have the State Categories plugin, and I did assign the "Ailment" category to the "Ailment" states, but I haven't managed to take advantage of state categories in any meaningful way yet when it comes to this effect. Thanks in advance for your time!