bots more likely to attack traitors

This commit is contained in:
evanpelle
2024-09-19 08:09:11 -07:00
parent df682aaabf
commit 7e986806d7
2 changed files with 12 additions and 3 deletions
+4 -3
View File
@@ -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
+8
View File
@@ -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()) {