How could I make a state that makes the actor have increased attack but then it's removed after the actor deals damage?
One Time Damage Bonus State
RPG Maker MZ SupportGive the state a Trait that increases Attack, and a duration of 1 action?
Or are you concerned that the next skill won't necessarily hit? Or they have some way to inflict damage between turns?
Or are you concerned that the next skill won't necessarily hit? Or they have some way to inflict damage between turns?
You can set states to have a duration of 1 action but I'm assuming you want it to remain if they don't attack?
In that case, best solution I have is to have all of said Actor's attacks trigger a Common Event that removes that state from the actor and set Auto-remove to None. If you want this to be a state that can be thrown on anyone, have fun doing that for every attack. If it's specific to a certain actor and you're not going overboard with the number of skills, it's not too bad.
In that case, best solution I have is to have all of said Actor's attacks trigger a Common Event that removes that state from the actor and set Auto-remove to None. If you want this to be a state that can be thrown on anyone, have fun doing that for every attack. If it's specific to a certain actor and you're not going overboard with the number of skills, it's not too bad.
@Big_D It would be much easier to use a simple plugin. If the OP wants the state to persist for as long as it takes for the actor to deal damage once, you'd give it an unlimited duration, install Yanfly's Buffs & States Core, and put the notetag in the state:
Code:
<Custom Confirm Effect>
if (this.isDamage() && value > 0)
user.removeState(stateId);
</Custom Confirm Effect>
I have returned to tell that this is MZ support, so he'll need VisuStella.
Oh my freaking gosh...that's twice in the span of a day!
So you can check out VisuStella's Battle Core for the appropriate plugin, or if you'd like something lighter weight you can use my Eval Tags plugin, linked in my signature.
Hah yeah 🙂, I just mentioned it, because I think the notetag there is different.
Yeah. So is the syntax, slightly, they don't have stateId.
For my Eval Tags, the notetag would be:
For my Eval Tags, the notetag would be:
Code:
<Action Hit Eval>
if (skill.isDamage() && value > 0)
user.removeState(state.id);
</Action Hit Eval>
Since I am already using Battle Core, I used:
<JS Post-Damage as User>
if (value > 0){
user.removeState(24);
}
</JS Post-Damage as User>
I'd suggest leaving the check for
this.isDamage() so that it doesn't go off from a healing skill. But that may not apply to your game.I was trying to figure out how to do that (Forgot the this) but at least when the skill was targetting enemies, it didn't use up the state. I will add it though.
Original thread: https://forums.rpgmakerweb.com/threads/one-time-damage-bonus-state.168234/