diff --git a/Abilities.json b/Abilities.json index 0a3504b..dd79e99 100644 --- a/Abilities.json +++ b/Abilities.json @@ -59,9 +59,12 @@ "effect": "Bulletproof" }, "cheek_pouch": { - + "effect": "CheekPouch" + }, + "chlorophyll": { + "effect": "DoubleSpeedInWeather", + "parameters": ["HarshSunlight"] }, - "chlorophyll": {}, "clear_body": {}, "cloud_nine": {}, "color_change": {}, diff --git a/Scripts/Abilities/DoubleSpeedInWeather.as b/Scripts/Abilities/DoubleSpeedInWeather.as new file mode 100644 index 0000000..b8f0162 --- /dev/null +++ b/Scripts/Abilities/DoubleSpeedInWeather.as @@ -0,0 +1,17 @@ +namespace Gen7 { + [Ability effect=DoubleSpeedInWeather] + class DoubleSpeedInWeather : PkmnScript { + string _weather; + + void OnInitialize(const BattleLibrary@ library, const narray@ 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; + } + }; + } +} \ No newline at end of file diff --git a/Scripts/Interfaces/PkmnScript.as b/Scripts/Interfaces/PkmnScript.as index 46c7389..9ebb692 100644 --- a/Scripts/Interfaces/PkmnScript.as +++ b/Scripts/Interfaces/PkmnScript.as @@ -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@){}; diff --git a/fetch_tester.sh b/fetch_tester.sh index ee74028..9c05ff8 100755 --- a/fetch_tester.sh +++ b/fetch_tester.sh @@ -1,6 +1,6 @@ #!/bin/sh -TESTERVERSION=0.0.15 +TESTERVERSION=0.0.16 # Get the release information from the api for the specified version curl -X GET "https://git.p-epsilon.com/api/v1/repos/Deukhoofd/PokemonScriptTester/releases/tags/$TESTERVERSION" -H "accept: application/json" |