diff --git a/TODO.txt b/TODO.txt index f72741dd9..f40262e71 100644 --- a/TODO.txt +++ b/TODO.txt @@ -116,17 +116,18 @@ * UI: basic win condition & popup DONE 9/16/2024 * right click popup alliance option DONE 9/17/2024 * BUG: can't ally same person twice DONE 9/18/2024 +* attack alliance create traitor flag DONE 9/18/2024 * break alliance makes you a traitor DONE 9/18/2024 * add traitor icon DONE 9/18/2024 -* make alliance icon -* alert play when they become traitor +* make alliance icon DONE 9/19/2024 +* bots attack traitors +* create event box * make fake humans easier * click alliance sends alliance request * notification for alliance request * comfirm alliance * first place has crown * alliance has icon -* attack alliance create traitor flag * BUG: FakeHuman don't be enemy if don't share border * BUG: when send boat only captures one pixel * store cookies diff --git a/src/core/execution/BotExecution.ts b/src/core/execution/BotExecution.ts index fe3f88695..29ac9aabc 100644 --- a/src/core/execution/BotExecution.ts +++ b/src/core/execution/BotExecution.ts @@ -48,6 +48,14 @@ export class BotExecution implements Execution { } }) + const traitors = this.bot.neighbors().filter(n => n.isPlayer() && n.isTraitor()) as Player[] + if (traitors.length > 0) { + if (this.random.chance(2)) { + this.sendAttack(this.random.randElement(traitors)) + } + return + } + if (this.neighborsTerraNullius) { for (const b of this.bot.borderTiles()) { for (const n of b.neighbors()) {