fix general founding and rebellion parity

This commit is contained in:
2026-07-26 17:50:56 +00:00
parent 80a2c9502f
commit 3fb75ccf03
16 changed files with 473 additions and 221 deletions
@@ -154,12 +154,10 @@ export const do거병 = (ai: GeneralAI) => {
};
export const do건국 = (ai: GeneralAI) => {
const mapName = ai.scenarioConfig.environment.mapName ?? 'sammo';
const prefix = mapName.endsWith('_') ? mapName : `${mapName}_`;
const nationType =
ai.aiConst.availableNationTypes.length > 0
? (ai.rng.choice(ai.aiConst.availableNationTypes) as string)
: `${prefix}def`;
: 'che_도적';
const colorType = ai.rng.nextRangeInt(0, 32);
const nationName = `${Array.from(ai.general.name).slice(1).join('')}`;
@@ -1261,6 +1261,12 @@ export const createReservedTurnHandler = async (options: {
if (resolution.created?.nations) {
const newNations = resolution.created.nations as Nation[];
createdNations.push(...newNations);
if (actionKey === 'che_거병') {
for (const nation of newNations) {
options.reservedTurns.ensureNationTurns(nation.id, 12);
options.reservedTurns.ensureNationTurns(nation.id, 11);
}
}
if (worldOverlay) {
for (const nation of newNations) {
worldOverlay.syncNation(nation);