namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Primordial Sea is an ability that creates heavy rain when the Pokémon enters battle and prevents Fire-type moves from being used. /// /// Bulbapedia - Primordial Sea /// [Script(ScriptCategory.Ability, "primordial_sea")] public class PrimordialSeaAbility : Script, IScriptOnSwitchIn { /// public void OnSwitchIn(IPokemon pokemon, byte position) { var battle = pokemon.BattleData?.Battle; if (battle == null) return; battle.SetWeather(ScriptUtils.ResolveName(), -1); if (battle.WeatherName == ScriptUtils.ResolveName()) { ((Weather.PrimordialSea)battle.WeatherScript.Script!).MarkAsPlaced(pokemon); battle.EventHook.Invoke(new AbilityTriggerEvent(pokemon)); } } }