Hey all, I'd like to make a weapon that has a normal attack which removes a state from an enemy, but am unsure how I can go about this. Any ideas?
Weapon That Removes Status from Enemy
RPG Maker MV SupportYou could kind of do this in the editor by making the weapon apply state_2 which has resistance to state_1, in the Traits area.
The only trick is whether you want the enemy to be able to get state_1 back on their next turn; they wouldn't be able to until state_2 expires (or you can have troop events that run every turn and remove state_2, but there's still a window where it's on and the battler couldn't get their state back, if they're supposed to be able to).
If that's a concern, then the alternative would be using Yanfly's Auto Passive States to put a passive state on the weapon, then that has a Buffs & States notetag that runs when a skill hits.
where 42 is the ID of the state to remove.
The only trick is whether you want the enemy to be able to get state_1 back on their next turn; they wouldn't be able to until state_2 expires (or you can have troop events that run every turn and remove state_2, but there's still a window where it's on and the battler couldn't get their state back, if they're supposed to be able to).
If that's a concern, then the alternative would be using Yanfly's Auto Passive States to put a passive state on the weapon, then that has a Buffs & States notetag that runs when a skill hits.
Code:
<Custom Establish Effect>
target.removeState(42);
</Custom Establish Effect>
Thanks! I'll try that!
Original thread: https://forums.rpgmakerweb.com/threads/weapon-that-removes-status-from-enemy.172780/