Add first support tactic
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
4. Show scenario briefing, including the 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. Tactic buttons show MP cost, kind, range, and power. Physical attacks roll hit chance from unit agility and target terrain avoid; misses give reduced EXP. The scene plays placeholder SFX for core action and UI feedback.
|
||||
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. Tactic buttons show MP cost, kind, range, and power or support effect. Physical attacks roll hit chance from unit agility and target terrain avoid; misses give reduced EXP. The scene plays placeholder SFX for core action and UI feedback.
|
||||
8. Player ends turn.
|
||||
9. Enemy AI moves, attacks, and can cast damage or healing 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.
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
## Save Boundary
|
||||
|
||||
`BattleState` owns tactical runtime fields. `CampaignState` saves only campaign-facing data: completed scenario ids, gold, inventory counts, joined officers, campaign flags, and a player roster snapshot. It does not save map positions, pre-battle Formation choices, action flags, or transient battle occupancy.
|
||||
`BattleState` owns tactical runtime fields. `CampaignState` saves only campaign-facing data: completed scenario ids, gold, inventory counts, joined officers, campaign flags, and a player roster snapshot. It does not save map positions, pre-battle Formation choices, action flags, temporary status effects, or transient battle occupancy.
|
||||
|
||||
Joined officers gate whether `requires_joined` player deployments are loaded at all. Rewards and post-battle choices can add or remove joined officers without deleting their saved roster snapshot, so a later rejoin can preserve progression. When a save loads, `CampaignState` scans completed scenarios in campaign order and reapplies only officer join/leave transitions from rewards and the saved `applied_post_battle_choices` ledger, allowing added recruitment rewards to reach older saves without replaying gold or items. Old saves without the ledger can backfill a choice id only when exactly one completed scenario choice matches saved flags. Roster entries are keyed by `officer_id` when available, so future scenarios can deploy the same joined officer under different scenario-specific `unit_id` values. Saved progression overlays final battle stats for now; a later equipment refactor should split base stats from equipment bonuses before adding item leveling or stat recalculation. New battles currently start player units healed to their saved maximum HP/MP. Skill access is carried in roster snapshots, with class defaults still applied for old saves that do not include skills. Promoted class ids are saved in the roster, and the next battle rehydrates class-derived movement, growth, skills, and range from the saved class id before equipment range is recalculated.
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ Classes provide movement, min/max attack range, skill access, growth grades, cla
|
||||
|
||||
## Skills
|
||||
|
||||
Skills define MP tactics. A class, officer, or scenario deployment can add skill ids to the runtime unit. `range` is `[min, max]` in Manhattan distance and can use `0` as the minimum for self-targeting support skills. Enemy AI can use `damage` and `heal` skills when it has enough MP.
|
||||
Skills define MP tactics. A class, officer, or scenario deployment can add skill ids to the runtime unit. `range` is `[min, max]` in Manhattan distance and can use `0` as the minimum for self-targeting support skills. Skill `kind` can be `damage`, `heal`, or `support`. Enemy AI can use `damage` and `heal` skills when it has enough MP.
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -232,7 +232,9 @@ Skills define MP tactics. A class, officer, or scenario deployment can add skill
|
||||
}
|
||||
```
|
||||
|
||||
The current single-target tactic set includes `spark`, `fire_tactic`, `blaze`, `mend`, and `great_mend`. Hero and strategist classes get low-cost Spark alongside Fire/Mend, promoted command/advisor classes add Great Mend, and late scenario deployments can add stronger pressure skills such as Blaze without changing their base class.
|
||||
Support skills use an `effects` array. The first supported effect is `stat_bonus`, with `stat` in `atk`, `def`, `int`, or `agi`, a non-zero `amount`, and positive `duration_turns`. These effects are battle-only and expire when the target's team begins enough future phases.
|
||||
|
||||
The current single-target tactic set includes `spark`, `fire_tactic`, `blaze`, `mend`, `great_mend`, and `guard_order`. Hero and strategist classes get low-cost Spark alongside Fire/Mend and Guard Order, promoted command/advisor classes add Great Mend, and late scenario deployments can add stronger pressure skills such as Blaze without changing their base class.
|
||||
|
||||
## Terrain
|
||||
|
||||
@@ -461,7 +463,7 @@ Event-spawned units use the same compact deployment shape as scenario starting u
|
||||
|
||||
## Current Implementation
|
||||
|
||||
`scripts/core/data_catalog.gd` reads definition files once and `BattleState._apply_battle_data()` accepts either legacy `units` or catalog-backed `deployments`. Runtime units now carry `min_range`, `range`, `skills`, `exp`, `growth`, and `growth_bonus` so the battle resolver can handle counterattacks, MP tactics, EXP, level-ups, and enemy tactic AI without changing scenario files.
|
||||
`scripts/core/data_catalog.gd` reads definition files once and `BattleState._apply_battle_data()` accepts either legacy `units` or catalog-backed `deployments`. Runtime units now carry `min_range`, `range`, `skills`, `exp`, `growth`, `growth_bonus`, and battle-only `status_effects` so the battle resolver can handle counterattacks, MP tactics, support effects, EXP, level-ups, and enemy tactic AI without changing scenario files.
|
||||
|
||||
`scripts/core/campaign_state.gd` writes `user://campaign_save.json` with `save_version`, completed scenarios, gold, inventory counts, joined officers, pending post-battle choice scenario id, applied post-battle choice ids, campaign flags, and player roster progression. Roster snapshots include level, EXP, stats, class id/name, class-derived movement/range/growth fields, skills, and equipment. Rewards, joined/left officers, and post-battle choices are guarded by completed scenario id so restarting a finished battle does not duplicate gold, items, membership changes, or branch decisions. On load, completed-scenario officer join/leave transitions are reconciled without replaying gold or item rewards, which lets new officer rewards added to older completed scenarios become available to existing saves.
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
- Weapon, armor, and accessory slots. Basic stat bonuses exist.
|
||||
- Equipment rewards can be stored, displayed, and swapped from the battle HUD.
|
||||
- Terrain movement, defense, and avoid modifiers affect combat.
|
||||
- Skills, tactics, and MP. Multiple single-target damage/heal tactics, a skill list menu with range/power hints, and enemy tactic AI exist.
|
||||
- Skills, tactics, and MP. Multiple single-target damage/heal tactics, a first support buff, a skill list menu with range/effect hints, and enemy tactic AI exist.
|
||||
- Consumable item use. Basic global inventory, Bean HP recovery, Wine MP recovery, item menu, preview, and target overlay exist.
|
||||
- Counterattacks exist. Support effects are still planned.
|
||||
- Counterattacks exist. A first battle-only support status effect exists; richer support and debuff effects are still planned.
|
||||
- Battle EXP, level-ups, class promotion, and campaign roster persistence exist.
|
||||
|
||||
## Milestone 3: Scenario Layer
|
||||
|
||||
Reference in New Issue
Block a user