using PkmnLib.Plugin.Gen7.Scripts.Battle; namespace PkmnLib.Plugin.Gen7.Scripts.Moves; [Script(ScriptCategory.Move, "uproar")] public class Uproar : Script { /// public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit) { var battle = move.Battle; foreach (var pokemon in battle.Sides.SelectMany(x => x.Pokemon).WhereNotNull()) { if (pokemon.HasStatus(ScriptUtils.ResolveName())) { pokemon.ClearStatus(); } } var script = battle.Volatile.Add(new UproarEffect()); if (script?.Script is UproarEffect uproarEffect) { uproarEffect.SetPlacer(move.User); } } }