mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Fixed an issue where bladeburner would miscalculate hospitalization cost.
This commit is contained in:
parent
afc1347d3a
commit
bd172434d1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user