Revert "Fix: Nations reject alliance requests during spawn phase" (#3313)

## Description:

Reverts openfrontio/OpenFrontIO#3312


## 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:

w.o.n
This commit is contained in:
Ryan
2026-03-01 12:11:00 +00:00
committed by GitHub
parent a9c89e4f15
commit 802cc7f16d
2 changed files with 0 additions and 19 deletions
@@ -76,11 +76,6 @@ export class NationAllianceBehavior {
otherPlayer: Player,
isResponse: boolean,
): boolean {
// Reject alliance requests during the spawn phase
if (this.game.inSpawnPhase()) {
return false;
}
// Easy (dumb) nations sometimes get confused and accept/reject randomly (Just like dumb humans do)
if (this.isConfused()) {
return this.random.chance(2);
-14
View File
@@ -51,10 +51,6 @@ describe("AllianceBehavior.handleAllianceRequests", () => {
player,
new NationEmojiBehavior(random, game, player),
);
while (game.inSpawnPhase()) {
game.executeNextTick();
}
});
function setupAllianceRequest({
@@ -96,16 +92,6 @@ describe("AllianceBehavior.handleAllianceRequests", () => {
return mockRequest;
}
test("should reject alliance during spawn phase", () => {
vi.spyOn(game, "inSpawnPhase").mockReturnValue(true);
const request = setupAllianceRequest({});
allianceBehavior.handleAllianceRequests();
expect(request.accept).not.toHaveBeenCalled();
expect(request.reject).toHaveBeenCalled();
});
test("should accept alliance when all conditions are met", () => {
const request = setupAllianceRequest({});