Add Nanzhong stabilization battle
This commit is contained in:
@@ -844,7 +844,14 @@ const unitTexture: Record<string, string> = {
|
||||
'yiling-fire-officer-han-dang': 'unit-rebel-leader',
|
||||
'yiling-fire-officer-pan-zhang': 'unit-rebel-leader',
|
||||
'yiling-fire-officer-ma-zhong': 'unit-rebel',
|
||||
'yiling-fire-leader-lu-xun': 'unit-rebel-leader'
|
||||
'yiling-fire-leader-lu-xun': 'unit-rebel-leader',
|
||||
'nanzhong-strategist-a': 'unit-rebel-archer',
|
||||
'nanzhong-strategist-b': 'unit-rebel-archer',
|
||||
'nanzhong-strategist-c': 'unit-rebel-archer',
|
||||
'nanzhong-officer-gao-ding': 'unit-rebel-leader',
|
||||
'nanzhong-officer-zhu-bao': 'unit-rebel-leader',
|
||||
'nanzhong-officer-meng-huo-vanguard': 'unit-rebel-leader',
|
||||
'nanzhong-leader-yong-kai': 'unit-rebel-leader'
|
||||
};
|
||||
|
||||
const unitTextureByClass: Partial<Record<UnitClassKey, string>> = {
|
||||
@@ -2208,7 +2215,42 @@ const enemyAiByUnitId: Record<string, EnemyAiBehavior> = {
|
||||
'yiling-fire-officer-han-dang': 'guard',
|
||||
'yiling-fire-officer-pan-zhang': 'aggressive',
|
||||
'yiling-fire-officer-ma-zhong': 'aggressive',
|
||||
'yiling-fire-leader-lu-xun': 'hold'
|
||||
'yiling-fire-leader-lu-xun': 'hold',
|
||||
'nanzhong-scout-a': 'aggressive',
|
||||
'nanzhong-scout-b': 'aggressive',
|
||||
'nanzhong-scout-c': 'aggressive',
|
||||
'nanzhong-scout-d': 'aggressive',
|
||||
'nanzhong-infantry-a': 'guard',
|
||||
'nanzhong-infantry-b': 'guard',
|
||||
'nanzhong-infantry-c': 'guard',
|
||||
'nanzhong-infantry-d': 'guard',
|
||||
'nanzhong-infantry-e': 'guard',
|
||||
'nanzhong-infantry-f': 'guard',
|
||||
'nanzhong-archer-a': 'hold',
|
||||
'nanzhong-archer-b': 'hold',
|
||||
'nanzhong-archer-c': 'hold',
|
||||
'nanzhong-archer-d': 'hold',
|
||||
'nanzhong-archer-e': 'hold',
|
||||
'nanzhong-archer-f': 'hold',
|
||||
'nanzhong-beast-rider-a': 'aggressive',
|
||||
'nanzhong-beast-rider-b': 'aggressive',
|
||||
'nanzhong-beast-rider-c': 'aggressive',
|
||||
'nanzhong-beast-rider-d': 'aggressive',
|
||||
'nanzhong-ambusher-a': 'aggressive',
|
||||
'nanzhong-ambusher-b': 'aggressive',
|
||||
'nanzhong-ambusher-c': 'aggressive',
|
||||
'nanzhong-ambusher-d': 'aggressive',
|
||||
'nanzhong-ambusher-e': 'aggressive',
|
||||
'nanzhong-guard-a': 'guard',
|
||||
'nanzhong-guard-b': 'guard',
|
||||
'nanzhong-guard-c': 'guard',
|
||||
'nanzhong-strategist-a': 'hold',
|
||||
'nanzhong-strategist-b': 'hold',
|
||||
'nanzhong-strategist-c': 'hold',
|
||||
'nanzhong-officer-gao-ding': 'guard',
|
||||
'nanzhong-officer-zhu-bao': 'guard',
|
||||
'nanzhong-officer-meng-huo-vanguard': 'aggressive',
|
||||
'nanzhong-leader-yong-kai': 'hold'
|
||||
};
|
||||
|
||||
const defaultEnemyAiByClass: Partial<Record<UnitClassKey, EnemyAiBehavior>> = {
|
||||
@@ -2413,9 +2455,14 @@ export class BattleScene extends Phaser.Scene {
|
||||
|
||||
private resetBattleData(campaign?: CampaignState) {
|
||||
const selected = new Set(campaign?.selectedSortieUnitIds ?? []);
|
||||
const forcedAllyIds = new Set(
|
||||
battleScenario.defeatConditions
|
||||
.filter((condition) => condition.kind === 'unit-defeated')
|
||||
.map((condition) => condition.unitId)
|
||||
);
|
||||
const hasSelection = selected.size > 0;
|
||||
const nextUnits = initialBattleUnits
|
||||
.filter((unit) => unit.faction === 'enemy' || !hasSelection || selected.has(unit.id) || unit.id === 'liu-bei')
|
||||
.filter((unit) => unit.faction === 'enemy' || !hasSelection || selected.has(unit.id) || forcedAllyIds.has(unit.id))
|
||||
.map((unit) => this.applyCampaignUnitProgress(unit, campaign));
|
||||
battleUnits.splice(0, battleUnits.length, ...nextUnits);
|
||||
battleBonds.splice(0, battleBonds.length, ...initialBattleBonds.map((bond) => this.applyCampaignBondProgress(bond, campaign)));
|
||||
|
||||
Reference in New Issue
Block a user