mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-18 02:49:26 +00:00
teammode: bots can attack each other now to prevent them from ganging up on players
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user