Generalize battle deployment setup
This commit is contained in:
@@ -420,6 +420,26 @@ export const firstBattleScenario: BattleScenarioDefinition = {
|
||||
'유비가 퇴각하면 의용군은 전투를 지속할 수 없습니다.',
|
||||
'마을 지형을 밟아 보급을 확보하고, 다친 장수는 콩과 탁주로 회복하십시오.'
|
||||
],
|
||||
sortie: {
|
||||
sortieLimit: 3,
|
||||
requiredUnits: ['liu-bei'],
|
||||
recommendedUnits: [
|
||||
{ unitId: 'liu-bei', role: 'support', reason: '유비는 후방에서 전열을 지휘하고 생존 조건을 지켜야 합니다.' },
|
||||
{ unitId: 'guan-yu', role: 'front', reason: '관우가 길목의 황건 보병을 먼저 받아 정면 돌파로 길을 엽니다.' },
|
||||
{ unitId: 'zhang-fei', role: 'flank', reason: '장비는 아래쪽에서 궁병 엄호와 잔당을 흔드는 측면 압박을 맡습니다.' }
|
||||
],
|
||||
recommendedClasses: [
|
||||
{ label: '정면 돌파', classKeys: ['infantry'], reason: '길목 보병을 받아낼 전열이 필요합니다.' },
|
||||
{ label: '측면 압박', classKeys: ['spearman'], reason: '아래쪽 적을 빠르게 흔들어 궁병 엄호를 끊습니다.' },
|
||||
{ label: '후방 지휘', classKeys: ['lord'], reason: '유비는 무리하지 않고 생존과 회복 여지를 남겨야 합니다.' }
|
||||
],
|
||||
deploymentSlots: [
|
||||
{ role: 'front', unitId: 'guan-yu', x: 2, y: 15, label: '정면 돌파' },
|
||||
{ role: 'flank', unitId: 'zhang-fei', x: 1, y: 16, label: '측면 압박' },
|
||||
{ role: 'support', unitId: 'liu-bei', x: 1, y: 15, label: '후방 지휘' }
|
||||
],
|
||||
note: '관우는 정면 돌파, 장비는 측면 압박, 유비는 후방 지휘가 기본 전열입니다. 시작 구역 안에서 위치를 바꿀 수 있습니다.'
|
||||
},
|
||||
map: firstBattleMap,
|
||||
units: firstBattleUnits,
|
||||
bonds: firstBattleBonds,
|
||||
|
||||
@@ -77,9 +77,7 @@ export function createSortieDeploymentPlan(
|
||||
|
||||
deployedAllies.forEach((unit) => {
|
||||
const role = roleForUnit(unit, assignments, fallbackRoleForUnit);
|
||||
const tile = scoredTiles.find(
|
||||
(candidate) => candidate.unitId === unit.id && (!candidate.role || candidate.role === role) && !usedTiles.has(tileKey(candidate))
|
||||
);
|
||||
const tile = scoredTiles.find((candidate) => candidate.unitId === unit.id && !usedTiles.has(tileKey(candidate)));
|
||||
if (!tile) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user