diff --git a/README.md b/README.md index f178d04..29010c8 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-one campaign scenarios. +- Thirty-two campaign scenarios. - Grid movement. - Unit selection. - Move, attack, wait, end turn. @@ -52,6 +52,7 @@ Godot 4 tactical RPG prototype inspired by classic turn-based Romance of the Thr - 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. +- Jiangling Rearguard consumes the Huarong Retreat branch flags and steadies Cao Cao's southern withdrawal before the next front. - 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 3b79166..66344a9 100644 --- a/data/campaign/campaign.json +++ b/data/campaign/campaign.json @@ -158,6 +158,11 @@ "id": "031_huarong_retreat", "title": "Huarong Retreat", "path": "res://data/scenarios/031_huarong_retreat.json" + }, + { + "id": "032_jiangling_rearguard", + "title": "Jiangling Rearguard", + "path": "res://data/scenarios/032_jiangling_rearguard.json" } ] } diff --git a/data/scenarios/032_jiangling_rearguard.json b/data/scenarios/032_jiangling_rearguard.json new file mode 100644 index 0000000..f959db1 --- /dev/null +++ b/data/scenarios/032_jiangling_rearguard.json @@ -0,0 +1,368 @@ +{ + "id": "032_jiangling_rearguard", + "name": "Jiangling Rearguard", + "objectives": { + "victory": "Reach the Jiangling rearguard line with Cao Cao, then defeat the coalition pursuit.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 18." + }, + "conditions": { + "victory": { "type": "all_units_defeated", "team": "enemy", "after_event": "jiangling_rearguard_formed" }, + "defeat": [ + { "type": "any_officer_defeated", "team": "player", "officer_ids": ["cao_cao"] }, + { "type": "turn_reached", "turn": 18, "team": "player" } + ] + }, + "briefing": { + "title": "Jiangling Rearguard", + "location": "Jiangling Approach, Jing Province, 208 CE", + "lines": [ + "Huarong's mud is behind Cao Cao, but the southern road still bleeds stragglers, wagons, and broken banners.", + "Near Jiangling, coalition detachments press the retreat, hoping to turn survival into a second defeat." + ], + "conditional_lines": [ + { + "campaign_flags": { "secured_huarong_rearguard": true }, + "lines": [ + "The Huarong rearguard bought time for scattered units to reform, giving Cao Cao a steadier line near Jiangling." + ] + }, + { + "campaign_flags": { "rushed_xuchang_return": true }, + "lines": [ + "The rush toward Xuchang carried news ahead of panic, but the Jiangling rear is thinner and more exposed." + ] + } + ] + }, + "shop": { + "items": [ + "bean", + "wine", + "iron_sword", + "training_spear", + "short_bow", + "hand_axe", + "war_axe", + "leather_armor", + "iron_armor" + ], + "conditional_items": [ + { + "campaign_flags": { "secured_huarong_rearguard": true }, + "items": ["imperial_seal"] + }, + { + "campaign_flags": { "rushed_xuchang_return": 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_ch32", + "officer_id": "cao_cao", + "team": "player", + "pos": [1, 4] + }, + { + "unit_id": "guo_jia_ch32", + "officer_id": "guo_jia", + "team": "player", + "requires_joined": true, + "pos": [2, 4] + }, + { + "unit_id": "zhang_he_ch32", + "officer_id": "zhang_he", + "team": "player", + "requires_joined": true, + "pos": [2, 3] + }, + { + "unit_id": "xiahou_dun_ch32", + "officer_id": "xiahou_dun", + "team": "player", + "pos": [1, 5] + }, + { + "unit_id": "dian_wei_ch32", + "officer_id": "dian_wei", + "team": "player", + "requires_joined": true, + "pos": [2, 5] + }, + { + "unit_id": "xiahou_yuan_ch32", + "officer_id": "xiahou_yuan", + "team": "player", + "requires_joined": true, + "pos": [3, 3] + }, + { + "unit_id": "cao_ren_ch32", + "officer_id": "cao_ren", + "team": "player", + "requires_joined": true, + "pos": [3, 4] + }, + { + "unit_id": "zhou_yu_rearguard_captain", + "name": "Zhou Yu Rearguard Captain", + "class_id": "commander", + "team": "enemy", + "level": 30, + "pos": [14, 4], + "base": { "hp": 116, "mp": 38, "atk": 32, "def": 25, "int": 23, "agi": 18 } + }, + { + "unit_id": "gan_ning_raider", + "name": "Gan Ning Raider", + "class_id": "champion", + "team": "enemy", + "level": 29, + "pos": [15, 3], + "base": { "hp": 118, "mp": 10, "atk": 34, "def": 23, "int": 12, "agi": 23 } + }, + { + "unit_id": "jiangling_gate_captain", + "name": "Jiangling Gate Captain", + "class_id": "guard_captain", + "team": "enemy", + "level": 29, + "pos": [12, 4], + "base": { "hp": 90, "atk": 30, "def": 24 } + }, + { + "unit_id": "southern_scout_advisor", + "name": "Southern Scout Advisor", + "class_id": "military_advisor", + "team": "enemy", + "level": 29, + "pos": [15, 5], + "skills": ["blaze", "great_mend"], + "base": { "hp": 78, "mp": 62, "atk": 8, "def": 14, "int": 32, "agi": 16 } + }, + { + "unit_id": "jiangling_spear_north", + "name": "Jiangling Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 29, + "pos": [12, 3], + "base": { "hp": 80, "atk": 30, "def": 21 } + }, + { + "unit_id": "jiangling_spear_south", + "name": "Jiangling Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 29, + "pos": [12, 5], + "base": { "hp": 80, "atk": 30, "def": 21 } + }, + { + "unit_id": "riverbank_marksman_north", + "name": "Riverbank Marksman", + "class_id": "marksman", + "team": "enemy", + "level": 29, + "pos": [13, 2], + "base": { "hp": 72, "atk": 31, "def": 11, "agi": 23 } + }, + { + "unit_id": "riverbank_marksman_south", + "name": "Riverbank Marksman", + "class_id": "marksman", + "team": "enemy", + "level": 29, + "pos": [14, 6], + "base": { "hp": 72, "atk": 31, "def": 11, "agi": 23 } + } + ], + "events": [ + { + "id": "opening", + "once": true, + "when": { "type": "battle_start" }, + "actions": [ + { "type": "log", "text": "Near Jiangling, Cao Cao forms a rearguard while coalition detachments test the retreating army's discipline." } + ] + }, + { + "id": "opening_dialogue", + "once": true, + "when": { "type": "battle_begin" }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Cao Ren", "text": "The wagons are moving again, but every bend in the road hides another banner." }, + { "speaker": "Guo Jia", "text": "A retreat survives when the enemy stops believing it is one." }, + { "speaker": "Cao Cao", "text": "Then give them a battle small enough to win and sharp enough to remember." } + ] + } + ] + }, + { + "id": "secured_rearguard_reforms", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 2, "campaign_flags": { "secured_huarong_rearguard": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Cao Ren", "text": "The Huarong rearguard has caught up. The line can bend without breaking." }, + { "speaker": "Cao Cao", "text": "Good. Let Jiangling see that retreat has a spine." } + ] + } + ] + }, + { + "id": "rushed_return_exposes_rear", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 2, "campaign_flags": { "rushed_xuchang_return": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Gan Ning Raider", "text": "Cao Cao hurried north and left his rear thin. Cut the wagons from the road." }, + { "speaker": "Xiahou Dun", "text": "They mistake speed for fear. We can correct that." } + ] + }, + { + "type": "spawn_deployment", + "deployment": { + "unit_id": "river_pursuit_van", + "name": "River Pursuit Van", + "class_id": "cavalry", + "team": "enemy", + "level": 29, + "pos": [16, 3], + "base": { "hp": 76, "atk": 29, "def": 15, "agi": 20 } + } + } + ] + }, + { + "id": "turn_4_southern_pressure", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 4 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Zhou Yu Rearguard Captain", "text": "Do not chase Cao Cao's banner. Chase the men who still believe they can follow it." }, + { "speaker": "Guo Jia", "text": "They understand morale. That makes this more dangerous than a simple pursuit." } + ] + } + ] + }, + { + "id": "jiangling_rearguard_formed", + "once": true, + "when": { "type": "unit_reaches_tile", "team": "player", "officer_ids": ["cao_cao"], "pos": [10, 4] }, + "actions": [ + { + "type": "set_objective", + "victory": "The Jiangling rearguard is formed. Defeat the coalition pursuit.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 18." + }, + { + "type": "dialogue", + "lines": [ + { "speaker": "Cao Cao", "text": "Here. Turn the road into a wall and make them spend blood for every wagon." }, + { "speaker": "Gan Ning Raider", "text": "A wall on a retreating road still has a back. Find it!" } + ] + }, + { + "type": "spawn_deployments", + "deployments": [ + { + "unit_id": "jiangling_rearguard_guard", + "name": "Jiangling Rearguard Guard", + "class_id": "guard_captain", + "team": "enemy", + "level": 29, + "pos": [16, 4], + "base": { "hp": 88, "atk": 30, "def": 24 } + }, + { + "unit_id": "southern_arrow_screen", + "name": "Southern Arrow Screen", + "class_id": "archer", + "team": "enemy", + "level": 29, + "pos": [16, 5], + "base": { "hp": 66, "atk": 29, "def": 9, "agi": 21 } + } + ] + } + ] + }, + { + "id": "turn_9_wagons_clear", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 9 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Zhang He", "text": "The last wagons are clearing the road." }, + { "speaker": "Cao Cao", "text": "Then the rearguard has done its work. Finish what remains." } + ] + } + ] + } + ], + "rewards": { + "gold": 6200, + "items": ["bean", "wine", "imperial_seal"] + }, + "post_battle_dialogue": [ + { "speaker": "Guo Jia", "text": "Jiangling's pursuit is broken. The south will keep watching, but it cannot swallow the retreat today." }, + { "speaker": "Cao Ren", "text": "We can stabilize the southern garrisons, or send the first strong detachments west before the passes harden." }, + { "speaker": "Cao Cao", "text": "The next war will not wait for our pride to heal. Choose where our strength gathers first." } + ], + "post_battle_choices": [ + { + "id": "stabilize_jiangling_rearguard", + "label": "Stabilize Jiangling", + "description": "Cao Cao steadies the southern garrisons before turning his army toward the next front.", + "set_flags": { "stabilized_jiangling_rearguard": true, "mobilized_tong_pass_vanguard": false }, + "gold": 900, + "items": ["imperial_seal"] + }, + { + "id": "mobilize_tong_pass_vanguard", + "label": "Mobilize West", + "description": "Cao Cao sends the first detachments west, preparing for pressure around Tong Pass.", + "set_flags": { "stabilized_jiangling_rearguard": false, "mobilized_tong_pass_vanguard": true }, + "gold": 650, + "items": ["war_drum"] + } + ] +} diff --git a/docs/DATA_MODEL.md b/docs/DATA_MODEL.md index 46f45b3..d8129d8 100644 --- a/docs/DATA_MODEL.md +++ b/docs/DATA_MODEL.md @@ -42,6 +42,7 @@ 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 +data/scenarios/032_jiangling_rearguard.json ``` ## Campaign @@ -85,7 +86,8 @@ The campaign file defines scenario order, resource paths, and officers who are a { "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": "031_huarong_retreat", "title": "Huarong Retreat", "path": "res://data/scenarios/031_huarong_retreat.json" } + { "id": "031_huarong_retreat", "title": "Huarong Retreat", "path": "res://data/scenarios/031_huarong_retreat.json" }, + { "id": "032_jiangling_rearguard", "title": "Jiangling Rearguard", "path": "res://data/scenarios/032_jiangling_rearguard.json" } ] } ``` diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 28cbe3c..fb113b3 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-one-scenario campaign. +- Next-battle flow exists across the current thirty-two-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-one-scenario campaign order exists. +- Linear thirty-two-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. @@ -91,6 +91,7 @@ - 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. +- Thirty-second-scenario content exists with Jiangling rearguard pressure, southern pursuit, retreat stabilization, and 031 branch reactions. ## Milestone 5: Presentation