Fix Multi-Lens applying to both damage and power

This commit is contained in:
innerthunder 2024-11-11 20:07:16 -08:00
parent f77d2804e9
commit d7d43376fa
2 changed files with 2 additions and 4 deletions

View File

@ -818,8 +818,6 @@ export default class Move implements Localizable {
applyMoveAttrs(VariablePowerAttr, source, target, this, power); applyMoveAttrs(VariablePowerAttr, source, target, this, power);
source.scene.applyModifiers(PokemonMultiHitModifier, source.isPlayer(), source, this.id, null, power);
if (!this.hasAttr(TypelessAttr)) { if (!this.hasAttr(TypelessAttr)) {
source.scene.arena.applyTags(WeakenMoveTypeTag, simulated, this.type, power); source.scene.arena.applyTags(WeakenMoveTypeTag, simulated, this.type, power);
source.scene.applyModifiers(AttackTypeBoosterModifier, source.isPlayer(), source, this.type, power); source.scene.applyModifiers(AttackTypeBoosterModifier, source.isPlayer(), source, this.type, power);

View File

@ -2715,7 +2715,7 @@ export class PokemonMultiHitModifier extends PokemonHeldItemModifier {
if (!isNullOrUndefined(count)) { if (!isNullOrUndefined(count)) {
return this.applyHitCountBoost(count); return this.applyHitCountBoost(count);
} else if (!isNullOrUndefined(damageMultiplier)) { } else if (!isNullOrUndefined(damageMultiplier)) {
return this.applyPowerModifier(pokemon, damageMultiplier); return this.applyDamageModifier(pokemon, damageMultiplier);
} }
return false; return false;
@ -2732,7 +2732,7 @@ export class PokemonMultiHitModifier extends PokemonHeldItemModifier {
* equal to (1 - the number of stacked Multi-Lenses). * equal to (1 - the number of stacked Multi-Lenses).
* Additional strikes beyond that are given a 0.25x damage multiplier * Additional strikes beyond that are given a 0.25x damage multiplier
*/ */
private applyPowerModifier(pokemon: Pokemon, damageMultiplier: NumberHolder): boolean { private applyDamageModifier(pokemon: Pokemon, damageMultiplier: NumberHolder): boolean {
damageMultiplier.value = (pokemon.turnData.hitsLeft === pokemon.turnData.hitCount) damageMultiplier.value = (pokemon.turnData.hitsLeft === pokemon.turnData.hitCount)
? (1 - (0.25 * this.getStackCount())) ? (1 - (0.25 * this.getStackCount()))
: 0.25; : 0.25;