This commit is contained in:
evanpelle
2025-03-27 20:43:56 -07:00
committed by GitHub
parent 9ed1fe865c
commit d8fe41de7a
37 changed files with 767 additions and 387 deletions
+6 -7
View File
@@ -192,7 +192,7 @@ export class FakeHumanExecution implements Execution {
}
private shouldAttack(other: Player): boolean {
if (this.player.isAlliedWith(other)) {
if (this.player.isFriendly(other)) {
if (this.shouldDiscourageAttack(other)) {
return this.random.chance(200);
}
@@ -271,12 +271,11 @@ export class FakeHumanExecution implements Execution {
}
}
if (this.player.isAlliedWith(this.enemy)) {
this.enemy = null;
return;
}
if (this.enemy) {
if (this.player.isFriendly(this.enemy)) {
this.enemy = null;
return;
}
this.maybeSendNuke(this.enemy);
if (this.player.sharesBorderWith(this.enemy)) {
this.sendAttack(this.enemy);
@@ -537,7 +536,7 @@ export class FakeHumanExecution implements Execution {
}
if (
this.mg.owner(dst).isPlayer() &&
this.player.isAlliedWith(this.mg.owner(dst) as Player)
this.player.isFriendly(this.mg.owner(dst) as Player)
) {
continue;
}