mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 15:19:16 +00:00
can betray traitor without becoming traitor. allied bots less likely to attack traitor than non allied.
This commit is contained in:
@@ -50,8 +50,10 @@ export class BotExecution implements Execution {
|
||||
|
||||
const traitors = this.bot.neighbors().filter(n => n.isPlayer() && n.isTraitor()) as Player[]
|
||||
if (traitors.length > 0) {
|
||||
if (this.random.chance(2)) {
|
||||
this.sendAttack(this.random.randElement(traitors))
|
||||
const toAttack = this.random.randElement(traitors)
|
||||
const odds = this.bot.alliedWith(toAttack) ? 6 : 3
|
||||
if (this.random.chance(odds)) {
|
||||
this.sendAttack(toAttack)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user