diff --git a/src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts b/src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts index c8947aa52..1bb3e5af3 100644 --- a/src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts +++ b/src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts @@ -6,6 +6,9 @@ import { updateGoMults } from "../../Go/effects/effect"; import type { PlayerObject } from "./PlayerObject"; export function applyEntropy(this: PlayerObject, stacks = 1): void { + // Save the current HP ratio. + const currentHpRatio = this.hp.current / this.hp.max; + // Re-apply all multipliers this.reapplyAllAugmentations(); this.reapplyAllSourceFiles(); @@ -13,4 +16,10 @@ export function applyEntropy(this: PlayerObject, stacks = 1): void { this.mults = calculateEntropy(stacks); staneksGift.updateMults(); updateGoMults(); + + /** + * The ratio of (hp.current / hp.max) may be wrong after multiple function calls above. We need to recalculate + * hp.current based on the saved value. + */ + this.hp.current = Math.round(this.hp.max * Math.min(currentHpRatio, 1)); }