namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Electric Surge is an ability that creates Electric Terrain when the Pokémon enters battle. /// This terrain prevents grounded Pokémon from falling asleep and boosts Electric-type moves. /// This ability is exclusive to Tapu Koko. /// /// Bulbapedia - Electric Surge /// [Script(ScriptCategory.Ability, "electric_surge")] public class ElectricSurge : Script { /// public override void OnSwitchIn(IPokemon pokemon, byte position) { var battleData = pokemon.BattleData; if (battleData == null) return; EventBatchId batchId = new(); battleData.Battle.EventHook.Invoke(new AbilityTriggerEvent(pokemon) { BatchId = batchId, }); battleData.Battle.SetTerrain(ScriptUtils.ResolveName(), batchId); } }