Skip to content

Commit a28a7ef

Browse files
authored
Fix: Bots NEVER attacked someone if they had water access (#2894)
## Description: Bots always attacked Terra Nullius if they shared a border with Terra Nullius. But water is Terra Nullius... So I changed that condition to `this.bot.neighbors().some((n) => !n.isPlayer())`. ## 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 c40faec commit a28a7ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/execution/BotExecution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class BotExecution implements Execution {
101101
}
102102

103103
if (this.neighborsTerraNullius) {
104-
if (this.bot.sharesBorderWith(this.mg.terraNullius())) {
104+
if (this.bot.neighbors().some((n) => !n.isPlayer())) {
105105
this.attackBehavior.sendAttack(this.mg.terraNullius());
106106
return;
107107
}

0 commit comments

Comments
 (0)