teammode: bots can attack each other now to prevent them from ganging up on players

This commit is contained in:
evan
2025-05-06 09:52:13 -07:00
parent 8805367db7
commit d49272e17e
4 changed files with 63 additions and 4 deletions
-1
View File
@@ -124,7 +124,6 @@ export class GameImpl implements Game {
this._nations.forEach((n) => this.addPlayer(n.playerInfo));
return;
}
const isDuos = this.config().gameConfig().playerTeams === Duos;
const allPlayers = [
...this._humans,
...this._nations.map((n) => n.playerInfo),
+4
View File
@@ -20,6 +20,7 @@ import {
Attack,
BuildableUnit,
Cell,
ColoredTeams,
EmojiMessage,
Gold,
MessageType,
@@ -606,6 +607,9 @@ export class PlayerImpl implements Player {
if (this.team() == null || other.team() == null) {
return false;
}
if (this.team() == ColoredTeams.Bot || other.team() == ColoredTeams.Bot) {
return false;
}
return this._team == other.team();
}