summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2022-01-31 17:52:57 +0100 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2022-01-31 17:52:57 +0100 |
commit | a4cbe791eaa37a4a8039a112a881ce2757305dce (patch) | |
tree | 6bd67947d2ee659595aa9828694bb8ad15a04966 /src/battle/src/View/MessageBoard/Attack.elm | |
parent | f55133c2e24ee782416a32619aa1a3b07811915f (diff) |
Fixes misses doing damage, missing animations, and some other modifications from a long time ago...adding_tonkadur
Diffstat (limited to 'src/battle/src/View/MessageBoard/Attack.elm')
-rw-r--r-- | src/battle/src/View/MessageBoard/Attack.elm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/battle/src/View/MessageBoard/Attack.elm b/src/battle/src/View/MessageBoard/Attack.elm index 1445c21..d87a7e9 100644 --- a/src/battle/src/View/MessageBoard/Attack.elm +++ b/src/battle/src/View/MessageBoard/Attack.elm @@ -126,9 +126,12 @@ get_attack_animation_class : ( String ) get_attack_animation_class attack char = - if (Struct.Attack.get_is_a_critical attack) - then "animated-portrait-attack-critical" - else "animated-portrait-attacks" + if (Struct.Attack.get_is_a_parry attack) + then "animated-portrait-parries" + else + if (Struct.Attack.get_is_a_critical attack) + then "animated-portrait-attack-critical" + else "animated-portrait-attacks" get_defense_animation_class : ( Struct.Attack.Type -> @@ -138,14 +141,13 @@ get_defense_animation_class : ( get_defense_animation_class attack char = if ((Struct.Attack.get_damage attack) == 0) then - if ((Struct.Attack.get_precision attack) == Struct.Attack.Miss) - then "animated-portrait-dodges" - else "animated-portrait-undamaged" + "animated-portrait-undamaged" else if ((Struct.Character.get_current_health char) > 0) then - if ((Struct.Attack.get_precision attack) == Struct.Attack.Graze) - then "animated-portrait-grazed-damage" - else "animated-portrait-damaged" + case (Struct.Attack.get_precision attack) of + Struct.Attack.Hit -> "animated-portrait-damaged" + Struct.Attack.Graze -> "animated-portrait-grazed-damage" + Struct.Attack.Miss -> "animated-portrait-dodges" else if ((Struct.Attack.get_precision attack) == Struct.Attack.Graze) then "animated-portrait-grazed-death" |