Is This Shield State Concept Possible?

State-affecting plugins I'm using: Yanfly's Buffs & States Core, HIME's State Change Animations, & Sumrndmdde's State Popups.

There's a state I'd like to apply to a battler that would nullify/block the damage from a certain among of attacks. For example, you apply this defensive state, we'll say a magic shield, and it will completely negate the damage from the next three attacks, no matter what they are. As such, a simple Barrier state wouldn't really cut it if I wanted to stay true to that concept, since it would limit the damage negation by a specific number. I've tried to think of a few ways to get this to work, but unfortunately I just can't seem to come up with a solution. Is such a state possible? I'd appreciate any guidance and/or ideas on how to get around this if it's not doable ^_^
You only want it to block a specific amount of damage? Or the shield automatically disperses after a specific amount of damage taken? Making a state like these is not really hard, since you are using Yanfly's Buffs & States. Could you provide me more detail about it?
You only want it to block a specific amount of damage? Or the shield automatically disperses after a specific amount of damage taken? Making a state like these is not really hard, since you are using Yanfly's Buffs & States. Could you provide me more detail about it?

Thanks for replying. It's not exactly that I'd like to negate a certain threshold of damage, but three consecutive attacks regardless of the amount of damage received. So let's say the Boss has two attacks, one deals 100 damage, and one that deals 1,000 damage. If I use a Barrier state, say 300 points' worth, then it would mitigate 3 attacks worth 100 damage, but if the Boss uses the big attack, it would only mitigate 300 points of it, and the Actor would still suffer 700 points of damage.
What I'm looking for is this: the Actor applies this state, and no damage is sustained from the next three attacks, whether they're each 100 points of damage, or whether they're all 1,000 points of damage. I hope this clarifies it a bit more.
So the actor will completely nagate all damage in the next three attacks, right? I can make a state which nagates all damage taken, and will automatically be removed after three attacks (or after some turns you set in database). Here is the piece of codes for your state note box:
Code:
<Custom Apply Effect>
target._attackCounter = target._attackCounter || 0;
</Custom Apply Effect>

<Custom React Effect>
if (value > 0 && target._attackCounter < 3){
target._attackCounter += 1;
value = 0;
if (target._attackCounter >= 3){
target.removeState(x); //Change X to your state ID
target._attackCounter = undefined;}}
</Custom React Effect>

<Custom Remove Effect>
target._attackCounter = undefined;
</Custom Remove Effect>
So the actor will completely nagate all damage in the next three attacks, right? I can make a state which nagates all damage taken, and will automatically be removed after three attacks (or after some turns you set in database). Here is the piece of codes for your state note box:
Code:
<Custom Apply Effect>
target._attackCounter = target._attackCounter || 0;
</Custom Apply Effect>

<Custom React Effect>
if (value > 0 && target._attackCounter < 3){
target._attackCounter += 1;
value = 0;
if (target._attackCounter >= 3){
target.removeState(x); //Change X to your state ID
target._attackCounter = undefined;}}
</Custom React Effect>

<Custom Remove Effect>
target._attackCounter = undefined;
</Custom Remove Effect>

Thank you so much! It works beautifully well! ^_^

Original thread: https://forums.rpgmakerweb.com/threads/is-this-shield-state-concept-possible.83727/