Fix grounding check not working properly after new changes

This commit is contained in:
Flashfyre 2024-03-28 10:35:18 -04:00
parent cedc1fb3b2
commit 7a508c485a
1 changed files with 3 additions and 3 deletions

View File

@ -671,8 +671,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return types; return types;
} }
isOfType(type: Type): boolean { isOfType(type: Type, forDefend: boolean = false): boolean {
return !!this.getTypes(true).find(t => t === type); return !!this.getTypes(true, forDefend).find(t => t === type);
} }
getAbility(ignoreOverride?: boolean): Ability { getAbility(ignoreOverride?: boolean): Ability {
@ -718,7 +718,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
isGrounded(): boolean { isGrounded(): boolean {
return !this.isOfType(Type.FLYING); return !this.isOfType(Type.FLYING, true);
} }
getAttackMoveEffectiveness(source: Pokemon, move: PokemonMove): TypeDamageMultiplier { getAttackMoveEffectiveness(source: Pokemon, move: PokemonMove): TypeDamageMultiplier {