Add officer portrait defaults
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
## Data Files
|
||||
|
||||
- `data/defs/classes.json`: Class stats, movement types, skill access.
|
||||
- `data/defs/officers.json`: Named officer base stats and growth.
|
||||
- `data/defs/officers.json`: Named officer base stats, growth, and default portrait paths.
|
||||
- `data/defs/items.json`: Weapons, armor, accessories, and consumables.
|
||||
- `data/defs/skills.json`: MP tactic definitions for damage, healing, target rules, and range.
|
||||
- `data/defs/terrain.json`: Terrain colors, defense, avoid, and movement costs.
|
||||
|
||||
@@ -392,11 +392,11 @@ Conditions may include `after_event` to stay inactive until a one-shot event has
|
||||
|
||||
`unit_reaches_tile` checks living deployed units against a zero-based `pos` coordinate. Use `officer_ids` for persistent named officers or `unit_ids` for scenario-specific units; the validator requires one of those filters so destination objectives do not accidentally trigger from any unit. Victory destination cells are drawn as objective markers on the battle map.
|
||||
|
||||
`post_battle_dialogue` plays once after victory and before the victory result panel opens. Lines may be plain strings or objects with `speaker`, non-empty `text`, and optional `portrait` resource paths such as `res://art/portraits/cao_cao.png`. If no usable portrait is loaded, the battle scene falls back to a speaker-initial panel.
|
||||
`post_battle_dialogue` plays once after victory and before the victory result panel opens. Lines may be plain strings or objects with `speaker`, non-empty `text`, and optional `portrait` resource paths such as `res://art/portraits/cao_cao.png`. If `portrait` is omitted, `BattleState` uses a matching officer definition's default portrait path when the line's `speaker` matches the officer `name`. If no usable portrait is loaded, the battle scene falls back to a speaker-initial panel.
|
||||
|
||||
`post_battle_choices` are shown on the victory result panel after first-time scenario rewards are applied. Each choice needs a unique stable lowercase `id`, a non-empty `label`, and a `set_flags` object whose keys are stable lowercase flag ids. Choices may also grant positive `gold`, known `items`, `join_officers`, and `leave_officers`. When rewards are saved but the player has not selected a choice yet, `CampaignState.pending_post_battle_choice_scenario_id` records that scenario id so reloading the game returns to the victory choice panel instead of skipping the branch. The selected choice is saved to `CampaignState.flags`, `CampaignState.applied_post_battle_choices`, and campaign membership only when the player presses its result-panel button; completed-scenario replays do not show choices again. Save-load migration for older saves uses flags as a conservative choice signal, so avoid designing multiple choices in one scenario that can all match the same saved flag state.
|
||||
|
||||
Scenario `events` support `battle_start`, `battle_begin`, `turn_start`, and movement-triggered `unit_reaches_tile` triggers. `battle_begin` runs after the briefing is closed. `unit_reaches_tile` events run when a moved unit enters the zero-based `pos` cell; use `team`, `unit_ids`, or `officer_ids` to limit who can trigger the event. Actions currently include `log`, `dialogue`, `set_objective`, `spawn_deployment`, and `spawn_deployments`.
|
||||
Scenario `events` support `battle_start`, `battle_begin`, `turn_start`, and movement-triggered `unit_reaches_tile` triggers. `battle_begin` runs after the briefing is closed. `unit_reaches_tile` events run when a moved unit enters the zero-based `pos` cell; use `team`, `unit_ids`, or `officer_ids` to limit who can trigger the event. Actions currently include `log`, `dialogue`, `set_objective`, `spawn_deployment`, and `spawn_deployments`. Event `dialogue` actions use the same dialogue line format and portrait default rules as `post_battle_dialogue`.
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
## Milestone 5: Presentation
|
||||
|
||||
- Portrait pipeline. Dialogue lines can carry optional portrait image paths, with speaker-initial fallback when art is missing.
|
||||
- Portrait pipeline. Officer definitions can provide default portrait paths, dialogue lines can override them, and missing art falls back to speaker initials.
|
||||
- Unit sprites and animations. Board movement now has a short slide animation, and board units show low-HP warning rings.
|
||||
- Battle effects. First floating combat text now covers damage, recovery, misses, support effects, level-ups, and promotions. Hover target preview badges summarize attacks, tactics, and items.
|
||||
- Music and sound. Basic placeholder BGM and SFX now play for menus, battle flow, unit actions, tactics, items, and result states.
|
||||
|
||||
Reference in New Issue
Block a user