[Bug] Fixing multi-hit drain moves so they heal based on individual hit and not total turn damage (#1974)

This commit is contained in:
td76099 2024-06-08 23:53:03 -04:00 committed by GitHub
parent ce3a9c9c87
commit 8a0eaa0009
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1467,7 +1467,7 @@ export class HitHealAttr extends MoveEffectAttr {
message = i18next.t("battle:drainMessage", {pokemonName: target.name});
} else {
// Default healing formula used by draining moves like Absorb, Draining Kiss, Bitter Blade, etc.
healAmount = Math.max(Math.floor(user.turnData.damageDealt * this.healRatio), 1);
healAmount = Math.max(Math.floor(user.turnData.currDamageDealt * this.healRatio), 1);
message = i18next.t("battle:regainHealth", {pokemonName: user.name});
}
if (reverseDrain) {