feat: show partial absorb/resist amounts in spell combat text

handleSpellDamageLog now emits ABSORB/RESIST entries when data.absorbed
or data.resisted are nonzero, so players see 'Absorbed 123' alongside
damage numbers (e.g. vs. Power Word: Shield or Ice Barrier).
handleSpellHealLog does the same for heal absorbs (e.g. Vampiric Embrace
counter-absorbs). renderCombatText now formats amount when nonzero.
This commit is contained in:
Kelsi 2026-03-11 03:28:19 -07:00
parent e902375763
commit d2ae4d8215
2 changed files with 16 additions and 3 deletions

View file

@ -5204,11 +5204,17 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) {
color = ImVec4(0.9f, 0.9f, 0.9f, alpha); // White for immune
break;
case game::CombatTextEntry::ABSORB:
snprintf(text, sizeof(text), "Absorb");
if (entry.amount > 0)
snprintf(text, sizeof(text), "Absorbed %d", entry.amount);
else
snprintf(text, sizeof(text), "Absorbed");
color = ImVec4(0.5f, 0.8f, 1.0f, alpha); // Light blue for absorb
break;
case game::CombatTextEntry::RESIST:
snprintf(text, sizeof(text), "Resist");
if (entry.amount > 0)
snprintf(text, sizeof(text), "Resisted %d", entry.amount);
else
snprintf(text, sizeof(text), "Resisted");
color = ImVec4(0.7f, 0.7f, 0.7f, alpha); // Grey for resist
break;
default: