| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-08-29 14:38:07 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-08-29 14:38:07 +0200 | 
| commit | 79b2d1dd4f114bc31105df0e554f9c1f18c87e5d (patch) | |
| tree | fbb70a8d76e6435d0ca04f332c53733ffd8bc0a5 /src/shared | |
| parent | 9b424b11dbea33a41b2129daf232557515de9db1 (diff) | |
Updates btl_attack.erl, fixes small mistakes.
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/struct/shr_omnimods.erl | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/src/shared/struct/shr_omnimods.erl b/src/shared/struct/shr_omnimods.erl index 31d61f2..f0ccdc5 100644 --- a/src/shared/struct/shr_omnimods.erl +++ b/src/shared/struct/shr_omnimods.erl @@ -197,8 +197,9 @@ get_attack_damage (AttackModifier, AttackerOmnimods, DefenderOmnimods) ->        dict:fold        (           fun (Name, BaseDmg, CurrentResult) -> +            NormDmg = max(0, BaseDmg),              ModifiedDmg = -               (shr_math_util:ceil(BaseDmg * AttackModifier) - BaseDefense), +               (shr_math_util:ceil(NormDmg * AttackModifier) - BaseDefense),              case dict:find(Name, DefenderOmnimodsDefmods) of                 {ok, Def} when (Def >= ModifiedDmg) -> CurrentResult;                 {ok, Def} -> (CurrentResult + (ModifiedDmg - Def)); | 


