mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 06:52:16 +02: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
|
* @param args - unused
|
||||||
*/
|
*/
|
||||||
override canApplyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
|
override canApplyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
|
||||||
const fc = (pokemonFormChanges[pokemon.species.speciesId]?.filter(
|
return !!pokemonFormChanges[pokemon.species.speciesId]?.some(
|
||||||
fc => fc.findTrigger(SpeciesFormChangeWeatherTrigger) && fc.canChange(pokemon)
|
fc => fc.findTrigger(SpeciesFormChangeWeatherTrigger) && fc.canChange(pokemon),
|
||||||
) || [])[0];
|
);
|
||||||
return !isNullOrUndefined(fc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user