Implement getAttackTypeEffectiveness check

pull/195/head
Temps Ray 2024-04-19 13:03:19 -04:00 committed by Samuel H
parent e17aee5d48
commit e94b17bbf5
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)