Update src/modifier/modifier.ts

Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
This commit is contained in:
innerthunder 2024-09-12 20:24:51 -07:00 committed by GitHub
parent e234bb8546
commit 74ccf84b30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -934,11 +934,7 @@ export class EvolutionStatBoosterModifier extends StatBoosterModifier {
* @returns true if the stat boosts can be applied, false otherwise
*/
shouldApply(args: any[]): boolean {
const holder = args[0];
if (!(holder instanceof Pokemon)) {
return false;
}
return super.shouldApply(args) && !holder.isMax();
return super.shouldApply(args) && !(args[0] as Pokemon).isMax();
}
/**