CONDITIONAL STATE REMOVE BY DAMAGE

RPG Maker VX Ace

Remove states by elemental weakness, specific element etc.

This script alters the "remove by damage" flag on states by giving some
extra options about what sort of damage removes the state.

Instructions

Install this script in the usual way by inserting below Materials in the script editor.

In the database, add the following note tags to states with the
"remove by damage" flag set:

<remove by weakness>
Damage will only remove the state if the damage element is one which the target is weak against. (An element rate of > 100% or 1.0)

This could be used to implement a "guard break" type effect where hitting
an enemy with its weakpoint removes a defensive state and leaves it open to
other damage sources.

<remove by strength>
Damage will only remove the state if the damage element is one which the
target is strong against. (An element rate of < 100% or 1.0)

This is the opposite of remove by weakness, I'm sure you'll think of a use
for it.

<remove by element:id>
Damage will only remove the state if it is of the specified type.
This tag can be specified multiple times, in which case any of the matching
damage types will work.

This could be used for something like an Icy Aura which needs to be hit with
fire damage to remove. A common thing for puzzle bosses in RPGs.

Script calls for lunatics

@result.element_id contains the element type used
@result.element_rate contains the overall element rate

You may be able to use these in combination with another script like Yanfly's
Lunatic States for more hidden fun stuff.

Conflicts
This script overrides (replaces) the Game_Battler::remove_states_by_damage
method. Other scripts that do the same thing are likely to conflict without
editing.
Other scripts that hook this method may work by placing after this script.

Terms of Use
This script may be used in your games, including commercial.
It may not be re-sold other than embedded in a game.
Please credit as Coelocanth.