From e94b17bbf55958815aa0f7c120c5812ea0992a75 Mon Sep 17 00:00:00 2001 From: Temps Ray Date: Fri, 19 Apr 2024 13:03:19 -0400 Subject: [PATCH] Implement getAttackTypeEffectiveness check --- src/data/ability.ts | 2 +- src/field/pokemon.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 7a4f53e77..80931d3c1 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2352,7 +2352,7 @@ export function initAbilities() { .attr(BattlerTagImmunityAbAttr, BattlerTagType.INFATUATED) .ignorable(), new Ability(Abilities.CLOUD_NINE, "Cloud Nine", "Eliminates the effects of weather.", 3) - .attr(SuppressWeatherEffectAbAttr), + .attr(SuppressWeatherEffectAbAttr, true), new Ability(Abilities.COMPOUND_EYES, "Compound Eyes", "The Pokémon's compound eyes boost its accuracy.", 3) .attr(BattleStatMultiplierAbAttr, BattleStat.ACC, 1.3), new Ability(Abilities.INSOMNIA, "Insomnia", "The Pokémon is suffering from insomnia and cannot fall asleep.", 3) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 28f60027f..f54779898 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1221,7 +1221,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const cancelled = new Utils.BooleanHolder(false); const typeless = !!move.getAttrs(TypelessAttr).length; const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveCategory.STATUS || move.getAttrs(StatusMoveTypeImmunityAttr).find(attr => types.includes((attr as StatusMoveTypeImmunityAttr).immuneType))) - ? getTypeDamageMultiplier(type, types[0]) * (types.length > 1 ? getTypeDamageMultiplier(type, types[1]) : 1) + ? this.getAttackTypeEffectiveness(type) : 1); applyMoveAttrs(VariableMoveTypeMultiplierAttr, source, this, move, typeMultiplier); if (typeless)