Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix weather suppression abilities suppressing weather while ending
Fixes a few issues with protosynthesis as well.
- Loading branch information
1 parent
4e1b3de
commit c2a033b
Showing
3 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,6 +100,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = { | |
this.eachEvent('WeatherChange', this.effect); | ||
}, | ||
onEnd(pokemon) { | ||
pokemon.abilityState.ending = true; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
HoeenCoder
Author
Member
|
||
this.eachEvent('WeatherChange', this.effect); | ||
}, | ||
suppressWeather: true, | ||
|
@@ -544,6 +545,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = { | |
this.eachEvent('WeatherChange', this.effect); | ||
}, | ||
onEnd(pokemon) { | ||
pokemon.abilityState.ending = true; | ||
this.eachEvent('WeatherChange', this.effect); | ||
}, | ||
suppressWeather: true, | ||
|
@@ -3420,11 +3422,11 @@ export const Abilities: {[abilityid: string]: AbilityData} = { | |
this.singleEvent('WeatherChange', this.effect, this.effectState, pokemon); | ||
}, | ||
onWeatherChange(pokemon) { | ||
// Protosynthesis is not affected by Utility Umbrella, or any weather supressing ability | ||
// As a result, we check the weather directly instead of via field#isWeather which calls field#effectiveWeather | ||
if (this.field.weather === 'sunnyday') { | ||
// Protosynthesis is not affected by Utility Umbrella | ||
if (this.field.isWeather('sunnyday')) { | ||
pokemon.addVolatile('protosynthesis'); | ||
} else if (!pokemon.volatiles['protosynthesis']?.fromBooster) { | ||
} else if (!pokemon.volatiles['protosynthesis']?.fromBooster && this.field.weather !== 'sunnyday') { | ||
// Protosynthesis will not deactivite if Sun is suppressed, hence the direct ID check (isWeather respects supression) | ||
pokemon.removeVolatile('protosynthesis'); | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At what point should we do this for all abilities when we send the
End
event?