I'm using YEP_DamageCore and YEP_Auto_Passive_States plugin to create passive states (types) for enemies, such as Beast, Vermin, Aquatic, etc.
I'd like certain weapons to deal 2x damage to an enemy if the state is applied.
EX:
Depth charge weapon would deal 2x damage to Flying and Aquatic type enemies, if they have the Flying or Aquatic state as a passive.
I got this far with help from a friend but it doesn't seem to work, as the damage values in battle are still the same as with another regular weapon.
<damage formula>
const validStates = new Set([114, 115]);
const hasValidState = target.states().some(el => validStates.has(el.id)); if (hasValidState) value = Math.max(a.atk * 3 - b.def, 1); else value = Math.max(a.atk * 1.5 - b.def, 1);
</damage formula>
Link to plugin:
www.yanfly.moe
I'd like certain weapons to deal 2x damage to an enemy if the state is applied.
EX:
Depth charge weapon would deal 2x damage to Flying and Aquatic type enemies, if they have the Flying or Aquatic state as a passive.
I got this far with help from a friend but it doesn't seem to work, as the damage values in battle are still the same as with another regular weapon.
<damage formula>
const validStates = new Set([114, 115]);
const hasValidState = target.states().some(el => validStates.has(el.id)); if (hasValidState) value = Math.max(a.atk * 3 - b.def, 1); else value = Math.max(a.atk * 1.5 - b.def, 1);
</damage formula>
Link to plugin: