Add Guangzong camp battle and camp events

This commit is contained in:
2026-06-22 23:44:05 +09:00
parent 97f8efc2e1
commit 421b95011e
10 changed files with 803 additions and 57 deletions

View File

@@ -8,6 +8,10 @@ import {
secondBattleUnits,
secondBattleVictoryPages,
thirdBattleBonds,
fourthBattleBonds,
fourthBattleMap,
fourthBattleUnits,
fourthBattleVictoryPages,
thirdBattleMap,
thirdBattleUnits,
thirdBattleVictoryPages,
@@ -17,7 +21,11 @@ import {
type UnitData
} from './scenario';
export type BattleScenarioId = 'first-battle-zhuo-commandery' | 'second-battle-yellow-turban-pursuit' | 'third-battle-guangzong-road';
export type BattleScenarioId =
| 'first-battle-zhuo-commandery'
| 'second-battle-yellow-turban-pursuit'
| 'third-battle-guangzong-road'
| 'fourth-battle-guangzong-camp';
export type BattleObjectiveKind = 'defeat-leader' | 'keep-unit-alive' | 'secure-terrain' | 'quick-victory';
@@ -215,12 +223,66 @@ export const thirdBattleScenario: BattleScenarioDefinition = {
nextCampScene: 'CampScene'
};
export const fourthBattleScenario: BattleScenarioDefinition = {
id: 'fourth-battle-guangzong-camp',
title: '광종 본영전',
victoryConditionLabel: '장각 격파',
defeatConditionLabel: '유비 퇴각',
openingObjectiveLines: [
'황건 본영의 중심에는 장각이 있습니다. 장각을 격파하면 광종의 황건 세력은 무너집니다.',
'요새와 숲의 궁병이 진입로를 막고 있습니다. 측면의 기병과 중앙 수비병을 나누어 상대하십시오.',
'16턴 이내에 승리하면 황건적 토벌의 공적이 크게 오릅니다.'
],
map: fourthBattleMap,
units: fourthBattleUnits,
bonds: fourthBattleBonds,
mapTextureKey: 'battle-map-fourth',
leaderUnitId: 'guangzong-main-leader-zhang-jue',
quickVictoryTurnLimit: 16,
baseVictoryGold: 700,
objectives: [
{
id: 'leader',
kind: 'defeat-leader',
label: '장각 격파',
rewardGold: 420,
unitId: 'guangzong-main-leader-zhang-jue'
},
{
id: 'liu-bei',
kind: 'keep-unit-alive',
label: '유비 생존',
rewardGold: 180,
unitId: 'liu-bei'
},
{
id: 'fort',
kind: 'secure-terrain',
label: '광종 본영 확보',
rewardGold: 260,
terrain: 'fort'
},
{
id: 'quick',
kind: 'quick-victory',
label: '16턴 이내 승리',
rewardGold: 220,
maxTurn: 16
}
],
defeatConditions: [{ kind: 'unit-defeated', unitId: 'liu-bei' }],
itemRewards: ['콩 2', '상처약 1', '탁주 1', '황건 토벌 공적 +1'],
victoryPages: fourthBattleVictoryPages,
nextCampScene: 'CampScene'
};
export const defaultBattleScenarioId: BattleScenarioId = firstBattleScenario.id;
export const battleScenarios: Record<BattleScenarioId, BattleScenarioDefinition> = {
'first-battle-zhuo-commandery': firstBattleScenario,
'second-battle-yellow-turban-pursuit': secondBattleScenario,
'third-battle-guangzong-road': thirdBattleScenario
'third-battle-guangzong-road': thirdBattleScenario,
'fourth-battle-guangzong-camp': fourthBattleScenario
};
export const defaultBattleScenario = battleScenarios[defaultBattleScenarioId];

View File

@@ -1,10 +1,13 @@
import type { CampaignStep } from '../state/campaignState';
import { defaultBattleScenario, secondBattleScenario, thirdBattleScenario, type BattleScenarioId } from './battles';
import { defaultBattleScenario, fourthBattleScenario, secondBattleScenario, thirdBattleScenario, type BattleScenarioId } from './battles';
import {
firstBattleVictoryPages,
fourthBattleIntroPages,
fourthBattleVictoryPages,
secondBattleIntroPages,
secondBattleVictoryPages,
thirdBattleIntroPages,
thirdBattleVictoryPages,
type StoryPage
} from './scenario';
@@ -43,12 +46,22 @@ const sortieFlows: Record<string, SortieFlow> = {
},
[thirdBattleScenario.id]: {
afterBattleId: thirdBattleScenario.id,
eyebrow: '다음 전장',
title: fourthBattleScenario.title,
description: '광종 구원로를 연 의용군은 이제 황건 본영을 향합니다. 장각을 격파해 황건적 토벌의 큰 고비를 넘겨야 합니다.',
rewardHint: `예상 보상: ${fourthBattleScenario.title} 개방`,
nextBattleId: fourthBattleScenario.id,
campaignStep: 'fourth-battle',
pages: [...thirdBattleVictoryPages, ...fourthBattleIntroPages]
},
[fourthBattleScenario.id]: {
afterBattleId: fourthBattleScenario.id,
eyebrow: '다음 장 준비',
title: '광종 본전',
description: '광종 구원로는 열렸지만 황건 본대는 아직 건재합니다. 다음 작업에서 광종 본전과 더 큰 전장 목표를 이어 붙일 수 있습니다.',
rewardHint: '다음 장: 광종 본전 준비 중',
title: '반동탁의 흐름',
description: '황건적 토벌로 이름을 알린 세 형제 앞에 조정의 새로운 혼란이 다가옵니다. 다음 큰 줄기는 반동탁 흐름으로 이어집니다.',
rewardHint: '다음 장: 반동탁 흐름 준비 중',
pages: [],
unavailableNotice: '광종 본전은 다음 장으로 이어집니다. 군영에서 성장 상태를 정비하세요.'
unavailableNotice: '반동탁 흐름은 다음 장으로 이어집니다. 군영에서 성장 상태를 정비하세요.'
}
};

View File

@@ -311,6 +311,69 @@ export const thirdBattleVictoryPages: StoryPage[] = [
}
];
export const fourthBattleIntroPages: StoryPage[] = [
{
id: 'fourth-guangzong-camp',
bgm: 'militia-theme',
chapter: '광종 본영',
background: 'story-militia',
text: '전령의 길이 끊기자 황건 본대는 광종 들판에 진을 굳혔다. 노란 깃발이 겹겹이 서고, 장각의 이름이 병사들 사이에 낮게 울렸다.'
},
{
id: 'fourth-liu-bei-resolve',
bgm: 'battle-prep',
chapter: '의용군의 결의',
background: 'story-liu-bei',
speaker: '유비',
portrait: 'liuBei',
text: '장각을 치는 일은 한 사람을 꺾는 일이 아니다. 두려움에 몰린 백성들이 다시 길을 찾게 하는 일이다.'
},
{
id: 'fourth-guan-yu-line',
bgm: 'battle-prep',
chapter: '본영 돌파',
background: 'story-three-heroes',
speaker: '관우',
portrait: 'guanYu',
text: '적은 요새와 숲 사이에 궁병을 숨겼습니다. 전열을 흐트러뜨리지 않고 본영의 깃발까지 밀고 들어가야 합니다.'
},
{
id: 'fourth-zhang-fei-roar',
bgm: 'battle-prep',
chapter: '황건적 토벌',
background: 'story-sortie',
speaker: '장비',
portrait: 'zhangFei',
text: '좋소! 광종의 누런 깃발을 오늘 모두 뽑아 버립시다. 뒤돌아볼 틈 없이 밀고 들어가겠소!'
}
];
export const fourthBattleVictoryPages: StoryPage[] = [
{
id: 'fourth-victory-yellow-flags-fall',
bgm: 'militia-theme',
chapter: '황건적 토벌',
background: 'story-militia',
text: '광종의 들판에서 황건의 본영이 무너졌다. 피난민들은 오래 닫았던 문을 열고, 쓰러진 깃발 너머로 관군과 의용군을 바라보았다.'
},
{
id: 'fourth-victory-liu-bei',
bgm: 'militia-theme',
chapter: '이름이 퍼지다',
background: 'story-liu-bei',
speaker: '유비',
portrait: 'liuBei',
text: '난은 잠시 가라앉았지만, 천하가 바로 선 것은 아니다. 오늘의 공이 교만이 되지 않도록 마음을 다잡자.'
},
{
id: 'fourth-victory-next-era',
bgm: 'battle-prep',
chapter: '새로운 혼란',
background: 'story-sortie',
text: '황건의 불길이 잦아들 무렵, 조정 안에서는 또 다른 그림자가 자라났다. 세 형제의 길은 이제 반동탁의 흐름으로 이어진다.'
}
];
export const firstBattleMap: BattleMap = {
width: 20,
height: 18,
@@ -390,6 +453,33 @@ export const thirdBattleMap: BattleMap = {
]
};
export const fourthBattleMap: BattleMap = {
width: 24,
height: 20,
terrain: [
['forest', 'forest', 'hill', 'hill', 'plain', 'plain', 'road', 'road', 'plain', 'forest', 'forest', 'hill', 'plain', 'plain', 'fort', 'fort', 'fort', 'plain', 'hill', 'hill', 'forest', 'forest', 'plain', 'plain'],
['forest', 'hill', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'forest', 'hill', 'plain', 'plain', 'fort', 'fort', 'fort', 'plain', 'plain', 'hill', 'forest', 'forest', 'plain', 'plain', 'hill'],
['hill', 'plain', 'plain', 'forest', 'plain', 'road', 'plain', 'plain', 'forest', 'plain', 'plain', 'plain', 'road', 'road', 'fort', 'plain', 'plain', 'plain', 'plain', 'forest', 'plain', 'plain', 'hill', 'hill'],
['plain', 'plain', 'forest', 'forest', 'plain', 'road', 'plain', 'forest', 'plain', 'plain', 'hill', 'plain', 'road', 'road', 'plain', 'plain', 'hill', 'hill', 'plain', 'plain', 'forest', 'plain', 'plain', 'plain'],
['plain', 'forest', 'forest', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'hill', 'hill', 'plain', 'river', 'river', 'road', 'road', 'plain', 'hill', 'plain', 'forest', 'forest', 'plain', 'plain', 'plain'],
['plain', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'hill', 'plain', 'plain', 'plain', 'river', 'river', 'plain', 'road', 'road', 'plain', 'village', 'plain', 'plain', 'forest', 'forest', 'plain'],
['plain', 'forest', 'plain', 'plain', 'road', 'plain', 'plain', 'hill', 'plain', 'plain', 'forest', 'plain', 'river', 'river', 'plain', 'plain', 'road', 'plain', 'village', 'plain', 'forest', 'forest', 'plain', 'plain'],
['plain', 'forest', 'plain', 'road', 'road', 'plain', 'hill', 'hill', 'plain', 'plain', 'forest', 'plain', 'plain', 'river', 'river', 'plain', 'road', 'road', 'plain', 'plain', 'plain', 'forest', 'hill', 'plain'],
['plain', 'plain', 'road', 'road', 'plain', 'plain', 'hill', 'plain', 'plain', 'forest', 'plain', 'plain', 'plain', 'river', 'river', 'plain', 'plain', 'road', 'plain', 'plain', 'hill', 'hill', 'plain', 'plain'],
['plain', 'road', 'road', 'plain', 'plain', 'forest', 'plain', 'plain', 'village', 'plain', 'plain', 'road', 'plain', 'plain', 'river', 'river', 'plain', 'road', 'plain', 'forest', 'plain', 'plain', 'plain', 'plain'],
['road', 'road', 'plain', 'plain', 'forest', 'forest', 'plain', 'plain', 'village', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'river', 'road', 'road', 'plain', 'plain', 'plain', 'plain', 'plain'],
['plain', 'road', 'plain', 'forest', 'forest', 'plain', 'plain', 'hill', 'plain', 'plain', 'forest', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'river', 'road', 'road', 'plain', 'forest', 'plain', 'plain'],
['plain', 'road', 'plain', 'plain', 'plain', 'plain', 'hill', 'plain', 'plain', 'forest', 'forest', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'river', 'plain', 'plain', 'forest', 'plain', 'hill'],
['hill', 'road', 'plain', 'plain', 'forest', 'plain', 'plain', 'plain', 'hill', 'plain', 'plain', 'forest', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'river', 'plain', 'plain', 'hill', 'hill'],
['hill', 'road', 'road', 'plain', 'plain', 'plain', 'plain', 'forest', 'plain', 'plain', 'forest', 'plain', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'river', 'plain', 'plain', 'hill'],
['plain', 'camp', 'road', 'road', 'plain', 'hill', 'plain', 'forest', 'forest', 'plain', 'plain', 'plain', 'hill', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'river', 'plain', 'plain'],
['camp', 'camp', 'road', 'plain', 'plain', 'hill', 'plain', 'plain', 'forest', 'forest', 'plain', 'plain', 'plain', 'hill', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'river', 'plain'],
['plain', 'camp', 'road', 'plain', 'forest', 'plain', 'plain', 'plain', 'plain', 'forest', 'forest', 'plain', 'plain', 'plain', 'hill', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'river', 'plain'],
['plain', 'plain', 'road', 'road', 'plain', 'plain', 'forest', 'plain', 'plain', 'plain', 'forest', 'forest', 'plain', 'plain', 'plain', 'hill', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain', 'plain'],
['plain', 'plain', 'plain', 'road', 'road', 'plain', 'forest', 'forest', 'plain', 'plain', 'plain', 'forest', 'plain', 'plain', 'plain', 'plain', 'hill', 'plain', 'plain', 'plain', 'road', 'road', 'plain', 'plain']
]
};
export const firstBattleUnits: UnitData[] = [
{
id: 'liu-bei',
@@ -1194,6 +1284,270 @@ export const thirdBattleUnits: UnitData[] = [
}
];
const fourthBattleAllyPositions: Record<string, { x: number; y: number }> = {
'liu-bei': { x: 2, y: 16 },
'guan-yu': { x: 3, y: 16 },
'zhang-fei': { x: 2, y: 17 }
};
export const fourthBattleUnits: UnitData[] = [
...firstBattleUnits
.filter((unit) => unit.faction === 'ally')
.map((unit) => placeScenarioUnit(unit, fourthBattleAllyPositions[unit.id] ?? { x: unit.x, y: unit.y })),
{
id: 'guangzong-main-vanguard-a',
name: '황건 선봉',
faction: 'enemy',
className: '황건병',
classKey: 'yellowTurban',
level: 4,
exp: 24,
hp: 28,
maxHp: 28,
attack: 9,
move: 3,
stats: { might: 63, intelligence: 36, leadership: 48, agility: 53, luck: 45 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 24 },
armor: { itemId: 'rebel-vest', level: 1, exp: 10 },
accessory: { itemId: 'yellow-scarf-charm', level: 1, exp: 0 }
},
x: 6,
y: 14
},
{
id: 'guangzong-main-vanguard-b',
name: '황건 선봉',
faction: 'enemy',
className: '황건병',
classKey: 'yellowTurban',
level: 4,
exp: 24,
hp: 28,
maxHp: 28,
attack: 9,
move: 3,
stats: { might: 63, intelligence: 36, leadership: 48, agility: 53, luck: 45 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 24 },
armor: { itemId: 'rebel-vest', level: 1, exp: 10 },
accessory: { itemId: 'yellow-scarf-charm', level: 1, exp: 0 }
},
x: 8,
y: 12
},
{
id: 'guangzong-main-bandit-a',
name: '숲길 돌격병',
faction: 'enemy',
className: '도적',
classKey: 'bandit',
level: 4,
exp: 26,
hp: 29,
maxHp: 29,
attack: 10,
move: 3,
stats: { might: 66, intelligence: 34, leadership: 44, agility: 61, luck: 48 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 24 },
armor: { itemId: 'rebel-vest', level: 1, exp: 10 },
accessory: { itemId: 'yellow-scarf-charm', level: 1, exp: 0 }
},
x: 5,
y: 10
},
{
id: 'guangzong-main-archer-a',
name: '황건 궁병',
faction: 'enemy',
className: '궁병',
classKey: 'archer',
level: 4,
exp: 26,
hp: 24,
maxHp: 24,
attack: 10,
move: 3,
stats: { might: 60, intelligence: 48, leadership: 50, agility: 62, luck: 50 },
equipment: {
weapon: { itemId: 'short-bow', level: 1, exp: 26 },
armor: { itemId: 'cloth-armor', level: 1, exp: 10 },
accessory: { itemId: 'wind-quiver', level: 1, exp: 0 }
},
x: 9,
y: 10
},
{
id: 'guangzong-main-cavalry-a',
name: '황건 기병',
faction: 'enemy',
className: '경기병',
classKey: 'cavalry',
level: 5,
exp: 28,
hp: 32,
maxHp: 32,
attack: 11,
move: 5,
stats: { might: 70, intelligence: 38, leadership: 52, agility: 72, luck: 51 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 28 },
armor: { itemId: 'rebel-vest', level: 1, exp: 12 },
accessory: { itemId: 'grain-pouch', level: 1, exp: 0 }
},
x: 12,
y: 9
},
{
id: 'guangzong-main-guard-a',
name: '본영 수비병',
faction: 'enemy',
className: '황건병',
classKey: 'yellowTurban',
level: 5,
exp: 28,
hp: 31,
maxHp: 31,
attack: 10,
move: 3,
stats: { might: 68, intelligence: 38, leadership: 54, agility: 55, luck: 49 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 28 },
armor: { itemId: 'rebel-vest', level: 1, exp: 12 },
accessory: { itemId: 'yellow-scarf-charm', level: 1, exp: 0 }
},
x: 14,
y: 7
},
{
id: 'guangzong-main-archer-b',
name: '본영 궁병',
faction: 'enemy',
className: '궁병',
classKey: 'archer',
level: 5,
exp: 30,
hp: 25,
maxHp: 25,
attack: 10,
move: 3,
stats: { might: 61, intelligence: 50, leadership: 51, agility: 63, luck: 51 },
equipment: {
weapon: { itemId: 'short-bow', level: 1, exp: 30 },
armor: { itemId: 'cloth-armor', level: 1, exp: 12 },
accessory: { itemId: 'wind-quiver', level: 1, exp: 0 }
},
x: 16,
y: 6
},
{
id: 'guangzong-main-cavalry-b',
name: '황건 기병',
faction: 'enemy',
className: '경기병',
classKey: 'cavalry',
level: 5,
exp: 30,
hp: 33,
maxHp: 33,
attack: 11,
move: 5,
stats: { might: 71, intelligence: 38, leadership: 53, agility: 73, luck: 51 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 30 },
armor: { itemId: 'rebel-vest', level: 1, exp: 12 },
accessory: { itemId: 'grain-pouch', level: 1, exp: 0 }
},
x: 18,
y: 10
},
{
id: 'guangzong-main-guard-b',
name: '본영 수비병',
faction: 'enemy',
className: '황건병',
classKey: 'yellowTurban',
level: 5,
exp: 30,
hp: 32,
maxHp: 32,
attack: 10,
move: 3,
stats: { might: 69, intelligence: 39, leadership: 55, agility: 55, luck: 50 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 30 },
armor: { itemId: 'rebel-vest', level: 1, exp: 12 },
accessory: { itemId: 'yellow-scarf-charm', level: 1, exp: 0 }
},
x: 18,
y: 4
},
{
id: 'guangzong-main-guard-c',
name: '본영 수비병',
faction: 'enemy',
className: '황건병',
classKey: 'yellowTurban',
level: 5,
exp: 30,
hp: 32,
maxHp: 32,
attack: 10,
move: 3,
stats: { might: 69, intelligence: 39, leadership: 55, agility: 55, luck: 50 },
equipment: {
weapon: { itemId: 'yellow-turban-saber', level: 1, exp: 30 },
armor: { itemId: 'rebel-vest', level: 1, exp: 12 },
accessory: { itemId: 'yellow-scarf-charm', level: 1, exp: 0 }
},
x: 14,
y: 3
},
{
id: 'guangzong-main-archer-c',
name: '망루 궁병',
faction: 'enemy',
className: '궁병',
classKey: 'archer',
level: 5,
exp: 32,
hp: 26,
maxHp: 26,
attack: 11,
move: 3,
stats: { might: 62, intelligence: 52, leadership: 52, agility: 64, luck: 52 },
equipment: {
weapon: { itemId: 'short-bow', level: 2, exp: 6 },
armor: { itemId: 'cloth-armor', level: 1, exp: 12 },
accessory: { itemId: 'wind-quiver', level: 1, exp: 0 }
},
x: 16,
y: 1
},
{
id: 'guangzong-main-leader-zhang-jue',
name: '장각',
faction: 'enemy',
className: '황건 대현량사',
classKey: 'rebelLeader',
level: 6,
exp: 40,
hp: 48,
maxHp: 48,
attack: 13,
move: 3,
stats: { might: 74, intelligence: 78, leadership: 82, agility: 58, luck: 64 },
equipment: {
weapon: { itemId: 'leader-axe', level: 2, exp: 16 },
armor: { itemId: 'lamellar-armor', level: 2, exp: 4 },
accessory: { itemId: 'yellow-scarf-charm', level: 1, exp: 0 }
},
x: 15,
y: 1
}
];
export const firstBattleBonds: BattleBond[] = [
{
id: 'liu-bei__guan-yu',
@@ -1223,6 +1577,7 @@ export const firstBattleBonds: BattleBond[] = [
export const secondBattleBonds: BattleBond[] = firstBattleBonds.map(cloneBattleBondForScenario);
export const thirdBattleBonds: BattleBond[] = firstBattleBonds.map(cloneBattleBondForScenario);
export const fourthBattleBonds: BattleBond[] = firstBattleBonds.map(cloneBattleBondForScenario);
function placeScenarioUnit(unit: UnitData, position: { x: number; y: number }): UnitData {
return {