[Bug] Golden punch bug fix (#4246)

* Fixes damage within pokemon.ts for golden punch, since it has changed from a IntegerHolder (main) to a number (beta). This updates it to pass through the damage as an integer holder instead of a number

* Updated integer holder to number holder as per PR comment
This commit is contained in:
Opaque02 2024-09-14 18:56:28 +10:00 committed by GitHub
parent 77f0fe6e4b
commit 783b9d85ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2662,7 +2662,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const attackResult = { move: move.id, result: result as DamageResult, damage: damage, critical: isCritical, sourceId: source.id, sourceBattlerIndex: source.getBattlerIndex() }; const attackResult = { move: move.id, result: result as DamageResult, damage: damage, critical: isCritical, sourceId: source.id, sourceBattlerIndex: source.getBattlerIndex() };
this.turnData.attacksReceived.unshift(attackResult); this.turnData.attacksReceived.unshift(attackResult);
if (source.isPlayer() && !this.isPlayer()) { if (source.isPlayer() && !this.isPlayer()) {
this.scene.applyModifiers(DamageMoneyRewardModifier, true, source, damage); this.scene.applyModifiers(DamageMoneyRewardModifier, true, source, new Utils.NumberHolder(damage));
} }
} }
} }