From 43fe7be4b0ced3d742c2421efde56c293b63cca4 Mon Sep 17 00:00:00 2001 From: Wickedness Date: Thu, 18 Jun 2026 01:10:20 +0900 Subject: [PATCH] Add Ruxu river line scenario --- README.md | 3 +- data/campaign/campaign.json | 5 + data/scenarios/043_ruxu_river_line.json | 363 ++++++++++++++++++++++++ docs/DATA_MODEL.md | 6 +- docs/ROADMAP.md | 5 +- 5 files changed, 378 insertions(+), 4 deletions(-) create mode 100644 data/scenarios/043_ruxu_river_line.json diff --git a/README.md b/README.md index 5e6e2a9..6cf138e 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 -- Forty-two campaign scenarios. +- Forty-three campaign scenarios. - Grid movement. - Unit selection. - Move, attack, wait, end turn. @@ -63,6 +63,7 @@ Godot 4 tactical RPG prototype inspired by classic turn-based Romance of the Thr - Hanzhong Gate consumes the Hanzhong Approach branch flags and opens Zhang Lu submission or Hanzhong pacification follow-up choices. - Hanzhong Settlement consumes the Hanzhong Gate branch flags and turns the basin toward a Hanzhong garrison or Ruxu pivot. - Ruxu Advance consumes the Hanzhong Settlement branch flags and opens Ruxu bank or Sun Quan river-line follow-up choices. +- Ruxu River Line consumes the Ruxu Advance branch flags and introduces water-move enemy boats along the riverbank. - 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 b4b14b2..497df94 100644 --- a/data/campaign/campaign.json +++ b/data/campaign/campaign.json @@ -213,6 +213,11 @@ "id": "042_ruxu_advance", "title": "Ruxu Advance", "path": "res://data/scenarios/042_ruxu_advance.json" + }, + { + "id": "043_ruxu_river_line", + "title": "Ruxu River Line", + "path": "res://data/scenarios/043_ruxu_river_line.json" } ] } diff --git a/data/scenarios/043_ruxu_river_line.json b/data/scenarios/043_ruxu_river_line.json new file mode 100644 index 0000000..9b2e133 --- /dev/null +++ b/data/scenarios/043_ruxu_river_line.json @@ -0,0 +1,363 @@ +{ + "id": "043_ruxu_river_line", + "name": "Ruxu River Line", + "objectives": { + "victory": "Reach Sun Quan's river line with Cao Cao, then defeat the Wu river commander.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 18." + }, + "conditions": { + "victory": { "type": "all_units_defeated", "team": "enemy", "after_event": "sun_quan_line_reached" }, + "defeat": [ + { "type": "any_officer_defeated", "team": "player", "officer_ids": ["cao_cao"] }, + { "type": "turn_reached", "turn": 18, "team": "player" } + ] + }, + "briefing": { + "title": "Ruxu River Line", + "location": "Ruxu River Line, Eastern Front, 217 CE", + "lines": [ + "The Ruxu bank is open, but Sun Quan's deeper river line still covers the channels beyond the first camps.", + "Cao Cao must break the Wu boats watching the bank before the river becomes a wall again." + ], + "conditional_lines": [ + { + "campaign_flags": { "secured_ruxu_bank": true }, + "lines": [ + "Securing the Ruxu bank gives Cao Cao time to stake camps and bring shield screens close to the river line." + ] + }, + { + "campaign_flags": { "pressed_sun_quan_line": true }, + "lines": [ + "Pressing Sun Quan's line keeps Wu unsettled, but Gan Ning's boats are already slipping into the side channels." + ] + } + ] + }, + "shop": { + "items": [ + "bean", + "wine", + "iron_sword", + "training_spear", + "short_bow", + "hand_axe", + "war_axe", + "leather_armor", + "iron_armor" + ], + "conditional_items": [ + { + "campaign_flags": { "secured_ruxu_bank": true }, + "items": ["imperial_seal"] + }, + { + "campaign_flags": { "pressed_sun_quan_line": 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": [ + "WWWWWWWWWWWWWWWWWW", + "WGGGFFWWRRWWFFGGGW", + "GGGGWWGGGGRRGGGGGG", + "GGFFWWGGRRRRGFFGGG", + "RRRRRRRRRRRRRRRRRR", + "GGFFWWGGRRRRGFFGGG", + "GGGGWWGGGGRRGGGGGG", + "GHHHWWGFFFGGFFFGGG", + "GHHHWWGGGGHHHGGGGG", + "GGGGWWGGGGHHHFFGGG", + "WWWWWWWWWWWWWWWWWW" + ] + }, + "deployments": [ + { + "unit_id": "cao_cao_ch43", + "officer_id": "cao_cao", + "team": "player", + "pos": [1, 4] + }, + { + "unit_id": "guo_jia_ch43", + "officer_id": "guo_jia", + "team": "player", + "requires_joined": true, + "pos": [2, 4] + }, + { + "unit_id": "zhang_he_ch43", + "officer_id": "zhang_he", + "team": "player", + "requires_joined": true, + "pos": [2, 3] + }, + { + "unit_id": "xiahou_dun_ch43", + "officer_id": "xiahou_dun", + "team": "player", + "pos": [1, 5] + }, + { + "unit_id": "dian_wei_ch43", + "officer_id": "dian_wei", + "team": "player", + "requires_joined": true, + "pos": [2, 5] + }, + { + "unit_id": "xiahou_yuan_ch43", + "officer_id": "xiahou_yuan", + "team": "player", + "requires_joined": true, + "pos": [3, 3] + }, + { + "unit_id": "cao_ren_ch43", + "officer_id": "cao_ren", + "team": "player", + "requires_joined": true, + "pos": [3, 4] + }, + { + "unit_id": "sun_quan_river_commander", + "name": "Sun Quan River Commander", + "class_id": "commander", + "team": "enemy", + "level": 40, + "pos": [14, 4], + "base": { "hp": 136, "mp": 58, "atk": 41, "def": 33, "int": 33, "agi": 22 } + }, + { + "unit_id": "ruxu_line_captain", + "name": "Ruxu Line Captain", + "class_id": "guard_captain", + "team": "enemy", + "level": 40, + "pos": [12, 4], + "base": { "hp": 112, "atk": 41, "def": 34 } + }, + { + "unit_id": "gan_ning_strike_boat", + "name": "Gan Ning Strike Boat", + "class_id": "champion", + "team": "enemy", + "move_type": "water", + "level": 40, + "pos": [4, 3], + "base": { "hp": 140, "mp": 12, "atk": 43, "def": 30, "int": 13, "agi": 27 } + }, + { + "unit_id": "lu_meng_line_advisor", + "name": "Lu Meng Line Advisor", + "class_id": "military_advisor", + "team": "enemy", + "level": 40, + "pos": [13, 5], + "skills": ["blaze", "great_mend"], + "base": { "hp": 100, "mp": 84, "atk": 8, "def": 21, "int": 43, "agi": 20 } + }, + { + "unit_id": "ruxu_line_spear_north", + "name": "Ruxu Line Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 40, + "pos": [12, 3], + "base": { "hp": 102, "atk": 41, "def": 31 } + }, + { + "unit_id": "ruxu_line_spear_south", + "name": "Ruxu Line Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 40, + "pos": [12, 5], + "base": { "hp": 102, "atk": 41, "def": 31 } + }, + { + "unit_id": "ruxu_arrow_boat", + "name": "Ruxu Arrow Boat", + "class_id": "marksman", + "team": "enemy", + "move_type": "water", + "level": 40, + "pos": [5, 5], + "base": { "hp": 94, "atk": 42, "def": 18, "agi": 30 } + } + ], + "events": [ + { + "id": "opening", + "once": true, + "when": { "type": "battle_start" }, + "actions": [ + { "type": "log", "text": "Wu's Ruxu river line waits behind the first bank, with strike boats moving through the side channels." } + ] + }, + { + "id": "opening_dialogue", + "once": true, + "when": { "type": "battle_begin" }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Zhang He", "text": "Those boats are not decorations. Wu means to strike the bank from the water itself." }, + { "speaker": "Guo Jia", "text": "Then our line must watch two roads: the one underfoot, and the one that floats." }, + { "speaker": "Cao Cao", "text": "Break the boats close to shore, then break the men who trusted them." } + ] + } + ] + }, + { + "id": "secured_bank_extends_camps", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 2, "campaign_flags": { "secured_ruxu_bank": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Cao Ren", "text": "The secured bank let us stake camps close to the water. The shield line is ready." }, + { "speaker": "Cao Cao", "text": "Good. Let Wu find iron where it expected mud." } + ] + } + ] + }, + { + "id": "pressed_line_sends_fire_boats", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 2, "campaign_flags": { "pressed_sun_quan_line": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Sun Quan River Commander", "text": "Cao Cao presses before the camps settle. Send fire boats into the channel and make haste burn." }, + { "speaker": "Xiahou Dun", "text": "If they want a quick fight, we will give them a short one." } + ] + }, + { + "type": "spawn_deployment", + "deployment": { + "unit_id": "ruxu_fire_boat_flank", + "name": "Ruxu Fire Boat", + "class_id": "champion", + "team": "enemy", + "move_type": "water", + "level": 40, + "pos": [5, 3], + "base": { "hp": 104, "atk": 39, "def": 22, "agi": 28 } + } + } + ] + }, + { + "id": "turn_4_boats_close", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 4 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Lu Meng Line Advisor", "text": "Hold the bank troops in place. Let the boats cut the courage from their sides." }, + { "speaker": "Guo Jia", "text": "They are trying to make our formation face the river instead of the commander." } + ] + } + ] + }, + { + "id": "sun_quan_line_reached", + "once": true, + "when": { "type": "unit_reaches_tile", "team": "player", "officer_ids": ["cao_cao"], "pos": [10, 4] }, + "actions": [ + { + "type": "set_objective", + "victory": "Sun Quan's river line is reached. Defeat the Wu river commander.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 18." + }, + { + "type": "dialogue", + "lines": [ + { "speaker": "Cao Cao", "text": "This is Sun Quan's line. Take the bank and the boats lose their shield." }, + { "speaker": "Sun Quan River Commander", "text": "Ruxu does not yield because your banner reaches the mud." } + ] + }, + { + "type": "spawn_deployments", + "deployments": [ + { + "unit_id": "sun_quan_halberd_guard", + "name": "Sun Quan Halberd Guard", + "class_id": "guard_captain", + "team": "enemy", + "level": 40, + "pos": [16, 4], + "base": { "hp": 110, "atk": 41, "def": 34 } + }, + { + "unit_id": "ruxu_chain_arrow_boat", + "name": "Ruxu Chain Arrow Boat", + "class_id": "marksman", + "team": "enemy", + "move_type": "water", + "level": 40, + "pos": [10, 1], + "base": { "hp": 88, "atk": 40, "def": 14, "agi": 29 } + } + ] + } + ] + }, + { + "id": "turn_9_river_line_breaks", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 9 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Zhang He", "text": "The river boats are pulling back. Their bank troops are losing the rhythm." }, + { "speaker": "Cao Cao", "text": "Then keep the beat until Wu cannot march to it." } + ] + } + ] + } + ], + "rewards": { + "gold": 8400, + "items": ["bean", "wine", "war_drum"] + }, + "post_battle_dialogue": [ + { "speaker": "Guo Jia", "text": "Sun Quan's river line bends, but Ruxu is not yet a crossing. Wu still has depth beyond the water." }, + { "speaker": "Cao Ren", "text": "Anchor the camps and the line will hold. Force the crossing now and Wu may not have time to breathe." }, + { "speaker": "Cao Cao", "text": "A river gives no answer twice. Choose how we use this one." } + ], + "post_battle_choices": [ + { + "id": "anchor_ruxu_camps", + "label": "Anchor Camps", + "description": "Cao Cao anchors the Ruxu camps and turns the river line into a stable eastern base.", + "set_flags": { "anchored_ruxu_camps": true, "forced_ruxu_crossing": false }, + "gold": 1400, + "items": ["imperial_seal"] + }, + { + "id": "force_ruxu_crossing", + "label": "Force Crossing", + "description": "Cao Cao forces a Ruxu crossing before Wu can rebuild its river defense.", + "set_flags": { "anchored_ruxu_camps": false, "forced_ruxu_crossing": true }, + "gold": 1200, + "items": ["war_drum"] + } + ] +} diff --git a/docs/DATA_MODEL.md b/docs/DATA_MODEL.md index fe49ebd..363d257 100644 --- a/docs/DATA_MODEL.md +++ b/docs/DATA_MODEL.md @@ -53,6 +53,7 @@ data/scenarios/039_hanzhong_approach.json data/scenarios/040_hanzhong_gate.json data/scenarios/041_hanzhong_settlement.json data/scenarios/042_ruxu_advance.json +data/scenarios/043_ruxu_river_line.json ``` ## Campaign @@ -107,7 +108,8 @@ The campaign file defines scenario order, resource paths, and officers who are a { "id": "039_hanzhong_approach", "title": "Hanzhong Approach", "path": "res://data/scenarios/039_hanzhong_approach.json" }, { "id": "040_hanzhong_gate", "title": "Hanzhong Gate", "path": "res://data/scenarios/040_hanzhong_gate.json" }, { "id": "041_hanzhong_settlement", "title": "Hanzhong Settlement", "path": "res://data/scenarios/041_hanzhong_settlement.json" }, - { "id": "042_ruxu_advance", "title": "Ruxu Advance", "path": "res://data/scenarios/042_ruxu_advance.json" } + { "id": "042_ruxu_advance", "title": "Ruxu Advance", "path": "res://data/scenarios/042_ruxu_advance.json" }, + { "id": "043_ruxu_river_line", "title": "Ruxu River Line", "path": "res://data/scenarios/043_ruxu_river_line.json" } ] } ``` @@ -239,6 +241,8 @@ Scenario `formation.cells` controls the highlighted starting cells available dur Scenarios should use deployments rather than full inline unit stat blocks. `DataCatalog` will resolve officer, class, and item references into runtime unit dictionaries. Scenarios may also define briefing text, visible objective text, battle conditions, and victory rewards. +Scenario deployments may override `move_type` for special units. For example, a river boat can keep an existing combat class but set `"move_type": "water"` so it can deploy and path on `W` water tiles while normal foot, mounted, and archer units treat those cells as impassable. + ```json { "id": "001_yellow_turbans", diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 9e14ef6..e70051e 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 forty-two-scenario campaign. +- Next-battle flow exists across the current forty-three-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 forty-two-scenario campaign order exists. +- Linear forty-three-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. @@ -102,6 +102,7 @@ - Fortieth-scenario content exists with Hanzhong gate pressure, Zhang Lu's mountain guard, pass-road siege stakes, 039 branch reactions, and submission or pacification follow-up flags. - Forty-first-scenario content exists with Hanzhong basin settlement, storehouse pressure, Zhang Lu submission or pacification branch reactions, and Hanzhong garrison or Ruxu pivot follow-up flags. - Forty-second-scenario content exists with Ruxu riverbank pressure, Wu vanguard resistance, Hanzhong garrison or Ruxu pivot branch reactions, and Ruxu bank or Sun Quan river-line follow-up flags. +- Forty-third-scenario content exists with Ruxu river-line pressure, water-move enemy boats, Ruxu bank or Sun Quan line branch reactions, and Ruxu camp or crossing follow-up flags. ## Milestone 5: Presentation