Update src/data/move.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Sirz Benjie 2025-02-25 00:16:53 -06:00 committed by GitHub
parent c986d29133
commit 5eccb1d328
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1031,7 +1031,11 @@ export class AttackMove extends Move {
const offStatValue = user.getEffectiveStat(offStat, target); const offStatValue = user.getEffectiveStat(offStat, target);
applyMoveAttrs(VariableAtkAttr, user, target, move, statHolder); applyMoveAttrs(VariableAtkAttr, user, target, move, statHolder);
const statRatio = offStatValue / statHolder.value; const statRatio = offStatValue / statHolder.value;
attackScore *= statRatio <= 0.75 ? 2 : statRatio <= 0.875 ? 1.5 : 1; if (statRatio <= 0.75) {
attackScore *= 2;
} else if (statRatio <= 0.875) {
attackScore *= 1.5;
}
const power = new Utils.NumberHolder(this.calculateEffectivePower()); const power = new Utils.NumberHolder(this.calculateEffectivePower());
applyMoveAttrs(VariablePowerAttr, user, target, move, power); applyMoveAttrs(VariablePowerAttr, user, target, move, power);