feat: make camp preparation affect first battle

This commit is contained in:
2026-07-27 04:19:40 +09:00
parent a726ba129f
commit 4d3f8b6a28
7 changed files with 608 additions and 50 deletions

View File

@@ -162,6 +162,24 @@ try {
'militia camp objective rows',
failures
);
const preparationPayoffs = militiaCamp.prologueMilitiaCampPreparationPayoffs;
assertArrayEquals(
preparationPayoffs.map((payoff) => payoff.objectiveId),
expectedCampObjectiveIds,
'militia camp preparation payoff order',
failures
);
assertArrayEquals(
preparationPayoffs.map((payoff) => payoff.battleCallback),
['enemy-intel', 'deployment-flex', 'field-salve'],
'militia camp preparation battle callbacks',
failures
);
assert(
preparationPayoffs.every((payoff) => payoff.worldCue.length > 0 && payoff.battleLabel.length > 0),
'every militia camp preparation must name its world cue and first-battle callback',
failures
);
assert(
campObjectives.find((objective) => objective.id === 'review-scout-report')?.label.includes('피난로'),
'Guan Yu scout objective must describe the evacuation-route information actually reviewed',
@@ -214,7 +232,7 @@ try {
failures
);
assert(
choice.reaction.length === 3 &&
choice.reaction.length === 2 &&
choice.reaction.some((line) => line.speaker === '관우') &&
choice.reaction.some((line) => line.speaker === '장비'),
`first command ${choice.orderId} must receive distinct Guan Yu and Zhang Fei reactions`,
@@ -232,6 +250,13 @@ try {
'Zou Jing command setup should be compressed to one line so the new decision adds no extra input',
failures
);
assert(
['guan-yu', 'zhang-fei', 'quartermaster'].every((npcId) => (
campNpcs.find((npc) => npc.id === npcId)?.dialogue.length === 2
)),
'mandatory camp inspections should each resolve in two lines before their visible world payoff',
failures
);
assert(
campNpcs.some((npc) => !npc.objectiveId && !npc.departure),
'militia camp should include at least one optional volunteer conversation',