[Gameplay] Fair Failure States — Desperation Strike, Death Hints & Enhanced Defeat Recap - #610
Merged
Merged
Conversation
…hanced defeat recap
## Summary
Makes failed runs feel meaningful by adding a last-resort Desperation Strike,
contextual death hints on the defeat screen, and expanded post-death stats.
## Changes
### Desperation Strike
- BottomConsole: Added DesperationButton (hidden by default)
- Shows when player HP drops to 25% or below during player turn
- Deals 2x damage to nearest enemy, costs all AP
- Single-use per run; button hidden after use
- CombatHUD: Wired desperation_pressed signal through to CombatRoom
- CombatRoom._on_desperation_pressed(): Finds nearest enemy, computes 2x
damage via CombatFormula, applies damage, consumes all AP
### Death Hints / Persistent Knowledge
- config/death_hints.json: 6 contextual hints with triggers
- elevation_damage, cover_ignored, ap_management, desperation,
elite_priority, combo_unlock
- CombatRoom._select_death_hint(): Chooses hint based on room state
(damage taken, whether desperation was available, etc.)
- DefeatModal._update_summary_display(): Shows hint with gold text
### Enhanced Defeat Stats
- CombatRoom now tracks _room_damage_taken via _on_player_hp_changed
- Defeat modal shows: turns, rooms, kills, damage taken
- New localization keys: HUD_SUMMARY_DAMAGE, HINT_* (6 hints)
### SettingsManager
- Added get_value(category, key, fallback) convenience getter
### Tests
- test_desperation_move.gd: 3 cases for hidden default, low-HP reveal,
post-use hiding
## Testing
- 406 tests | 0 errors | 0 failures | 76/76 suites
- Headless editor scan: clean
Closes #600
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes failed runs feel meaningful by adding a last-resort Desperation Strike, contextual death hints on the defeat screen, and expanded post-death stats.
Problem
Community research shows #3 complaint is unfair failure states. Players accept death if they learn something. They rage-quit if they lose to UI ambiguity or a single unrecoverable mistake.
Changes
Desperation Strike
CombatFormula, applies viaEntityLifecycleDeath Hints / Persistent Knowledge
config/death_hints.json: 6 contextual hints with triggers:elevation_damagecover_ignoreddied_without_desperationap_managementelite_prioritycombo_unlockEnhanced Defeat Stats
SettingsManager
get_value(category, key, fallback)convenience getterBehavior
Technical Notes
CombatFormula.compute_damage_from_entities()for determinismhp_changedsignal on the player entityTesting
Related Issues
Closes #600