| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-03-05 17:43:23 +0100 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-03-05 17:43:23 +0100 | 
| commit | e5bc1b2d1bfcf5f36bd4f0d567e4ec8e0fb22e85 (patch) | |
| tree | e7637ad94f05b7484baa52f3a333af124c6b293a /src/struct/attack.erl | |
| parent | 9b73f3efa534fa4dfb8ff832550c1914342ddbb9 (diff) | |
Fixes issues I expected Dialyzer to show me.
Diffstat (limited to 'src/struct/attack.erl')
| -rw-r--r-- | src/struct/attack.erl | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/src/struct/attack.erl b/src/struct/attack.erl index b27ff48..7b81adc 100644 --- a/src/struct/attack.erl +++ b/src/struct/attack.erl @@ -214,7 +214,7 @@ when     end;  apply_to_healths  ( -   {Attack, Effect}, +   Attack,     AttackerHealth,     DefenderHealth  ) @@ -227,14 +227,15 @@ when        and ((Attack#attack.order == first) or (Attack#attack.order == second))     )  ) -> -   {_Hits, _Critical, Damage} = Effect, +   Damage = Attack#attack.damage, +     case DefenderHealth of        0 ->           {nothing, AttackerHealth, DefenderHealth};        _ ->           { -            {Attack, Effect}, +            Attack,              max(0, (AttackerHealth - Damage)),              DefenderHealth           } | 


