Fix grounding check not working properly after new changes
parent
cedc1fb3b2
commit
7a508c485a
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue