mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 07:33:48 +01:00
BLADEBURNER: Change sleeveSize from property to getter (#1746)
This commit is contained in:
parent
56c797e23f
commit
772762493f
@ -24,7 +24,7 @@ export interface TeamActionWithCasualties {
|
|||||||
/**
|
/**
|
||||||
* Some actions (Operations and Black Operations) use teams for success bonus
|
* Some actions (Operations and Black Operations) use teams for success bonus
|
||||||
* and may result in casualties, reducing the player's hp, killing team members
|
* and may result in casualties, reducing the player's hp, killing team members
|
||||||
* and killing sleeves (to shock them, sleeves are immortal) *
|
* and killing sleeves (to shock them, sleeves are immortal)
|
||||||
*/
|
*/
|
||||||
export function resolveTeamCasualties(action: TeamActionWithCasualties, team: OperationTeam, success: boolean): number {
|
export function resolveTeamCasualties(action: TeamActionWithCasualties, team: OperationTeam, success: boolean): number {
|
||||||
if (action.teamCount <= 0) {
|
if (action.teamCount <= 0) {
|
||||||
|
@ -64,7 +64,9 @@ export class Bladeburner implements OperationTeam {
|
|||||||
totalSkillPoints = 0;
|
totalSkillPoints = 0;
|
||||||
|
|
||||||
teamSize = 0;
|
teamSize = 0;
|
||||||
sleeveSize = 0;
|
get sleeveSize() {
|
||||||
|
return Player.sleevesSupportingBladeburner().length;
|
||||||
|
}
|
||||||
teamLost = 0;
|
teamLost = 0;
|
||||||
|
|
||||||
storedCycles = 0;
|
storedCycles = 0;
|
||||||
@ -703,10 +705,8 @@ export class Bladeburner implements OperationTeam {
|
|||||||
|
|
||||||
sleeveSupport(joining: boolean): void {
|
sleeveSupport(joining: boolean): void {
|
||||||
if (joining) {
|
if (joining) {
|
||||||
this.sleeveSize += 1;
|
|
||||||
this.teamSize += 1;
|
this.teamSize += 1;
|
||||||
} else {
|
} else {
|
||||||
this.sleeveSize -= 1;
|
|
||||||
this.teamSize -= 1;
|
this.teamSize -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,7 @@ export class SleeveSupportWork extends SleeveWorkClass {
|
|||||||
Player.bladeburner?.sleeveSupport(true);
|
Player.bladeburner?.sleeveSupport(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
process() {
|
process(): void {}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
finish(): void {
|
finish(): void {
|
||||||
Player.bladeburner?.sleeveSupport(false);
|
Player.bladeburner?.sleeveSupport(false);
|
||||||
|
@ -274,7 +274,6 @@ exports[`Check Save File Continuity PlayerSave continuity 1`] = `
|
|||||||
"rank": 2000,
|
"rank": 2000,
|
||||||
"skillPoints": 666,
|
"skillPoints": 666,
|
||||||
"skills": {},
|
"skills": {},
|
||||||
"sleeveSize": 0,
|
|
||||||
"stamina": 1,
|
"stamina": 1,
|
||||||
"staminaBonus": 0,
|
"staminaBonus": 0,
|
||||||
"storedCycles": 0,
|
"storedCycles": 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user