namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Sand Stream is an ability that creates a sandstorm when the Pokémon enters battle. /// /// Bulbapedia - Sand Stream /// [Script(ScriptCategory.Ability, "sand_stream")] public class SandStream : Script, IScriptOnSwitchIn { /// public void OnSwitchIn(IBattlePokemon pokemon, byte position) { var battleData = pokemon; if (battleData == null) return; if (battleData.Battle.WeatherName == ScriptUtils.ResolveName()) return; EventBatchId batchId = new(); battleData.Battle.EventHook.Invoke(new AbilityTriggerEvent(pokemon)); battleData.Battle.SetWeather(ScriptUtils.ResolveName(), 5, batchId); } }