fix ownfor being set to UN Peacekeepers regardless of campaign

This commit is contained in:
Eclipse/Druss99 2025-10-21 13:15:14 -04:00 committed by Druss99
parent d78e570d9d
commit c46cce01b6
2 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import itertools
import logging
import math
from collections.abc import Iterator
from copy import deepcopy
from datetime import date, datetime, time, timedelta
from enum import Enum
from typing import Any, List, TYPE_CHECKING, Union, cast
@ -140,7 +141,7 @@ class Game:
self.sanitize_sides(player_faction, enemy_faction)
self.blue = Coalition(self, player_faction, player_budget, player=Player.BLUE)
self.red = Coalition(self, enemy_faction, enemy_budget, player=Player.RED)
neutral_faction = player_faction
neutral_faction = deepcopy(player_faction)
neutral_faction.country = self.neutral_country
self.neutral = Coalition(self, neutral_faction, 0, player=Player.NEUTRAL)
self.blue.set_opponent(self.red)

View File

@ -175,9 +175,10 @@ class GameGenerator:
# Remove carrier and lha, invert situation if needed
for cp in self.theater.controlpoints:
if self.generator_settings.inverted:
cp.starting_coalition = (
Player.RED if not cp.captured_invert else Player.BLUE
)
if not cp.starting_coalition.is_neutral:
cp.starting_coalition = (
Player.RED if not cp.captured_invert else Player.BLUE
)
if cp.is_carrier and self.should_remove_carrier(cp.starting_coalition):
to_remove.append(cp)