summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle')
-rw-r--r--src/battle/src/View/Controlled/CharacterCard.elm64
1 files changed, 49 insertions, 15 deletions
diff --git a/src/battle/src/View/Controlled/CharacterCard.elm b/src/battle/src/View/Controlled/CharacterCard.elm
index 8857fbf..a48c631 100644
--- a/src/battle/src/View/Controlled/CharacterCard.elm
+++ b/src/battle/src/View/Controlled/CharacterCard.elm
@@ -283,27 +283,59 @@ get_weapon_field_header is_active weapon =
get_weapon_details : (
Battle.Struct.Omnimods.Type ->
+ Battle.Struct.Omnimods.Type ->
BattleCharacters.Struct.Weapon.Type ->
(Html.Html Struct.Event.Type)
)
-get_weapon_details other_wp_omnimods weapon =
- (Html.div
- [
- (Html.Attributes.class "character-card-weapon")
- ]
- [
- (get_weapon_field_header False weapon),
- (Battle.View.Omnimods.get_html
- (Battle.Struct.Omnimods.merge
- (Battle.Struct.Omnimods.scale
- -1
- other_wp_omnimods
+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
+ )
+ omnimods
)
- (BattleCharacters.Struct.Weapon.get_omnimods weapon)
+ other_wp_omnimods
)
)
- ]
- )
+ 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 : (
BattleCharacters.Struct.Weapon.Type ->
@@ -410,6 +442,7 @@ get_summary_html char_turn player_ix char =
),
(get_weapon_summary active_weapon),
(get_weapon_details
+ omnimods
(BattleCharacters.Struct.Weapon.get_omnimods active_weapon)
(BattleCharacters.Struct.Character.get_inactive_weapon
base_char
@@ -472,6 +505,7 @@ get_full_html player_ix char =
)
),
(get_weapon_details
+ omnimods
(BattleCharacters.Struct.Weapon.get_omnimods active_weapon)
(BattleCharacters.Struct.Character.get_inactive_weapon
base_char