Skip to content

Commit c90435f

Browse files
FloPinguinevanpelle
authored andcommitted
Fix: Nuking an Ally that is Disconnected shows a Red background ghost. Shouldn't be Red as not a Betrayal (#2988)
## Description: Previous behavior: https://youtu.be/Lv0RuBYh9qw?t=1359 New behavior: https://github.com/user-attachments/assets/acfcc4f0-157e-44a0-be28-802927a3c787 ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: FloPinguin
1 parent ae3adf9 commit c90435f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/graphics/layers/StructureIconsLayer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ export class StructureIconsLayer implements Layer {
270270
myPlayer &&
271271
(nukeType === UnitType.AtomBomb || nukeType === UnitType.HydrogenBomb)
272272
) {
273-
// Only check if player has allies
274-
const allies = myPlayer.allies();
273+
// Only check connected allies - nuking disconnected allies doesn't cause a traitor debuff
274+
const allies = myPlayer.allies().filter((a) => !a.isDisconnected());
275275
if (allies.length > 0) {
276276
targetingAlly = wouldNukeBreakAlliance({
277277
game: this.game,

0 commit comments

Comments
 (0)