Implements Chlorophyll
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
17
Scripts/Abilities/DoubleSpeedInWeather.as
Normal file
17
Scripts/Abilities/DoubleSpeedInWeather.as
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Gen7 {
|
||||
[Ability effect=DoubleSpeedInWeather]
|
||||
class DoubleSpeedInWeather : PkmnScript {
|
||||
string _weather;
|
||||
|
||||
void OnInitialize(const BattleLibrary@ library, const narray<EffectParameter@>@ parameters) override {
|
||||
_weather = parameters[0].AsString();
|
||||
}
|
||||
|
||||
void ChangeSpeed(BaseTurnChoice@ choice, uint &inout speed) override {
|
||||
auto weather = choice.User.Battle.GetWeatherName();
|
||||
if (weather == _weather) {
|
||||
speed *= 2;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,7 @@ shared abstract class PkmnScript {
|
||||
void ModifyDamageModifier(ExecutingMove@, Pokemon@, uint8, float &inout){};
|
||||
void OverrideDamage(ExecutingMove@, Pokemon@, uint8, uint &inout){};
|
||||
void OverrideIncomingDamage(ExecutingMove@, Pokemon@, uint8, uint &inout){};
|
||||
void ChangeSpeed(BaseTurnChoice@, uint &inout){};
|
||||
void ChangePriority(MoveTurnChoice@, int8 &inout){};
|
||||
void OnFail(Pokemon@){};
|
||||
void OnOpponentFail(Pokemon@){};
|
||||
|
||||
Reference in New Issue
Block a user