mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 02:03:01 +02:00
BLADEBURNER: Move bladeburner team losses to Casualties (#1654)
This commit is contained in:
@@ -28,6 +28,7 @@ import { CONSTANTS } from "../../Constants";
|
||||
import { Person } from "../Person";
|
||||
import { isMember } from "../../utils/EnumHelper";
|
||||
import { PartialRecord } from "../../Types/Record";
|
||||
import { isSleeveSupportWork } from "../Sleeve/Work/SleeveSupportWork";
|
||||
|
||||
export class PlayerObject extends Person implements IPlayer {
|
||||
// Player-specific properties
|
||||
@@ -171,6 +172,10 @@ export class PlayerObject extends Person implements IPlayer {
|
||||
return "Player";
|
||||
}
|
||||
|
||||
sleevesSupportingBladeburner(): Sleeve[] {
|
||||
return this.sleeves.filter((s) => isSleeveSupportWork(s.currentWork));
|
||||
}
|
||||
|
||||
/** Serialize the current object to a JSON save state. */
|
||||
toJSON(): IReviverValue {
|
||||
return Generic_toJSON("PlayerObject", this);
|
||||
|
||||
@@ -536,6 +536,11 @@ export class Sleeve extends Person implements SleevePerson {
|
||||
return "sleeves";
|
||||
}
|
||||
|
||||
/** Sleeves are immortal, but we damage them for max hp so they get shocked */
|
||||
kill() {
|
||||
return this.takeDamage(this.hp.max);
|
||||
}
|
||||
|
||||
takeDamage(amt: number): boolean {
|
||||
if (typeof amt !== "number") {
|
||||
console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);
|
||||
|
||||
Reference in New Issue
Block a user