Skip to content

Commit

Permalink
Remove redundant damage number popup
Browse files Browse the repository at this point in the history
  • Loading branch information
DayKev committed Jul 14, 2024
1 parent cfcfa19 commit e6c2ed4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/data/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2528,10 +2528,7 @@ export class HalfHpStatMaxAttr extends StatChangeAttr {

apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
return new Promise<boolean>(resolve => {
const damage = user.damageAndUpdate(Math.floor(user.getMaxHp() / 2), HitResult.OTHER, false, true);
if (damage) {
user.scene.damageNumberHandler.add(user, damage);
}
user.damageAndUpdate(Math.floor(user.getMaxHp() / 2), HitResult.OTHER, false, true);
user.updateInfo().then(() => {
const ret = super.apply(user, target, move, args);
user.scene.queueMessage(i18next.t("moveTriggers:cutOwnHpAndMaximizedStat", {pokemonName: getPokemonNameWithAffix(user), stateName: getBattleStatName(this.stats[BattleStat.ATK])}));
Expand Down

0 comments on commit e6c2ed4

Please sign in to comment.