namespace PkmnLib.Plugin.Gen7.Scripts.Side; [Script(ScriptCategory.Side, "flower_veil")] public class FlowerVeilEffect : Script, IScriptPreventStatBoostChange { private readonly HashSet _placerPokemon = []; public void OnAdded(IPokemon placer) { _placerPokemon.Add(placer); } public void OnRemoved(IPokemon placer) { _placerPokemon.Remove(placer); if (_placerPokemon.Count == 0) { RemoveSelf(); } } /// public void PreventStatBoostChange(IPokemon target, Statistic stat, sbyte amount, bool selfInflicted, ref bool prevent) { if (selfInflicted) return; if (amount > 0) return; if (target.Types.All(x => x.Name != "grass")) return; prevent = true; } /// public override void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted, ref bool preventStatus) { if (selfInflicted) return; if (pokemon.Types.All(x => x.Name != "grass")) return; preventStatus = true; } }