Revert "fix: traitor bug when attacking immediately after initiating an alliance (#2044)"

This reverts commit 6f96788406.
This commit is contained in:
evanpelle
2025-09-30 15:03:46 -07:00
parent a54af870c2
commit 30856341cd
7 changed files with 89 additions and 343 deletions
-15
View File
@@ -79,12 +79,6 @@ describe("GameImpl", () => {
game.executeNextTick();
game.executeNextTick();
// STEP 1: First betray (manually break alliance)
const alliance = attacker.allianceWith(defender);
expect(alliance).toBeTruthy();
attacker.breakAlliance(alliance!);
// STEP 2: Then attack after betrayal
game.addExecution(new AttackExecution(100, attacker, defender.id()));
do {
@@ -92,7 +86,6 @@ describe("GameImpl", () => {
} while (attacker.outgoingAttacks().length > 0);
expect(attacker.isTraitor()).toBe(false);
expect(attacker.allianceWith(defender)).toBeFalsy();
});
test("Do become traitor when betraying active player", async () => {
@@ -117,13 +110,6 @@ describe("GameImpl", () => {
game.executeNextTick();
game.executeNextTick();
// First betray (manually break alliance)
const alliance = attacker.allianceWith(defender);
expect(alliance).toBeTruthy();
attacker.breakAlliance(alliance!);
game.executeNextTick();
game.addExecution(new AttackExecution(100, attacker, defender.id()));
do {
@@ -131,6 +117,5 @@ describe("GameImpl", () => {
} while (attacker.outgoingAttacks().length > 0);
expect(attacker.isTraitor()).toBe(true);
expect(attacker.allianceWith(defender)).toBeFalsy();
});
});