Allies no longer embargo each other (#1863)

## Description:

Bots on the same team as a human player will no longer embargo them if
they betray an alliance with an opposing team player.
Fixes #1845 

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

sibyljudith
This commit is contained in:
ElMelchizedek
2025-08-20 03:22:50 +10:00
committed by evanpelle
parent 3aecc4f0cd
commit 3f98cb0ac1
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -98,7 +98,8 @@ export class FakeHumanExecution implements Execution {
/* When player is hostile starts embargo. Do not stop until neutral again */
if (
player.relation(other) <= Relation.Hostile &&
!player.hasEmbargoAgainst(other)
!player.hasEmbargoAgainst(other) &&
!player.isOnSameTeam(other)
) {
player.addEmbargo(other, false);
} else if (
@@ -37,7 +37,7 @@ export class BreakAllianceExecution implements Execution {
this.requestor.breakAlliance(alliance);
this.recipient.updateRelation(this.requestor, -200);
for (const player of this.mg.players()) {
if (player !== this.requestor) {
if (player !== this.requestor && !player.isOnSameTeam(this.requestor)) {
player.updateRelation(this.requestor, -40);
}
}