| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-09-12 10:42:33 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-09-12 10:42:33 +0200 | 
| commit | ce03028ccd575af1dc38b26d23569601d3b5d491 (patch) | |
| tree | ddb943e743aa2389ea63079e36a0f063d60e0155 /src/battle | |
| parent | aadf3043f8647c033cc14ba8a4d5ad01dd9057fb (diff) | |
Improves presentation of attributes in battle.
Diffstat (limited to 'src/battle')
| -rw-r--r-- | src/battle/src/View/Controlled/CharacterCard.elm | 103 | 
1 files changed, 24 insertions, 79 deletions
| diff --git a/src/battle/src/View/Controlled/CharacterCard.elm b/src/battle/src/View/Controlled/CharacterCard.elm index 6024438..291263c 100644 --- a/src/battle/src/View/Controlled/CharacterCard.elm +++ b/src/battle/src/View/Controlled/CharacterCard.elm @@ -281,73 +281,44 @@ get_weapon_field_header is_active weapon =        ]     ) -get_weapon_details : ( +get_inactive_weapon_details : (        Battle.Struct.Omnimods.Type ->        Battle.Struct.Omnimods.Type ->        BattleCharacters.Struct.Weapon.Type ->        (Html.Html Struct.Event.Type)     ) -get_weapon_details omnimods other_wp_omnimods weapon = -   let -      other_wp_omnimods_scaled = -         (Battle.Struct.Omnimods.scale -            -1 -            (Battle.Struct.Omnimods.apply_damage_modifier -               (Battle.Struct.Omnimods.get_attribute_mod -                  (Battle.Struct.Attributes.encode_category -                     Battle.Struct.Attributes.DamageModifier -                  ) +get_inactive_weapon_details omnimods other_wp_omnimods weapon = +   (Html.div +      [ +         (Html.Attributes.class "character-card-weapon") +      ] +      [ +         (get_weapon_field_header False weapon), +         (Battle.View.Omnimods.get_user_friendly_html +            (Battle.Struct.Omnimods.merge +               (Battle.Struct.Omnimods.merge +                  (Battle.Struct.Omnimods.scale -1 other_wp_omnimods)                    omnimods                 ) -               other_wp_omnimods +               (BattleCharacters.Struct.Weapon.get_omnimods weapon)              )           ) -      omnimods_without_other_wp = -         (Battle.Struct.Omnimods.merge -            (Battle.Struct.Omnimods.scale -1 other_wp_omnimods) -            omnimods -         ) -      this_wp_omnimods = (BattleCharacters.Struct.Weapon.get_omnimods weapon) -      omnimods_with_this_wp = -         (Battle.Struct.Omnimods.merge -            omnimods_without_other_wp -            this_wp_omnimods -         ) -   in -      (Html.div -         [ -            (Html.Attributes.class "character-card-weapon") -         ] -         [ -            (get_weapon_field_header False weapon), -            (Battle.View.Omnimods.get_html -               (Battle.Struct.Omnimods.merge -                  other_wp_omnimods_scaled -                  (Battle.Struct.Omnimods.apply_damage_modifier -                     (Battle.Struct.Omnimods.get_attribute_mod -                        (Battle.Struct.Attributes.encode_category -                           Battle.Struct.Attributes.DamageModifier -                        ) -                        omnimods_with_this_wp -                     ) -                     this_wp_omnimods -                  ) -               ) -            ) -         ] -      ) +      ] +   ) -get_weapon_summary : ( +get_active_weapon_details : ( +      Battle.Struct.Omnimods.Type ->        BattleCharacters.Struct.Weapon.Type ->        (Html.Html Struct.Event.Type)     ) -get_weapon_summary weapon = +get_active_weapon_details omnimods weapon =     (Html.div        [           (Html.Attributes.class "character-card-weapon-summary")        ]        [ -         (get_weapon_field_header True weapon) +         (get_weapon_field_header True weapon), +         (Battle.View.Omnimods.get_user_friendly_html omnimods)        ]     ) @@ -437,19 +408,8 @@ get_summary_html char_turn player_ix char =                    (get_statuses char)                 ]              ), -            (Battle.View.Omnimods.get_html -               (Battle.Struct.Omnimods.apply_damage_modifier -                  (Battle.Struct.Omnimods.get_attribute_mod -                     (Battle.Struct.Attributes.encode_category -                        Battle.Struct.Attributes.DamageModifier -                     ) -                     omnimods -                  ) -                  omnimods -               ) -            ), -            (get_weapon_summary active_weapon), -            (get_weapon_details +            (get_active_weapon_details omnimods active_weapon), +            (get_inactive_weapon_details                 omnimods                 (BattleCharacters.Struct.Weapon.get_omnimods active_weapon)                 (BattleCharacters.Struct.Character.get_inactive_weapon @@ -504,23 +464,8 @@ get_full_html player_ix char =                    (get_statuses char)                 ]              ), -            (Battle.View.Omnimods.get_html -               (Battle.Struct.Omnimods.apply_damage_modifier -                  (Battle.Struct.Omnimods.get_attribute_mod -                     (Battle.Struct.Attributes.encode_category -                        Battle.Struct.Attributes.DamageModifier -                     ) -                     omnimods -                  ) -                  omnimods -               ) -            ), -            (get_weapon_summary -               (BattleCharacters.Struct.Character.get_active_weapon -                  base_char -               ) -            ), -            (get_weapon_details +            (get_active_weapon_details omnimods active_weapon), +            (get_inactive_weapon_details                 omnimods                 (BattleCharacters.Struct.Weapon.get_omnimods active_weapon)                 (BattleCharacters.Struct.Character.get_inactive_weapon | 


