namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Leaf Guard is an ability that prevents status conditions in harsh sunlight. /// /// Bulbapedia - Leaf Guard /// [Script(ScriptCategory.Ability, "leaf_guard")] public class LeafGuard : Script { /// public override void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted, ref bool preventStatus) { if (pokemon.BattleData?.Battle.WeatherName != ScriptUtils.ResolveName()) return; if (selfInflicted) return; preventStatus = true; } }