mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
Fixed type error
This commit is contained in:
parent
32f83bace5
commit
923742639f
@ -2523,9 +2523,9 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
// Related to https://github.com/pagefaultgames/pokerogue/issues/524
|
// Related to https://github.com/pagefaultgames/pokerogue/issues/524
|
||||||
// TODO: Fix once gravity makes pokemon actually grounded
|
// TODO: Fix once gravity makes pokemon actually grounded
|
||||||
if (
|
if (
|
||||||
moveType === PokemonType.GROUND &&
|
moveType === PokemonType.GROUND
|
||||||
types.includes(PokemonType.FLYING) &&
|
&& types.includes(PokemonType.FLYING)
|
||||||
(this.isGrounded() || arena.hasTag(ArenaTagType.GRAVITY))
|
&& (this.isGrounded() || arena.hasTag(ArenaTagType.GRAVITY))
|
||||||
) {
|
) {
|
||||||
types.splice(types.indexOf(PokemonType.FLYING), 1);
|
types.splice(types.indexOf(PokemonType.FLYING), 1);
|
||||||
}
|
}
|
||||||
@ -2536,9 +2536,9 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
// If the target is immune to the type in question, check for effects that would ignore said nullification
|
// If the target is immune to the type in question, check for effects that would ignore said nullification
|
||||||
// TODO: Review if the `isActive` check is needed anymore
|
// TODO: Review if the `isActive` check is needed anymore
|
||||||
if (
|
if (
|
||||||
source?.isActive(true) &&
|
source?.isActive(true)
|
||||||
typeMulti === 0 &&
|
&& typeMulti === 0
|
||||||
this.checkIgnoreTypeImmunity({ source, simulated, moveType, defenderType })
|
&& this.checkIgnoreTypeImmunity({ source, simulated, moveType, defenderType })
|
||||||
) {
|
) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2554,7 +2554,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (
|
if (
|
||||||
!ignoreStrongWinds
|
!ignoreStrongWinds
|
||||||
&& arena.getWeatherType() === WeatherType.STRONG_WINDS
|
&& arena.getWeatherType() === WeatherType.STRONG_WINDS
|
||||||
&& !arena.weather.isEffectSuppressed()
|
&& !arena.weather?.isEffectSuppressed()
|
||||||
&& this.isOfType(PokemonType.FLYING)
|
&& this.isOfType(PokemonType.FLYING)
|
||||||
&& getTypeDamageMultiplier(moveType, PokemonType.FLYING) === 2
|
&& getTypeDamageMultiplier(moveType, PokemonType.FLYING) === 2
|
||||||
) {
|
) {
|
||||||
@ -2623,8 +2623,8 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (enemyTypes.length > 1) {
|
if (enemyTypes.length > 1) {
|
||||||
defScore *=
|
defScore *=
|
||||||
// TODO: Shouldn't this pass `simulated=true` here?
|
// TODO: Shouldn't this pass `simulated=true` here?
|
||||||
1 /
|
1
|
||||||
Math.max(
|
/ Math.max(
|
||||||
this.getAttackTypeEffectiveness(enemyTypes[1], { source: opponent, simulated: false, useIllusion: true }),
|
this.getAttackTypeEffectiveness(enemyTypes[1], { source: opponent, simulated: false, useIllusion: true }),
|
||||||
0.25,
|
0.25,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user