A "Rage" State? (Taking damage buffs Attack)

Hey all! Basically what I said-- I want to make a pretty standard "rage" or "berserk" effect (different than what MZ calls rage) where, if the user gets hit, they gain another attack buff. Right now, this is what I have: a move that applies a state and event. I've tested this out (gave every other party member hide), and it doesn't seem to be applying the buff. Anyone see anything I'm missing?

Thanks!

P.S.: This move adds a buff for 5 turns simply upon using it; I took that away to make sure getting hit was actually applying a buff (it wasn't)!

1691031950490.png


1691032064700.png
That event will never have an effect, because it runs after all other skill effects have completed. It stores that actor's HP, then immediately checks "is their HP more than this value?"...no, it's equal. For your approach, you'd need to store the HP value before damage is applied, then check against that value. Also, it only runs the event when you use the skill: it's not like you're "giving" the event to the target or something.

Instead, I suggest looking for a plugin that supports "on hit" reactions, e.g. VisuStella Battle Core:
With that plugin, you could try putting a tag like this in your Rage state's notebox:
JavaScript:
<JS Post-Damage as Target>
if (value > 0) {         // if target took damage
  target.addBuff(2, 1);  // give target a 1-turn ATK buff
}
</JS Post-Damage as Target>
👋
Thank you! I'm realizing those issues as well. I haven't added Visustella yet but realizing it's time. In general, though, do you think making the event run from Turn 0 in the troop is a better way of making it always check if the enraged player is getting hit, rather than just tacking the event on to the skill itself?

Thanks again!
A Turn 0 troop event will run on Turn 0, i.e. before the first player input phase. As mentioned, to manually event a "did they take damage" check, you'd need to get their HP just before the action applies to them. It may be possible to do that without a plugin (setting a variable in the damage formula and resetting it in the common event?), but I think it'd be more trouble than it's worth. 😴

There may be other plugins that offer this kind of script trigger.

Original thread: https://forums.rpgmakerweb.com/threads/a-rage-state-taking-damage-buffs-attack.159978/