mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-24 10:39:15 +01:00
Simplify PostSummonFormChangeByWeather's canApplyPostSummon
This commit is contained in:
parent
2d2420aaaa
commit
45499a2e59
@ -3979,10 +3979,9 @@ export class PostSummonFormChangeByWeatherAbAttr extends PostSummonAbAttr {
|
||||
* @param args - unused
|
||||
*/
|
||||
override canApplyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
|
||||
const fc = (pokemonFormChanges[pokemon.species.speciesId]?.filter(
|
||||
fc => fc.findTrigger(SpeciesFormChangeWeatherTrigger) && fc.canChange(pokemon)
|
||||
) || [])[0];
|
||||
return !isNullOrUndefined(fc);
|
||||
return !!pokemonFormChanges[pokemon.species.speciesId]?.some(
|
||||
fc => fc.findTrigger(SpeciesFormChangeWeatherTrigger) && fc.canChange(pokemon),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user