Fixed flying type being removed in type effectiveness calculation under gravity
parent
08067d9937
commit
1564cc4616
|
|
@ -772,12 +772,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
}
|
||||
}
|
||||
|
||||
if (forDefend && (this.getTag(BattlerTagType.IGNORE_FLYING) || this.scene.arena.getTag(ArenaTagType.GRAVITY) || this.getTag(BattlerTagType.GROUNDED))) {
|
||||
const flyingIndex = types.indexOf(Type.FLYING);
|
||||
if (flyingIndex > -1)
|
||||
types.splice(flyingIndex, 1);
|
||||
}
|
||||
|
||||
if (!types.length) // become UNKNOWN if no types are present
|
||||
types.push(Type.UNKNOWN);
|
||||
|
||||
|
|
@ -908,6 +902,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
return this.isTerastallized() ? 2 : 1;
|
||||
const types = this.getTypes(true, true);
|
||||
|
||||
if (moveType === Type.GROUND && (this.getTag(BattlerTagType.IGNORE_FLYING) || this.scene.arena.getTag(ArenaTagType.GRAVITY) || this.getTag(BattlerTagType.GROUNDED))) {
|
||||
const flyingIndex = types.indexOf(Type.FLYING);
|
||||
if (flyingIndex > -1)
|
||||
types.splice(flyingIndex, 1);
|
||||
}
|
||||
|
||||
const ignorableImmunities = source?.getAbility()?.getAttrs(IgnoreTypeImmunityAbAttr) || [];
|
||||
const cancelled = new Utils.BooleanHolder(false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue