Guard against any attack?

Trying to make a skill that protects my party against any attack, but I need it to be usable only once per battle.
Suggestions?
Give it a State that lasts 1 turn (or however long), has a Physical Damage Rate of 0%, Magical Damage Rate of 0%, State Rate of 0% for all negative states, and have the skill apply that state to all allies.

Then, also create a State that Seals this skill. Have the only Remove Timing on this state be "Remove at End of Battle". Either have a damage formula deal 0 damage and apply this state to the user - the formula you'd use is a.add_state(n); 0 where n is the State ID of the state that seals the skill... or, if you know which character is using the skill, simply create a Common Event that applies this State to the skill user, and add that Common Event to the skill.
Like this?
No. Use State RATE, not Add State. And "Physical Damage Rate" and "Magical Damage Rate" are on a different tab - I believe the abbreviations are PDR and MDR.
I need it to be usable only once per battle.
Regarding this matter, uou need Yanfly Skill Restriction script.
Can u post link to that?
Can u post link to that?
Learn how to use google, type "Yanfly Skill Restriction RGSS3"
But here: https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-restrictions/
Gotcha
thanks
Unless I'm forgetting something, you don't need yanfly to restrict it to once per fight. Have the skill also add a state to all allies that does nothing but seal that one skill, and click the "remove at battle end" box. Make sure there's no other way to remove the state, and maybe make sure the priority is at 0 so that the empty icon isn't getting in the way.

Original thread: https://forums.rpgmakerweb.com/threads/guard-against-any-attack.112604/