feat: show blocked amount and reduced damage on VICTIMSTATE_BLOCKS

When an attack is partially blocked, the server sends the remaining
damage in totalDamage and the blocked amount in data.blocked. Show
both: the damage taken and a 'Block N' entry. When block amount is
zero (full block with no damage), just show 'Block'.
This commit is contained in:
Kelsi 2026-03-11 03:36:45 -07:00
parent d1c5e09127
commit fb01361837
2 changed files with 8 additions and 2 deletions

View file

@ -5173,7 +5173,10 @@ void GameScreen::renderCombatText(game::GameHandler& gameHandler) {
: ImVec4(0.4f, 0.9f, 1.0f, alpha);
break;
case game::CombatTextEntry::BLOCK:
snprintf(text, sizeof(text), outgoing ? "Block" : "You Block");
if (entry.amount > 0)
snprintf(text, sizeof(text), outgoing ? "Block %d" : "You Block %d", entry.amount);
else
snprintf(text, sizeof(text), outgoing ? "Block" : "You Block");
color = outgoing ? ImVec4(0.6f, 0.6f, 0.6f, alpha)
: ImVec4(0.4f, 0.9f, 1.0f, alpha);
break;