diff options
Diffstat (limited to 'scripts/Magic/DamageEffect.cs')
| -rw-r--r-- | scripts/Magic/DamageEffect.cs | 12 |
1 files changed, 11 insertions, 1 deletions
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; } |
