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
This commit is contained in:
FloPinguin
2026-01-14 18:44:18 +01:00
committed by GitHub
parent c40faecb95
commit a28a7ef6fd
+1 -1
View File
@@ -101,7 +101,7 @@ export class BotExecution implements Execution {
}
if (this.neighborsTerraNullius) {
if (this.bot.sharesBorderWith(this.mg.terraNullius())) {
if (this.bot.neighbors().some((n) => !n.isPlayer())) {
this.attackBehavior.sendAttack(this.mg.terraNullius());
return;
}