give fake humans country names, fake humans less likely to betray

This commit is contained in:
evanpelle
2024-09-29 20:45:21 -07:00
parent 143e3c3f0e
commit a837eb6375
6 changed files with 130 additions and 212 deletions
+8 -3
View File
@@ -106,16 +106,18 @@ export class FakeHumanExecution implements Execution {
const toAlly = this.random.randElement(enemies)
if (!this.player.isAlliedWith(toAlly)) {
this.player.createAllianceRequest(toAlly)
return
}
}
if (this.random.chance(2)) {
if (!this.player.isAlliedWith(enemies[0]) || (this.random.chance(90) && this.isTraitor)) {
if (!this.player.isAlliedWith(enemies[0]) || (this.random.chance(50) && this.isTraitor)) {
this.sendAttack(enemies[0])
}
} else {
if (!this.player.isAlliedWith(enemies[0]) || (this.random.chance(180) && this.isTraitor)) {
this.sendAttack(this.random.randElement(enemies))
const toAttack = this.random.randElement(enemies)
if (!this.player.isAlliedWith(toAttack) || (this.random.chance(100) && this.isTraitor)) {
this.sendAttack(toAttack)
}
}
}
@@ -174,6 +176,9 @@ export class FakeHumanExecution implements Execution {
if (this.isSmallIsland(dst)) {
continue
}
if (dst.owner().isPlayer() && this.player.isAlliedWith(dst.owner() as Player)) {
continue
}
this.mg.addExecution(new BoatAttackExecution(
this.player.id(),