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
+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()) {