Skip to content

Commit

Permalink
fix: damage console (#3203)
Browse files Browse the repository at this point in the history
  • Loading branch information
murilo09 authored Dec 31, 2024
1 parent cdfb178 commit 55de86e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7418,7 +7418,7 @@ bool Game::combatChangeHealth(const std::shared_ptr<Creature> &attacker, const s
}

auto targetHealth = target->getHealth();
realDamage = damage.primary.value + damage.secondary.value;
realDamage = std::min<int32_t>(targetHealth, damage.primary.value + damage.secondary.value);
if (realDamage == 0) {
return true;
} else if (realDamage >= targetHealth) {
Expand Down

0 comments on commit 55de86e

Please sign in to comment.