Fixed an issue where bladeburner would miscalculate hospitalization cost.

This commit is contained in:
Olivier Gagnon 2021-05-17 20:18:05 -04:00
parent afc1347d3a
commit bd172434d1
2 changed files with 1 additions and 1 deletions

@ -259,5 +259,6 @@ export const CONSTANTS: IMap<any> = {
* Fix error message throw undefined variable error
* City hall now has some generic text if you can't create a corp yet.
* Deleting a file without extension now returns an appropriate error message.
* Fixed an issue where bladeburner would miscalculate the cost of hospitalization.
`,
}

@ -19,7 +19,6 @@ export function getHospitalizationCost(p: IPlayer): number {
export function calculateHospitalizationCost(p: IPlayer, damage: number): number {
const oldhp = p.hp;
p.hp -= damage
if (p.hp < 0) p.hp = 0;
const cost = getHospitalizationCost(p);
p.hp = oldhp;
return cost;