mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 14:42:07 +00:00
bots don't attack allies
This commit is contained in:
@@ -64,7 +64,11 @@ export class BotExecution implements Execution {
|
||||
|
||||
const toAttack = border[this.random.nextInt(0, border.length)]
|
||||
const owner = toAttack.owner()
|
||||
|
||||
if (owner.isPlayer()) {
|
||||
if (this.bot.alliedWith(owner)) {
|
||||
return
|
||||
}
|
||||
if (owner.type() == PlayerType.FakeHuman) {
|
||||
if (!this.random.chance(2)) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user