diff --git a/README.md b/README.md index 5f633ca..f178d04 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Godot 4 tactical RPG prototype inspired by classic turn-based Romance of the Thr ## Current Slice -- Thirty campaign scenarios. +- Thirty-one campaign scenarios. - Grid movement. - Unit selection. - Move, attack, wait, end turn. @@ -51,6 +51,7 @@ Godot 4 tactical RPG prototype inspired by classic turn-based Romance of the Thr - Xiakou Pursuit consumes the Jiangling Chase branch flags and pushes the river campaign toward Red Cliffs. - Red Cliffs Fleet consumes the Xiakou Pursuit branch flags and tests Cao Cao's chained fleet against the coalition vanguard. - Red Cliffs Fire consumes the Red Cliffs Fleet branch flags and turns the chained-fleet battle into a fire attack. +- Huarong Retreat consumes the Red Cliffs Fire branch flags and forces Cao Cao through the coalition roadblock after the fleet burns. - Post-battle choices can save campaign flags that branch later briefing text, shop stock, and scenario events. - Scenario post-battle dialogue can play before the victory result panel. - Basic battle EXP, level-ups, and core first-tier class promotion routes. diff --git a/data/campaign/campaign.json b/data/campaign/campaign.json index 9c6ffe2..3b79166 100644 --- a/data/campaign/campaign.json +++ b/data/campaign/campaign.json @@ -153,6 +153,11 @@ "id": "030_red_cliffs_fire", "title": "Red Cliffs Fire", "path": "res://data/scenarios/030_red_cliffs_fire.json" + }, + { + "id": "031_huarong_retreat", + "title": "Huarong Retreat", + "path": "res://data/scenarios/031_huarong_retreat.json" } ] } diff --git a/data/scenarios/031_huarong_retreat.json b/data/scenarios/031_huarong_retreat.json new file mode 100644 index 0000000..2d0e749 --- /dev/null +++ b/data/scenarios/031_huarong_retreat.json @@ -0,0 +1,368 @@ +{ + "id": "031_huarong_retreat", + "name": "Huarong Retreat", + "objectives": { + "victory": "Reach the Huarong road with Cao Cao, then defeat the coalition roadblock.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 18." + }, + "conditions": { + "victory": { "type": "all_units_defeated", "team": "enemy", "after_event": "huarong_road_opened" }, + "defeat": [ + { "type": "any_officer_defeated", "team": "player", "officer_ids": ["cao_cao"] }, + { "type": "turn_reached", "turn": 18, "team": "player" } + ] + }, + "briefing": { + "title": "Huarong Retreat", + "location": "Huarong Road, Jing Province, 208 CE", + "lines": [ + "Red Cliffs burns behind Cao Cao as rain, smoke, and broken drums scatter the fleet's survivors toward Huarong.", + "The coalition pursuit is not a single army now, but roadblocks, riders, and old debts waiting in the mud." + ], + "conditional_lines": [ + { + "campaign_flags": { "held_red_cliffs_line": true }, + "lines": [ + "Holding the fleet line preserved order among the survivors, but the delay let coalition pursuers close around Huarong." + ] + }, + { + "campaign_flags": { "opened_huarong_retreat": true }, + "lines": [ + "Opening the retreat early put Cao Cao on the Huarong road sooner, though scattered detachments still stumble through the rain behind him." + ] + } + ] + }, + "shop": { + "items": [ + "bean", + "wine", + "iron_sword", + "training_spear", + "short_bow", + "hand_axe", + "war_axe", + "leather_armor", + "iron_armor" + ], + "conditional_items": [ + { + "campaign_flags": { "held_red_cliffs_line": true }, + "items": ["imperial_seal"] + }, + { + "campaign_flags": { "opened_huarong_retreat": true }, + "items": ["war_drum"] + } + ] + }, + "roster": { + "max_units": 7, + "required_officers": ["cao_cao", "guo_jia"] + }, + "formation": { + "cells": [[1, 3], [1, 4], [1, 5], [2, 2], [2, 3], [2, 4], [2, 5], [2, 6], [3, 2], [3, 3], [3, 4], [3, 5], [3, 6]] + }, + "map": { + "width": 18, + "height": 11, + "terrain": [ + "GGGGHHGGGGGGHHGGGG", + "GGFFHHGGRRGGHHFFGG", + "GGRRRRRRRRRRRRFFGG", + "GGGFGHGGGGRRGGGGGG", + "RRRRRRRRRRRRRRRRRR", + "GGGGGHHGGGRRGFFGGG", + "GGHHGFFFGGFFFGGHHG", + "GGHHGFFFGGFFFGGHHG", + "GGGGGGFFGGHHHGGGGG", + "GGFFGGGGGGHHHFFGGG", + "GGGGGGGGGGGGGGGGGG" + ] + }, + "deployments": [ + { + "unit_id": "cao_cao_ch31", + "officer_id": "cao_cao", + "team": "player", + "pos": [1, 4] + }, + { + "unit_id": "guo_jia_ch31", + "officer_id": "guo_jia", + "team": "player", + "requires_joined": true, + "pos": [2, 4] + }, + { + "unit_id": "zhang_he_ch31", + "officer_id": "zhang_he", + "team": "player", + "requires_joined": true, + "pos": [2, 3] + }, + { + "unit_id": "xiahou_dun_ch31", + "officer_id": "xiahou_dun", + "team": "player", + "pos": [1, 5] + }, + { + "unit_id": "dian_wei_ch31", + "officer_id": "dian_wei", + "team": "player", + "requires_joined": true, + "pos": [2, 5] + }, + { + "unit_id": "xiahou_yuan_ch31", + "officer_id": "xiahou_yuan", + "team": "player", + "requires_joined": true, + "pos": [3, 3] + }, + { + "unit_id": "cao_ren_ch31", + "officer_id": "cao_ren", + "team": "player", + "requires_joined": true, + "pos": [3, 4] + }, + { + "unit_id": "guan_yu_roadblock", + "name": "Guan Yu Roadblock", + "class_id": "champion", + "team": "enemy", + "level": 29, + "pos": [14, 4], + "base": { "hp": 120, "mp": 12, "atk": 33, "def": 25, "int": 14, "agi": 20 } + }, + { + "unit_id": "huarong_gate_captain", + "name": "Huarong Gate Captain", + "class_id": "guard_captain", + "team": "enemy", + "level": 28, + "pos": [12, 4], + "base": { "hp": 88, "atk": 29, "def": 23 } + }, + { + "unit_id": "pursuit_rider", + "name": "Coalition Pursuit Rider", + "class_id": "elite_cavalry", + "team": "enemy", + "level": 28, + "pos": [15, 3], + "base": { "hp": 86, "atk": 30, "def": 17, "agi": 23 } + }, + { + "unit_id": "rain_mist_advisor", + "name": "Rain Mist Advisor", + "class_id": "military_advisor", + "team": "enemy", + "level": 28, + "pos": [15, 5], + "skills": ["blaze", "great_mend"], + "base": { "hp": 76, "mp": 60, "atk": 8, "def": 14, "int": 31, "agi": 15 } + }, + { + "unit_id": "huarong_spear_north", + "name": "Huarong Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 28, + "pos": [12, 3], + "base": { "hp": 78, "atk": 29, "def": 21 } + }, + { + "unit_id": "huarong_spear_south", + "name": "Huarong Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 28, + "pos": [12, 5], + "base": { "hp": 78, "atk": 29, "def": 21 } + }, + { + "unit_id": "mud_road_archer_north", + "name": "Mud Road Archer", + "class_id": "marksman", + "team": "enemy", + "level": 28, + "pos": [13, 2], + "base": { "hp": 70, "atk": 30, "def": 11, "agi": 22 } + }, + { + "unit_id": "mud_road_archer_south", + "name": "Mud Road Archer", + "class_id": "marksman", + "team": "enemy", + "level": 28, + "pos": [14, 6], + "base": { "hp": 70, "atk": 30, "def": 11, "agi": 22 } + } + ], + "events": [ + { + "id": "opening", + "once": true, + "when": { "type": "battle_start" }, + "actions": [ + { "type": "log", "text": "Cao Cao's army retreats through Huarong as coalition pursuers gather around the rain-soaked road." } + ] + }, + { + "id": "opening_dialogue", + "once": true, + "when": { "type": "battle_begin" }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Guo Jia", "text": "The smoke hides us from the river, but not from men who know this road." }, + { "speaker": "Cao Cao", "text": "Then we leave them mud, corpses, and no clear count of our strength." }, + { "speaker": "Zhang He", "text": "A roadblock waits ahead. It is placed like a question, not a trap." } + ] + } + ] + }, + { + "id": "held_line_draws_pursuit", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 2, "campaign_flags": { "held_red_cliffs_line": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Coalition Pursuit Rider", "text": "Cao Cao held the fleet too long. Close the road before his rearguard reforms." }, + { "speaker": "Cao Ren", "text": "The line bought order, and order can still bite." } + ] + }, + { + "type": "spawn_deployment", + "deployment": { + "unit_id": "late_pursuit_column", + "name": "Late Pursuit Column", + "class_id": "cavalry", + "team": "enemy", + "level": 28, + "pos": [16, 3], + "base": { "hp": 74, "atk": 28, "def": 15, "agi": 19 } + } + } + ] + }, + { + "id": "opened_retreat_keeps_gap", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 2, "campaign_flags": { "opened_huarong_retreat": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Xiahou Dun", "text": "The early retreat kept a gap in the road, but the rear units are still limping through smoke." }, + { "speaker": "Cao Cao", "text": "A gap is enough. We widen it with steel." } + ] + } + ] + }, + { + "id": "turn_4_rain_closes", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 4 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Rain Mist Advisor", "text": "Rain turns retreat into a ledger. Count every wagon that sinks." }, + { "speaker": "Guo Jia", "text": "They want us to move like a defeated army. Refuse the shape." } + ] + } + ] + }, + { + "id": "huarong_road_opened", + "once": true, + "when": { "type": "unit_reaches_tile", "team": "player", "officer_ids": ["cao_cao"], "pos": [10, 4] }, + "actions": [ + { + "type": "set_objective", + "victory": "The Huarong road is open. Defeat the coalition roadblock.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 18." + }, + { + "type": "dialogue", + "lines": [ + { "speaker": "Cao Cao", "text": "Huarong opens, but only if that roadblock breaks." }, + { "speaker": "Guan Yu Roadblock", "text": "The road remembers old favors and old wars. Show me which one walks here today." } + ] + }, + { + "type": "spawn_deployments", + "deployments": [ + { + "unit_id": "huarong_halberd_guard", + "name": "Huarong Halberd Guard", + "class_id": "guard_captain", + "team": "enemy", + "level": 28, + "pos": [16, 4], + "base": { "hp": 86, "atk": 29, "def": 23 } + }, + { + "unit_id": "coalition_crossbow_screen", + "name": "Coalition Crossbow Screen", + "class_id": "archer", + "team": "enemy", + "level": 28, + "pos": [16, 5], + "base": { "hp": 64, "atk": 28, "def": 9, "agi": 20 } + } + ] + } + ] + }, + { + "id": "turn_9_rear_straggles", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 9 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Zhang He", "text": "The rear units are still straggling. Every turn gives the pursuers another banner." }, + { "speaker": "Cao Cao", "text": "Then make every banner pay a toll." } + ] + } + ] + } + ], + "rewards": { + "gold": 6000, + "items": ["bean", "wine", "war_drum"] + }, + "post_battle_dialogue": [ + { "speaker": "Guo Jia", "text": "Huarong did not swallow us, but the retreat has changed the shape of the southern campaign." }, + { "speaker": "Cao Ren", "text": "If we stand a rearguard here, Jiangling's survivors may gather. If we run north, Xuchang hears of us sooner." }, + { "speaker": "Cao Cao", "text": "Decide whether we secure the Huarong rearguard or rush the heartland before rumor outruns us." } + ], + "post_battle_choices": [ + { + "id": "secure_huarong_rearguard", + "label": "Secure Rearguard", + "description": "Cao Cao steadies the Huarong road so more southern survivors can regroup before the next march.", + "set_flags": { "secured_huarong_rearguard": true, "rushed_xuchang_return": false }, + "gold": 800, + "items": ["imperial_seal"] + }, + { + "id": "rush_xuchang_return", + "label": "Rush North", + "description": "Cao Cao drives north quickly, reaching the heartland before rumor can turn retreat into panic.", + "set_flags": { "secured_huarong_rearguard": false, "rushed_xuchang_return": true }, + "gold": 600, + "items": ["war_drum"] + } + ] +} diff --git a/docs/DATA_MODEL.md b/docs/DATA_MODEL.md index 8b07a59..46f45b3 100644 --- a/docs/DATA_MODEL.md +++ b/docs/DATA_MODEL.md @@ -41,6 +41,7 @@ data/scenarios/027_jiangling_chase.json data/scenarios/028_xiakou_pursuit.json data/scenarios/029_red_cliffs_fleet.json data/scenarios/030_red_cliffs_fire.json +data/scenarios/031_huarong_retreat.json ``` ## Campaign @@ -83,7 +84,8 @@ The campaign file defines scenario order, resource paths, and officers who are a { "id": "027_jiangling_chase", "title": "Jiangling Chase", "path": "res://data/scenarios/027_jiangling_chase.json" }, { "id": "028_xiakou_pursuit", "title": "Xiakou Pursuit", "path": "res://data/scenarios/028_xiakou_pursuit.json" }, { "id": "029_red_cliffs_fleet", "title": "Red Cliffs Fleet", "path": "res://data/scenarios/029_red_cliffs_fleet.json" }, - { "id": "030_red_cliffs_fire", "title": "Red Cliffs Fire", "path": "res://data/scenarios/030_red_cliffs_fire.json" } + { "id": "030_red_cliffs_fire", "title": "Red Cliffs Fire", "path": "res://data/scenarios/030_red_cliffs_fire.json" }, + { "id": "031_huarong_retreat", "title": "Huarong Retreat", "path": "res://data/scenarios/031_huarong_retreat.json" } ] } ``` diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index d735a9c..28cbe3c 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -21,7 +21,7 @@ - Destination victory conditions and objective map markers exist. - Turn-limit conditions and HUD turn-limit display exist. - Victory reward summary is visible. -- Next-battle flow exists across the current thirty-scenario campaign. +- Next-battle flow exists across the current thirty-one-scenario campaign. - Campaign completion and new-campaign reset exist. - Reward inventory can be brought into the next battle. @@ -52,7 +52,7 @@ - Party roster persistence has a first save-file skeleton. - Level, experience, and equipment persistence. - Chapter selection and save/load. -- Linear thirty-scenario campaign order exists. +- Linear thirty-one-scenario campaign order exists. - Save reset exists. - Victory rewards, consumable counts, equipment stock, and equipped gear persist. - A basic pre-battle shop with scenario-specific stock exists. Sell-back and richer item management are still planned. @@ -90,6 +90,7 @@ - Twenty-eighth-scenario content exists with Xiakou pursuit, river harbor pressure, Sun-Liu coalition hints, and 027 branch reactions. - Twenty-ninth-scenario content exists with Red Cliffs fleet pressure, chained ships, coalition vanguard, and 028 branch reactions. - Thirtieth-scenario content exists with Red Cliffs fire ships, chained-fleet danger, coalition fire tactics, and 029 branch reactions. +- Thirty-first-scenario content exists with Huarong retreat pressure, coalition roadblocks, Cao Cao's escape route, and 030 branch reactions. ## Milestone 5: Presentation