Buffs at the start of the battle: Passive Effect

Hi everyone, I was wondering if, using Yanfly's Passive Skills plugins, could be possible to make a skill with the following effect:

"if the user is in the battle, all party members gain an attack buff at the beginning of the battle"

Thank you in advance for your help.
doesn't even needs a plugin, just have one troop event in every troop run on turn 0 and check for the member before adding the buff.
With Auto Passive States (YEP), you would need to put this in the state's Note box:
Code:
<Custom Passive Condition>
var actor = $gameActors.actor(1);
if ($gameParty.members().contains(actor)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
Change the number in $gameActors.actor(1) to reflect which actor is required to be in the party for the state to activate.

You will still need to add the <Passive State: x> tag to the Note box of the Actors or Classes who you want to benefit from the state.

Passive Aura Effects (YEP) may also do what you're trying to achieve. Give it a look.

Alternatively, if you want to use Andar's suggestion, I would recommend checking out Base Troop Events (YEP). This will allow you to configure a global troop event that can be used to apply your state. Otherwise, you'll need to edit the events of every single troop if you need to change your state's application conditions in the future.
Thank you for answering me

Code:
<Custom Passive Condition>
var actor = $gameActors.actor(1);
if ($gameParty.members().contains(actor)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

When I try to test the game with this code in the state notetag, it freezes.
Also I don't have Base Troop Events, so i can't use Andar's suggestion.
Also I don't have Base Troop Events, so i can't use Andar's suggestion.
you don't NEED base troop events for my suggestion, it would only make things easier.

You don't need ANY plugin for my suggestion, you would only have to place the troop event in every troop in the database.

And that is where the base troop event plugin would help - that plugin copies the troop events from the base troop to every troop, so you would only have to place that plugin once.
Without that plugin, you'll have to copy the troop event everywhere and make sure to add it whenever you create a new troop.

Original thread: https://forums.rpgmakerweb.com/threads/buffs-at-the-start-of-the-battle-passive-effect.121618/