From 9bb72b84a4029832a84b55b9655978bb2d1d4742 Mon Sep 17 00:00:00 2001 From: Wickedness Date: Wed, 17 Jun 2026 23:20:16 +0900 Subject: [PATCH] Add Nanpi surrender scenario --- README.md | 3 +- data/campaign/campaign.json | 5 + data/scenarios/020_nanpi_surrender.json | 368 ++++++++++++++++++++++++ docs/DATA_MODEL.md | 4 +- docs/ROADMAP.md | 5 +- 5 files changed, 381 insertions(+), 4 deletions(-) create mode 100644 data/scenarios/020_nanpi_surrender.json diff --git a/README.md b/README.md index 04a13b3..60f99e1 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 -- Nineteen campaign scenarios. +- Twenty campaign scenarios. - Grid movement. - Unit selection. - Move, attack, wait, end turn. @@ -40,6 +40,7 @@ Godot 4 tactical RPG prototype inspired by classic turn-based Romance of the Thr - Ye Surrender consumes the siege branch flags and settles the city before the Yuan heirs flee north. - Northern Pursuit consumes the Ye surrender branch flags and pushes Yuan Shang's rearguard north from Ye. - Nanpi Pressure consumes the Northern Pursuit branch flags and breaks Yuan Tan's outer line. +- Nanpi Surrender consumes the Nanpi Pressure branch flags and settles Yuan Tan's last loyalists. - 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 b98b73a..fc5f68b 100644 --- a/data/campaign/campaign.json +++ b/data/campaign/campaign.json @@ -98,6 +98,11 @@ "id": "019_nanpi_pressure", "title": "Nanpi Pressure", "path": "res://data/scenarios/019_nanpi_pressure.json" + }, + { + "id": "020_nanpi_surrender", + "title": "Nanpi Surrender", + "path": "res://data/scenarios/020_nanpi_surrender.json" } ] } diff --git a/data/scenarios/020_nanpi_surrender.json b/data/scenarios/020_nanpi_surrender.json new file mode 100644 index 0000000..b975632 --- /dev/null +++ b/data/scenarios/020_nanpi_surrender.json @@ -0,0 +1,368 @@ +{ + "id": "020_nanpi_surrender", + "name": "Nanpi Surrender", + "objectives": { + "victory": "Bring Cao Cao to Nanpi's gate, then defeat Yuan Tan's last loyalists.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 16." + }, + "conditions": { + "victory": { "type": "all_units_defeated", "team": "enemy", "after_event": "nanpi_gate_opened" }, + "defeat": [ + { "type": "any_officer_defeated", "team": "player", "officer_ids": ["cao_cao"] }, + { "type": "turn_reached", "turn": 16, "team": "player" } + ] + }, + "briefing": { + "title": "Nanpi Surrender", + "location": "Nanpi Gate, 203 CE", + "lines": [ + "Nanpi's outer line has broken. Yuan Tan's court hides behind the city gate while frightened officers argue over surrender terms.", + "Cao Cao advances to make the decision visible, with Zhang He reading which defenders still choose the Yuan name over survival." + ], + "conditional_lines": [ + { + "campaign_flags": { "pressed_yuan_tan_surrender": true }, + "lines": [ + "Direct pressure leaves Yuan Tan's loyalists cornered and loud, but the court has little time left to invent courage." + ] + }, + { + "campaign_flags": { "secured_nanpi_admin": true }, + "lines": [ + "Nanpi officials already know Cao Cao's terms, and several gate officers are waiting for the safest moment to lay down arms." + ] + } + ] + }, + "shop": { + "items": [ + "bean", + "wine", + "iron_sword", + "training_spear", + "short_bow", + "hand_axe", + "war_axe", + "leather_armor", + "iron_armor" + ], + "conditional_items": [ + { + "campaign_flags": { "pressed_yuan_tan_surrender": true }, + "items": ["war_drum"] + }, + { + "campaign_flags": { "secured_nanpi_admin": true }, + "items": ["imperial_seal"] + } + ] + }, + "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": [ + "GGGGGHHGGGGGGGGGGG", + "GGFFGHHGGGFFGGGFFG", + "GGRRRRRRRRRRRRGFFG", + "GGGGGRGGGGRRGGGGGG", + "RRRRRRRRRRRRRRRRRR", + "GGGGGRGGGGRRGGGGGG", + "GGHHGFFFGGFFFGGHHG", + "GGHHGFFFGGFFFGGHHG", + "GGGGGGFFGGHHHGGGGG", + "GGFFGGGGGGHHHFFGGG", + "GGGGGGGGGGGGGGGGGG" + ] + }, + "deployments": [ + { + "unit_id": "cao_cao_ch20", + "officer_id": "cao_cao", + "team": "player", + "pos": [1, 4] + }, + { + "unit_id": "guo_jia_ch20", + "officer_id": "guo_jia", + "team": "player", + "requires_joined": true, + "pos": [2, 4] + }, + { + "unit_id": "zhang_he_ch20", + "officer_id": "zhang_he", + "team": "player", + "requires_joined": true, + "pos": [2, 3] + }, + { + "unit_id": "xiahou_dun_ch20", + "officer_id": "xiahou_dun", + "team": "player", + "pos": [1, 5] + }, + { + "unit_id": "dian_wei_ch20", + "officer_id": "dian_wei", + "team": "player", + "requires_joined": true, + "pos": [2, 5] + }, + { + "unit_id": "xiahou_yuan_ch20", + "officer_id": "xiahou_yuan", + "team": "player", + "requires_joined": true, + "pos": [3, 3] + }, + { + "unit_id": "cao_ren_ch20", + "officer_id": "cao_ren", + "team": "player", + "requires_joined": true, + "pos": [3, 4] + }, + { + "unit_id": "yuan_tan_last_guard", + "name": "Yuan Tan Last Guard", + "class_id": "commander", + "team": "enemy", + "level": 19, + "pos": [14, 4], + "base": { "hp": 92, "mp": 24, "atk": 25, "def": 19, "int": 14, "agi": 13 } + }, + { + "unit_id": "nanpi_gate_loyalist", + "name": "Nanpi Gate Loyalist", + "class_id": "guard_captain", + "team": "enemy", + "level": 18, + "pos": [12, 4], + "base": { "hp": 68, "atk": 22, "def": 17 } + }, + { + "unit_id": "nanpi_court_advisor", + "name": "Court Advisor", + "class_id": "military_advisor", + "team": "enemy", + "level": 18, + "pos": [15, 5], + "skills": ["blaze", "great_mend"], + "base": { "hp": 56, "mp": 40, "atk": 7, "def": 9, "int": 21, "agi": 11 } + }, + { + "unit_id": "nanpi_inner_spear_north", + "name": "Inner Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 18, + "pos": [12, 3], + "base": { "hp": 60, "atk": 21, "def": 14 } + }, + { + "unit_id": "nanpi_inner_spear_south", + "name": "Inner Spear Guard", + "class_id": "infantry", + "team": "enemy", + "level": 18, + "pos": [12, 5], + "base": { "hp": 60, "atk": 21, "def": 14 } + }, + { + "unit_id": "nanpi_inner_archer_north", + "name": "Inner Archer", + "class_id": "marksman", + "team": "enemy", + "level": 18, + "pos": [13, 2], + "base": { "hp": 50, "atk": 21, "def": 8, "agi": 16 } + }, + { + "unit_id": "nanpi_inner_archer_south", + "name": "Inner Archer", + "class_id": "marksman", + "team": "enemy", + "level": 18, + "pos": [14, 6], + "base": { "hp": 50, "atk": 21, "def": 8, "agi": 16 } + }, + { + "unit_id": "nanpi_last_rider", + "name": "Nanpi Last Rider", + "class_id": "elite_cavalry", + "team": "enemy", + "level": 18, + "pos": [15, 3], + "base": { "hp": 64, "atk": 22, "def": 13, "agi": 16 } + } + ], + "events": [ + { + "id": "opening", + "once": true, + "when": { "type": "battle_start" }, + "actions": [ + { "type": "log", "text": "Nanpi's gate waits between surrender and Yuan Tan's last loyalists." } + ] + }, + { + "id": "opening_dialogue", + "once": true, + "when": { "type": "battle_begin" }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Guo Jia", "text": "The gate officers are counting lives now. Yuan Tan's name is becoming an expensive habit." }, + { "speaker": "Cao Cao", "text": "Then we show them the price of keeping it." }, + { "speaker": "Zhang He", "text": "Those who still resist will be the ones with nowhere to stand after the gate opens." } + ] + } + ] + }, + { + "id": "direct_surrender_pressure", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 2, "campaign_flags": { "pressed_yuan_tan_surrender": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Yuan Tan Last Guard", "text": "Cao Cao thinks pressure will open Nanpi. Let the gate see we still have blades." }, + { "speaker": "Xiahou Dun", "text": "Good. The loud ones are coming out where we can reach them." } + ] + }, + { + "type": "spawn_deployment", + "deployment": { + "unit_id": "desperate_nanpi_rider", + "name": "Desperate Nanpi Rider", + "class_id": "cavalry", + "team": "enemy", + "level": 18, + "pos": [16, 3], + "base": { "hp": 54, "atk": 20, "def": 10, "agi": 14 } + } + } + ] + }, + { + "id": "admin_gate_terms", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 2, "campaign_flags": { "secured_nanpi_admin": true } }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Guo Jia", "text": "Nanpi officials have heard the terms twice. The gate only needs a reason to call them law." }, + { "speaker": "Cao Cao", "text": "Then advance with discipline. A city surrenders to order, not noise." } + ] + } + ] + }, + { + "id": "turn_3_last_loyalists", + "once": true, + "when": { "type": "turn_start", "team": "enemy", "turn": 3 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Nanpi Gate Loyalist", "text": "No gate opens while Yuan Tan still breathes inside it." }, + { "speaker": "Zhang He", "text": "They are defending the idea of a lord more fiercely than the lord himself." } + ] + } + ] + }, + { + "id": "nanpi_gate_opened", + "once": true, + "when": { "type": "unit_reaches_tile", "team": "player", "officer_ids": ["cao_cao"], "pos": [10, 4] }, + "actions": [ + { + "type": "set_objective", + "victory": "Nanpi's gate is open. Defeat Yuan Tan's loyalists who reject surrender.", + "defeat": "Cao Cao is defeated or the battle reaches Turn 16." + }, + { + "type": "dialogue", + "lines": [ + { "speaker": "Cao Cao", "text": "Open the gate under my banner. Those who surrender will keep their households." }, + { "speaker": "Yuan Tan Last Guard", "text": "Then our households will remember us as men who did not kneel." } + ] + }, + { + "type": "spawn_deployments", + "deployments": [ + { + "unit_id": "yuan_tan_palace_guard", + "name": "Yuan Tan Palace Guard", + "class_id": "guard_captain", + "team": "enemy", + "level": 18, + "pos": [16, 4], + "base": { "hp": 64, "atk": 21, "def": 16 } + }, + { + "unit_id": "yuan_tan_palace_archer", + "name": "Yuan Tan Palace Archer", + "class_id": "archer", + "team": "enemy", + "level": 18, + "pos": [16, 5], + "base": { "hp": 44, "atk": 19, "def": 7, "agi": 14 } + } + ] + } + ] + }, + { + "id": "turn_8_nanpi_breaks", + "once": true, + "when": { "type": "turn_start", "team": "player", "turn": 8 }, + "actions": [ + { + "type": "dialogue", + "lines": [ + { "speaker": "Guo Jia", "text": "The gate has chosen tomorrow. Only yesterday is still armed." }, + { "speaker": "Cao Cao", "text": "Then disarm yesterday." } + ] + } + ] + } + ], + "rewards": { + "gold": 3800, + "items": ["bean", "wine", "imperial_seal"] + }, + "post_battle_dialogue": [ + { "speaker": "Zhang He", "text": "Nanpi has surrendered. Yuan Tan's name no longer commands a gate, only scattered men." }, + { "speaker": "Guo Jia", "text": "Scattered men can still become banners if ignored long enough." }, + { "speaker": "Cao Cao", "text": "Then we decide whether to chase the banners or bind the province before they gather." } + ], + "post_battle_choices": [ + { + "id": "pursue_yuan_brothers", + "label": "Pursue Yuan Brothers", + "description": "Cao Cao sends columns after the fleeing Yuan heirs before they find new allies.", + "set_flags": { "pursued_yuan_brothers": true, "secured_bohai_commandery": false }, + "gold": 200, + "items": ["war_drum"] + }, + { + "id": "secure_bohai_commandery", + "label": "Secure Bohai", + "description": "The army steadies Bohai commandery and turns surrendered towns into supply anchors.", + "set_flags": { "pursued_yuan_brothers": false, "secured_bohai_commandery": true }, + "gold": 500, + "items": ["iron_armor"] + } + ] +} diff --git a/docs/DATA_MODEL.md b/docs/DATA_MODEL.md index d0012b9..d45a112 100644 --- a/docs/DATA_MODEL.md +++ b/docs/DATA_MODEL.md @@ -30,6 +30,7 @@ data/scenarios/016_ye_siege.json data/scenarios/017_ye_surrender.json data/scenarios/018_northern_pursuit.json data/scenarios/019_nanpi_pressure.json +data/scenarios/020_nanpi_surrender.json ``` ## Campaign @@ -61,7 +62,8 @@ The campaign file defines scenario order, resource paths, and officers who are a { "id": "016_ye_siege", "title": "Ye Siege", "path": "res://data/scenarios/016_ye_siege.json" }, { "id": "017_ye_surrender", "title": "Ye Surrender", "path": "res://data/scenarios/017_ye_surrender.json" }, { "id": "018_northern_pursuit", "title": "Northern Pursuit", "path": "res://data/scenarios/018_northern_pursuit.json" }, - { "id": "019_nanpi_pressure", "title": "Nanpi Pressure", "path": "res://data/scenarios/019_nanpi_pressure.json" } + { "id": "019_nanpi_pressure", "title": "Nanpi Pressure", "path": "res://data/scenarios/019_nanpi_pressure.json" }, + { "id": "020_nanpi_surrender", "title": "Nanpi Surrender", "path": "res://data/scenarios/020_nanpi_surrender.json" } ] } ``` diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 89bb69c..1ffe1f4 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 nineteen-scenario campaign. +- Next-battle flow exists across the current twenty-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 nineteen-scenario campaign order exists. +- Linear twenty-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. @@ -79,6 +79,7 @@ - Seventeenth-scenario content exists with Ye surrender, last loyalist resistance, and 016 branch reactions. - Eighteenth-scenario content exists with Northern Pursuit, Yuan Shang's rearguard, and 017 branch reactions. - Nineteenth-scenario content exists with Nanpi pressure, Yuan Tan's outer defense, and 018 branch reactions. +- Twentieth-scenario content exists with Nanpi surrender, Yuan Tan loyalists, and 019 branch reactions. ## Milestone 5: Presentation