231 lines
7.5 KiB
TypeScript
231 lines
7.5 KiB
TypeScript
import { prologuePages, type StoryPage } from './scenario';
|
|
|
|
export const prologueVillageId = 'zhuo-prologue';
|
|
|
|
export const prologueVillageRequiredObjectiveIds = [
|
|
'meet-zhang-fei',
|
|
'meet-guan-yu',
|
|
'register-volunteers'
|
|
] as const;
|
|
|
|
export type PrologueVillageRequiredObjectiveId =
|
|
(typeof prologueVillageRequiredObjectiveIds)[number];
|
|
|
|
export const prologueVillageObjectiveDefinitions: ReadonlyArray<{
|
|
id: PrologueVillageRequiredObjectiveId | 'make-oath';
|
|
label: string;
|
|
shortLabel: string;
|
|
location: string;
|
|
prerequisiteId?: PrologueVillageRequiredObjectiveId;
|
|
}> = [
|
|
{
|
|
id: 'meet-zhang-fei',
|
|
label: '모병 격문 앞에서 장비와 뜻을 나누기',
|
|
shortLabel: '격문 앞의 장비',
|
|
location: '서쪽 모병 격문'
|
|
},
|
|
{
|
|
id: 'meet-guan-yu',
|
|
label: '주점에 들어온 관우의 뜻을 듣기',
|
|
shortLabel: '주점의 관우',
|
|
location: '동쪽 주점 앞',
|
|
prerequisiteId: 'meet-zhang-fei'
|
|
},
|
|
{
|
|
id: 'register-volunteers',
|
|
label: '모병 관리에게 세 사람의 뜻을 밝히기',
|
|
shortLabel: '의병 등록',
|
|
location: '남동쪽 모병소',
|
|
prerequisiteId: 'meet-guan-yu'
|
|
},
|
|
{
|
|
id: 'make-oath',
|
|
label: '복숭아 동산에서 두 사람과 결의하기',
|
|
shortLabel: '도원결의',
|
|
location: '북쪽 복숭아 동산',
|
|
prerequisiteId: 'register-volunteers'
|
|
}
|
|
];
|
|
|
|
export type PrologueVillageDialogueLine = {
|
|
speaker: string;
|
|
text: string;
|
|
textureKey?: string;
|
|
portrait?: string;
|
|
};
|
|
|
|
export type PrologueVillageNpcDefinition = {
|
|
id: string;
|
|
name: string;
|
|
role: string;
|
|
textureKey: string;
|
|
x: number;
|
|
y: number;
|
|
direction: 'south' | 'east' | 'north' | 'west';
|
|
objectiveId?: PrologueVillageRequiredObjectiveId;
|
|
dialogue: PrologueVillageDialogueLine[];
|
|
lockedDialogue?: PrologueVillageDialogueLine[];
|
|
repeatDialogue?: PrologueVillageDialogueLine[];
|
|
};
|
|
|
|
export const prologueVillageNpcDefinitions: readonly PrologueVillageNpcDefinition[] = [
|
|
{
|
|
id: 'zhang-fei',
|
|
name: '장비',
|
|
role: '격문 앞에서 만난 호걸',
|
|
textureKey: 'unit-zhang-fei',
|
|
x: 360,
|
|
y: 495,
|
|
direction: 'east',
|
|
objectiveId: 'meet-zhang-fei',
|
|
dialogue: [
|
|
{
|
|
speaker: '전황',
|
|
text: '유비가 모병 격문을 읽고 길게 탄식하자, 등 뒤에서 우렁찬 목소리가 날아왔다.'
|
|
},
|
|
{
|
|
speaker: '장비',
|
|
textureKey: 'unit-zhang-fei',
|
|
text: '대장부가 나라를 위해 힘을 내지 않고 어찌 한숨만 쉰단 말이오? 뜻이 있다면 행동으로 보입시다!'
|
|
},
|
|
{
|
|
speaker: '유비',
|
|
textureKey: 'unit-liu-bei',
|
|
text: '나는 중산정왕의 후손 유비요. 황건을 물리쳐 백성을 편안하게 하고 싶으나, 홀로는 힘이 모자라 탄식했소.'
|
|
},
|
|
{
|
|
speaker: '장비',
|
|
textureKey: 'unit-zhang-fei',
|
|
text: '나는 장비라 하오. 이 고을에서 술과 고기를 팔며 장원을 돌보고 있소. 뜻있는 이를 돕고자 모은 재산이 있으니 함께 의병을 일으키고, 주점에서 사람을 모을 방도도 의논합시다.'
|
|
}
|
|
],
|
|
repeatDialogue: [
|
|
{
|
|
speaker: '장비',
|
|
textureKey: 'unit-zhang-fei',
|
|
text: '주점에 군문으로 향한다는 붉은 얼굴의 나그네가 들었소. 범상치 않은 사람이니 함께 만나 봅시다!'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: 'guan-yu',
|
|
name: '관우',
|
|
role: '군문으로 향하던 나그네',
|
|
textureKey: 'unit-guan-yu',
|
|
x: 1110,
|
|
y: 460,
|
|
direction: 'west',
|
|
objectiveId: 'meet-guan-yu',
|
|
dialogue: [
|
|
{
|
|
speaker: '유비',
|
|
textureKey: 'unit-liu-bei',
|
|
text: '손수레를 세우고 주점에 들어오시더니 군문에 자원하러 가는 길이라 하셨소. 기상이 범상치 않으니 존함과 연유를 여쭈어도 되겠소?'
|
|
},
|
|
{
|
|
speaker: '관우',
|
|
textureKey: 'unit-guan-yu',
|
|
text: '나는 하동 해량 출신 관우라 합니다. 고을의 힘 있는 자가 약한 이를 짓밟는 것을 참지 못해 그를 베고 여러 해 떠돌았습니다.'
|
|
},
|
|
{
|
|
speaker: '장비',
|
|
textureKey: 'unit-zhang-fei',
|
|
text: '마침 우리는 황건을 막을 의병을 일으키려던 참이오. 힘보다 의를 먼저 보는 사람이라면 더 들을 것도 없겠소!'
|
|
},
|
|
{
|
|
speaker: '관우',
|
|
textureKey: 'unit-guan-yu',
|
|
text: '두 분의 뜻이 백성을 향한다면 이 관우도 함께하겠습니다. 같은 뜻이 쉽게 흩어지지 않도록 맹세로 굳히지요.'
|
|
}
|
|
],
|
|
lockedDialogue: [
|
|
{
|
|
speaker: '전황',
|
|
text: '붉은 얼굴의 나그네가 주점 앞에 손수레를 세우고 군문 쪽을 살핀다. 먼저 모병 격문 앞의 호걸과 이야기해 보자.'
|
|
}
|
|
],
|
|
repeatDialogue: [
|
|
{
|
|
speaker: '관우',
|
|
textureKey: 'unit-guan-yu',
|
|
text: '장비 공의 장원 뒤에 복숭아꽃이 한창이라 들었습니다. 모병소에 뜻을 밝힌 뒤 그곳에서 다시 뵙지요.'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: 'recruiting-clerk',
|
|
name: '탁현 모병 관리',
|
|
role: '의병 명부 담당',
|
|
textureKey: 'unit-shu-officer',
|
|
x: 1045,
|
|
y: 760,
|
|
direction: 'east',
|
|
objectiveId: 'register-volunteers',
|
|
dialogue: [
|
|
{
|
|
speaker: '탁현 모병 관리',
|
|
textureKey: 'unit-shu-officer',
|
|
text: '성명과 출신, 의병을 일으키는 뜻을 명부에 남겨 주십시오. 복숭아 동산에서 한뜻임을 맹세한 뒤 장비 공의 장원 밖 의용군 막사로 오시면 군마와 병기를 나누겠습니다.'
|
|
},
|
|
{
|
|
speaker: '유비',
|
|
textureKey: 'unit-liu-bei',
|
|
text: '탁현의 유비, 하동의 관우, 이 고을의 장비요. 위로는 나라의 어려움에 보답하고 아래로는 백성을 편안하게 하고자 모였소.'
|
|
}
|
|
],
|
|
lockedDialogue: [
|
|
{
|
|
speaker: '탁현 모병 관리',
|
|
textureKey: 'unit-shu-officer',
|
|
text: '함께 이름을 올릴 동료가 모두 정해지면 다시 오십시오.'
|
|
}
|
|
],
|
|
repeatDialogue: [
|
|
{
|
|
speaker: '탁현 모병 관리',
|
|
textureKey: 'unit-shu-officer',
|
|
text: '명부는 접수되었습니다. 복숭아 동산에서 뜻을 굳힌 뒤 의용군 막사로 가시면 군후 추정이 기다릴 것입니다.'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
id: 'market-villager',
|
|
name: '탁현 주민',
|
|
role: '장터의 목소리',
|
|
textureKey: 'unit-shu-infantry',
|
|
x: 745,
|
|
y: 620,
|
|
direction: 'south',
|
|
dialogue: [
|
|
{
|
|
speaker: '탁현 주민',
|
|
textureKey: 'unit-shu-infantry',
|
|
text: '황건 무리가 길을 막은 뒤로 장터에 곡식이 끊겼습니다. 싸움이 두렵지만, 우리를 먼저 생각해 주는 의병이라면 힘을 보태겠습니다.'
|
|
}
|
|
]
|
|
}
|
|
];
|
|
|
|
const openingPageIds = new Set(['yellow-turban-chaos', 'liu-bei-resolve']);
|
|
const brotherhoodPageIds = new Set(['militia-rises']);
|
|
const departurePageIds = new Set([
|
|
'first-sortie',
|
|
'battle-briefing'
|
|
]);
|
|
|
|
export function prologueOpeningPages(): StoryPage[] {
|
|
return selectProloguePages(openingPageIds);
|
|
}
|
|
|
|
export function prologueBrotherhoodPages(): StoryPage[] {
|
|
return selectProloguePages(brotherhoodPageIds);
|
|
}
|
|
|
|
export function prologueDeparturePages(): StoryPage[] {
|
|
return selectProloguePages(departurePageIds);
|
|
}
|
|
|
|
function selectProloguePages(pageIds: ReadonlySet<string>) {
|
|
return prologuePages.filter((page) => pageIds.has(page.id));
|
|
}
|