Add new campaign opening prologue

This commit is contained in:
2026-06-19 23:31:17 +09:00
parent e64b86a363
commit 46f8b10d53
4 changed files with 264 additions and 16 deletions

View File

@@ -36,20 +36,21 @@
1. Load battle data.
2. Hydrate deployments through `DataCatalog`.
3. Dispatch battle-start scenario events.
4. Show scenario briefing with the campaign chapter header, battle header, objective summary, chapter overview, selectable camp Talk conversations, manual checkpoint menu, and optional pre-battle shop, Armory, Roster, and Formation setup.
5. Player selects a unit.
6. Briefing completion dispatches battle-begin events, including opening dialogue.
7. Unit moves, attacks, chooses a tactic or consumable item from the side menu, changes equipment, counters, gains EXP, levels up, promotes at class thresholds, or waits. Clicking an enemy that can be reached by moving first performs the combined move-and-attack action directly, while the map marks those targets with compact move-attack badges plus the chosen advance origin and attack line before the click; the selected attack origin favors defeat chances and low counter risk, and hover badges plus the forecast panel show possible counter danger even when a miss could cause it. Tactic buttons show MP cost, kind, range, area radius, and power, support, debuff, movement modifier, accuracy/evasion modifier, damage-over-time, or action-lock effect. Physical attacks roll hit chance from unit agility and target terrain avoid, add facing-based side/rear damage bonuses, and equipped weapons can add small damage bonuses against matching target move types; misses give reduced EXP. The scene plays placeholder SFX, a short movement slide, class-specific physical attack motion profiles, low-HP warning rings, hover target preview badges, area tactic overlays, an enemy threat overlay with physical damage and hostile tactic hints, selected/hover unit role, movement, facing, terrain, status, and equipment details, and floating combat text for core action and UI feedback.
8. Player ends turn.
9. Enemy AI moves, picks physical attacks from damage, defeat, priority, and weapon-effectiveness scores, and can cast single-target or area damage, healing, support, debuff, movement-modifier, accuracy/evasion-modifier, damage-over-time, or action-lock tactics through the same combat and skill resolvers.
10. Battle checks scenario-defined defeat conditions first, including commander loss and turn limits, then victory conditions such as enemy defeat or reaching a marked destination tile.
11. Turn-start, movement-triggered, and unit-defeat scenario events run as phases change, units enter marked cells, or units fall, can wait for prerequisite events, and may update objectives with HUD notices, grant item or gold pickups, deploy reinforcements, withdraw units from the battlefield, or change AI target priorities.
12. On first-time victory, `CampaignState` snapshots player progression, battle inventory, and battle-only gold pickups, applies rewards once, advances `current_scenario_id`, and writes `user://campaign_save.json`.
13. If the scenario defines post-battle dialogue, it plays once before the victory result panel opens.
14. The victory result panel splits rewards, roster changes, saved player growth, campaign status, and pending choices into sections.
15. If the scenario defines post-battle choices, the result panel waits for the player to select one, previews choice rewards including officer join/leave effects, then saves the selected flags and optional choice rewards before enabling the next battle.
16. The result panel can load the next scenario, passing saved roster and inventory overlays back into `BattleState`.
17. Once all campaign scenarios are complete, the battle scene shows a campaign completion panel instead of loading another map.
4. New campaigns first show a short title-to-briefing prologue using the battlefield backdrop and Cao Cao portrait, then continue into the first scenario briefing.
5. Show scenario briefing with the campaign chapter header, battle header, objective summary, chapter overview, selectable camp Talk conversations, manual checkpoint menu, and optional pre-battle shop, Armory, Roster, and Formation setup.
6. Player selects a unit.
7. Briefing completion dispatches battle-begin events, including opening dialogue.
8. Unit moves, attacks, chooses a tactic or consumable item from the side menu, changes equipment, counters, gains EXP, levels up, promotes at class thresholds, or waits. Clicking an enemy that can be reached by moving first performs the combined move-and-attack action directly, while the map marks those targets with compact move-attack badges plus the chosen advance origin and attack line before the click; the selected attack origin favors defeat chances and low counter risk, and hover badges plus the forecast panel show possible counter danger even when a miss could cause it. Tactic buttons show MP cost, kind, range, area radius, and power, support, debuff, movement modifier, accuracy/evasion modifier, damage-over-time, or action-lock effect. Physical attacks roll hit chance from unit agility and target terrain avoid, add facing-based side/rear damage bonuses, and equipped weapons can add small damage bonuses against matching target move types; misses give reduced EXP. The scene plays placeholder SFX, a short movement slide, class-specific physical attack motion profiles, low-HP warning rings, hover target preview badges, area tactic overlays, an enemy threat overlay with physical damage and hostile tactic hints, selected/hover unit role, movement, facing, terrain, status, and equipment details, and floating combat text for core action and UI feedback.
9. Player ends turn.
10. Enemy AI moves, picks physical attacks from damage, defeat, priority, and weapon-effectiveness scores, and can cast single-target or area damage, healing, support, debuff, movement-modifier, accuracy/evasion-modifier, damage-over-time, or action-lock tactics through the same combat and skill resolvers.
11. Battle checks scenario-defined defeat conditions first, including commander loss and turn limits, then victory conditions such as enemy defeat or reaching a marked destination tile.
12. Turn-start, movement-triggered, and unit-defeat scenario events run as phases change, units enter marked cells, or units fall, can wait for prerequisite events, and may update objectives with HUD notices, grant item or gold pickups, deploy reinforcements, withdraw units from the battlefield, or change AI target priorities.
13. On first-time victory, `CampaignState` snapshots player progression, battle inventory, and battle-only gold pickups, applies rewards once, advances `current_scenario_id`, and writes `user://campaign_save.json`.
14. If the scenario defines post-battle dialogue, it plays once before the victory result panel opens.
15. The victory result panel splits rewards, roster changes, saved player growth, campaign status, and pending choices into sections.
16. If the scenario defines post-battle choices, the result panel waits for the player to select one, previews choice rewards including officer join/leave effects, then saves the selected flags and optional choice rewards before enabling the next battle.
17. The result panel can load the next scenario, passing saved roster and inventory overlays back into `BattleState`.
18. Once all campaign scenarios are complete, the battle scene shows a campaign completion panel instead of loading another map.
## Save Boundary