Skip to content

[Gameplay] Meaningful Build Variety — Run Blessings, Build Tracker & End-of-Run Summary - #611

Merged
niyazmft merged 1 commit into
mainfrom
feat/build-variety-blessings
Jul 13, 2026
Merged

niyazmft merged 1 commit into
mainfrom
feat/build-variety-blessings

Conversation

@niyazmft

Copy link
Copy Markdown
Owner

Summary

Adds a Run Blessing system that gives players a meaningful choice at the start of each run, creating divergent build paths and making each run feel distinct.

Problem

Community feedback shows that "runs feeling samey" is the #2 complaint. If every Emberfall run prioritizes the same combo path, the game becomes a solved puzzle rather than a tactical challenge.

Changes

New: BlessingSystem

  • scripts/core/blessing_system.gd: Autoload singleton
  • Deterministic generation: 3 blessings generated from run seed (FR5) — identical across platforms for speedrunners
  • Modifier queries: damage_multiplier, ap_cost_modifier, hp_max_bonus, def_bonus, spd_bonus, combo_damage_bonus, desperation_multiplier

New: BuildTracker

  • scripts/core/build_tracker.gd: Autoload singleton
  • Tracks: kills, damage dealt/taken, rooms cleared, moral weight, element usage, combo usage
  • Playstyle tags: Pyromaniac, Tactician, Glass Cannon, Zone Controller, Survivor, Assassin, Aggressor, Endurer, Pacifist, Burdened

New: BlessingSelectionModal

  • scripts/ui/blessing_selection_modal.gd: Modal with 3 gold-bordered cards
  • Shows name, description, and tags per blessing

15 Unique Blessings

Blessing Effect Build Path
Wind Discipline Wind -1 AP, -20% dmg, +2 SPD Glass Cannon
Oil Presence Oil +3 turns, +3 DEF Zone Control
Fire Fury Fire +25% dmg, -10 HP Pyromaniac
Water Clarity AP regen +1, -10% dmg Tactician
Earth Roots +20 HP, +4 DEF, -2 SPD Survivor
Lightning Instinct +5 SPD, first strike +30%, -2 DEF Assassin
Burden Forge +2% dmg per moral flag, +50% moral Burdened
Pacifist Oath Spare heal +15, -40% dmg, +5 DEF Pacifist
Combo Master Combo +20% dmg, combo -1 AP Versatile
Vanguard Adjacent +20% dmg, melee -1 AP Bruiser
Sniper Eye Ranged +25% dmg, melee -15% Precision
Adaptive Shell First hit -50% dmg, +2 DEF Defensive
Echo Parasite +5 HP on kill, -50% moral Drain
Ember Blood +10% dmg, desperation 3x Desperation
Tide Walker Move -1 AP, +1 range Mobility

Integration Points

  • CombatFormula: Blessing damage multiplier applied in compute_damage()
  • CombatRoom: Stat bonuses applied on player spawn; desperation multiplier honored
  • GameCoordinator: Blessing modal shown after "New Game", before combat
  • RunManager: Blessing + build data persisted in save/load state

Testing

  • 410 tests | 0 errors | 0 failures | 77/77 suites
  • Headless editor scan: clean

Related Issues

Closes #599

…End-of-Run Summary

## Summary

Adds a Run Blessing system that gives players a meaningful choice at the
start of each run, creating divergent build paths and making each run feel
distinct.

## Changes

### New: BlessingSystem
- scripts/core/blessing_system.gd: Autoload that manages blessing generation
- Deterministically generates 3 blessings from run seed (FR5)
- Supports damage_multiplier, ap_cost_modifier, hp_max_bonus, def_bonus,
  spd_bonus, combo_damage_bonus, desperation_multiplier queries
- Selected blessing persisted in save/load state

### New: BuildTracker
- scripts/core/build_tracker.gd: Autoload that tracks run statistics
- Records: kills, damage dealt/taken, rooms cleared, moral weight,
  element usage, combo usage
- Generates playstyle tag: Pyromaniac, Tactician, Glass Cannon,
  Zone Controller, Survivor, Assassin, Aggressor, Endurer, Pacifist,
  Burdened
- to_summary() serializes build data for end-of-run display

### New: BlessingSelectionModal
- scripts/ui/blessing_selection_modal.gd: UI for choosing 1 of 3 blessings
- Shows name, description, tags, and select button per card
- Gold-bordered cards with ember styling

### New: config/blessings.json
- 15 unique blessings with distinct gameplay impacts:
  | Blessing | Effect |
  |----------|--------|
  | Wind Discipline | Wind spells -1 AP, -20% damage, +2 SPD |
  | Oil Presence | Oil pools +3 turns, +3 DEF |
  | Fire Fury | Fire +25% damage, -10 HP max |
  | Water Clarity | AP regen +1, all damage -10% |
  | Earth Roots | +20 HP, +4 DEF, -2 SPD |
  | Lightning Instinct | +5 SPD, first strike +30%, -2 DEF |
  | Burden Forge | +2% damage per moral flag, +50% moral gain |
  | Pacifist Oath | Spare heal +15, -40% damage, +5 DEF |
  | Combo Master | Combo +20% damage, combo -1 AP |
  | Vanguard | Adjacent +20% damage, melee -1 AP |
  | Sniper Eye | Ranged +25% damage, melee -15% |
  | Adaptive Shell | First hit -50% damage, +2 DEF |
  | Echo Parasite | +5 HP on kill, -50% moral gain |
  | Ember Blood | +10% all damage, desperation 3x multiplier |
  | Tide Walker | Move -1 AP, +1 move range |

### CombatFormula integration
- compute_damage_from_entities() now queries BlessingSystem for damage
  multiplier based on element string
- Blessing damage modifier applied as final multiplier in compute_damage()

### CombatRoom integration
- _apply_blessing_to_player(): Applies HP max, DEF, SPD bonuses on spawn
- Desperation Strike now uses blessing desperation_multiplier() (default 2.0)
- Build tracker hooks: record_kill on enemy death, record_room_cleared
  and record_damage_taken on combat end

### GameCoordinator integration
- cmd_new_game() shows BlessingSelectionModal before transitioning to combat
- cmd_continue_game() skips blessing selection (already chosen)

### RunManager integration
- save_run_state() persists blessing_id and build_summary
- load_run_state() restores blessing from saved ID
- _enter_sanctum() clears blessing system and build tracker

### Localization
- Added BLESSING_SELECT_TITLE, BLESSING_SELECT_INSTRUCTION,
  BLESSING_SELECT_BUTTON, and 15 blessing name/description keys
  (English, German, Spanish, French)

### Tests
- test_blessing_system.gd: 4 cases for deterministic generation,
  selection/modifiers, clear, and build tracker summary

## Testing

- 410 tests | 0 errors | 0 failures | 77/77 suites
- Headless editor scan: clean

Closes #599
@niyazmft
niyazmft merged commit c71c377 into main Jul 13, 2026
5 checks passed
@niyazmft
niyazmft deleted the feat/build-variety-blessings branch July 13, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Gameplay] Ensure Meaningful Build Variety Between Runs (GAME-LOOP-1)

1 participant