mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +02:00
Bandaid fix forecast
This commit is contained in:
parent
8bc6b4b9fa
commit
78401189db
@ -380,9 +380,15 @@ export class Arena {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to trigger all weather based form changes
|
* Function to trigger all weather based form changes
|
||||||
|
* @param source - The Pokemon causing the changes by removing itself from the field
|
||||||
*/
|
*/
|
||||||
triggerWeatherBasedFormChanges(): void {
|
triggerWeatherBasedFormChanges(source?: Pokemon): void {
|
||||||
globalScene.getField(true).forEach(p => {
|
globalScene.getField(true).forEach(p => {
|
||||||
|
// TODO - This is a bandaid. Abilities leaving the field needs a better approach than
|
||||||
|
// calling this method for every switch out that happens
|
||||||
|
if (p === source) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const isCastformWithForecast = p.hasAbility(AbilityId.FORECAST) && p.species.speciesId === SpeciesId.CASTFORM;
|
const isCastformWithForecast = p.hasAbility(AbilityId.FORECAST) && p.species.speciesId === SpeciesId.CASTFORM;
|
||||||
const isCherrimWithFlowerGift = p.hasAbility(AbilityId.FLOWER_GIFT) && p.species.speciesId === SpeciesId.CHERRIM;
|
const isCherrimWithFlowerGift = p.hasAbility(AbilityId.FLOWER_GIFT) && p.species.speciesId === SpeciesId.CHERRIM;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ export class SwitchSummonPhase extends SummonPhase {
|
|||||||
|
|
||||||
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
|
||||||
// Reverts to weather-based forms when weather suppressors (Cloud Nine/Air Lock) are switched out
|
// Reverts to weather-based forms when weather suppressors (Cloud Nine/Air Lock) are switched out
|
||||||
globalScene.arena.triggerWeatherBasedFormChanges();
|
globalScene.arena.triggerWeatherBasedFormChanges(pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
queuePostSummon(): void {
|
queuePostSummon(): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user