bugfix: don't show yellow alert frame when a bot is attacking

This commit is contained in:
evanpelle
2026-03-09 12:41:27 -07:00
parent 76878a91d6
commit ce416f877c
+8 -1
View File
@@ -1,10 +1,11 @@
import { LitElement, css, html } from "lit";
import { customElement, state } from "lit/decorators.js";
import { PlayerType } from "../../../core/game/Game";
import {
BrokeAllianceUpdate,
GameUpdateType,
} from "../../../core/game/GameUpdates";
import { GameView } from "../../../core/game/GameView";
import { GameView, PlayerView } from "../../../core/game/GameView";
import { UserSettings } from "../../../core/game/UserSettings";
import { Layer } from "./Layer";
@@ -198,6 +199,12 @@ export class AlertFrame extends LitElement implements Layer {
for (const attack of incomingAttacks) {
// Only alert for non-retreating attacks
if (!attack.retreating && !this.seenAttackIds.has(attack.id)) {
const attacker = this.game.playerBySmallID(attack.attackerID);
if ((attacker as PlayerView).type() === PlayerType.Bot) {
this.seenAttackIds.add(attack.id);
continue;
}
// Check if this is a retaliation (we attacked them recently)
const ourAttackTick = this.outgoingAttackTicks.get(attack.attackerID);
const isRetaliation =