From bd88d4f04555a0619d06b2fc4e5ec9a0114716c1 Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 14 Sep 2025 12:39:21 -0300 Subject: Corrigido mesagem de log com dano negativo. --- scripts/Magic/DamageEffect.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/Magic/DamageEffect.cs b/scripts/Magic/DamageEffect.cs index 0b2b3d6..c0d8d4e 100644 --- a/scripts/Magic/DamageEffect.cs +++ b/scripts/Magic/DamageEffect.cs @@ -14,7 +14,17 @@ public partial class DamageEffect : SpellEffect { int damageDealt = Damage - target.Men; - MessageLogData.Instance.AddMessage($"{caster.DisplayName} aplica {damageDealt} de dano mágico em {target.DisplayName}"); + if (damageDealt < 0) + { + damageDealt = 0; + } + + if (damageDealt <= 0) { + MessageLogData.Instance.AddMessage($"{target.DisplayName} resite o ataque mágico de {caster.DisplayName}"); + } + else { + MessageLogData.Instance.AddMessage($"{caster.DisplayName} aplica {damageDealt} de dano mágico em {target.DisplayName}"); + } target.Hp -= damageDealt; } -- cgit v1.2.3