I've tried doing this myself and following guides but i just cannot fiddle the riddle. What i'm trying to do is make a skill that deals more damage if an enemy is afflicted by a certain state, then remove that state, and add a separate state to the attacker. I figured out how to get the first part done with a very helpfull guide, although i didnt quite get an understanding of how exactly i got it to work. And even while re-reading the guide 5 times over i just couldn't get the state to apply to the attacker. Your guidance would be apreciated, thanks for your time.
Damage formula assistance
RPG Maker MZ SupportTry this, but note that the states are removed/added BEFORE the damage is applied to the target:
Formula box:
1. Replace xxx with the state the target should have to do the extra stuff
2. Replace yyy with the state to add to the attacker if the target has state xxx.
3. Replace DAMAGE_FORMULA_iF_STATE_PRESENT with the formula you want to use if the state was on the target.
4. Replace NORMAL_DAMAGE_FORMULA with the formula to use if the state wasn't present.
Edit: Note that the formula box isn't the best approach for this, but it works without requiring any plugins.
Formula box:
Code:
const hasState = b.isStateAffected(xxx); if (hasState){ b.removeState(xxx); a.addState(yyy); } hasState ? (DAMAGE_FORMULA_iF_STATE_PRESENT) : (NORMAL_DAMAGE_FORMULA)
1. Replace xxx with the state the target should have to do the extra stuff
2. Replace yyy with the state to add to the attacker if the target has state xxx.
3. Replace DAMAGE_FORMULA_iF_STATE_PRESENT with the formula you want to use if the state was on the target.
4. Replace NORMAL_DAMAGE_FORMULA with the formula to use if the state wasn't present.
Edit: Note that the formula box isn't the best approach for this, but it works without requiring any plugins.
Original thread: https://forums.rpgmakerweb.com/threads/damage-formula-assistance.174921/