15 lines
506 B
ActionScript
15 lines
506 B
ActionScript
|
namespace Gen7 {
|
||
|
class SuppressWeatherAbility : PkmnScript {
|
||
|
void OnSwitchIn(Pokemon@ pokemon) override {
|
||
|
pokemon.Battle.SuppressWeather();
|
||
|
pokemon.Battle.AddVolatile("SuppressWeather");
|
||
|
};
|
||
|
|
||
|
void OnRemove() override {
|
||
|
auto battle = cast<Pokemon@>(GetOwner()).Battle;
|
||
|
battle.UnsuppressWeather();
|
||
|
auto script = cast<SuppressWeather>(battle.GetVolatile("SuppressWeather"));
|
||
|
script.Unstack();
|
||
|
}
|
||
|
}
|
||
|
}
|