aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-03-20 17:35:59 +0100
committernsensfel <SpamShield0@noot-noot.org>2018-03-20 17:35:59 +0100
commitce67d4a66521cd5b3e573ef71ea23d4c60e06d49 (patch)
tree0fa2bfbf72599f676f513b03d4a9eb21c33c3acd
parent20911dd1bc9f35e97f0a7bebcd5dce70747d6cf1 (diff)
downloadtacticians-client-ce67d4a66521cd5b3e573ef71ea23d4c60e06d49.zip
tacticians-client-ce67d4a66521cd5b3e573ef71ea23d4c60e06d49.tar.bz2
Adds info on the secondary weapon.
-rw-r--r--src/battlemap/src/View/SideBar/TabMenu/Status/CharacterInfo.elm68
1 files changed, 39 insertions, 29 deletions
diff --git a/src/battlemap/src/View/SideBar/TabMenu/Status/CharacterInfo.elm b/src/battlemap/src/View/SideBar/TabMenu/Status/CharacterInfo.elm
index cb48108..033426a 100644
--- a/src/battlemap/src/View/SideBar/TabMenu/Status/CharacterInfo.elm
+++ b/src/battlemap/src/View/SideBar/TabMenu/Status/CharacterInfo.elm
@@ -179,10 +179,34 @@ get_statistics_html stats =
]
)
-get_weapon_html : (
- Struct.Weapon.Type ->
- (Html.Html Struct.Event.Type)
+get_weapon_name_html : Struct.Weapon.Type -> (Html.Html Struct.Event.Type)
+get_weapon_name_html wp =
+ (Html.text
+ (
+ (Struct.Weapon.get_name wp)
+ ++ " ("
+ ++
+ (case (Struct.Weapon.get_range_modifier wp) of
+ Struct.Weapon.Short -> "Short"
+ Struct.Weapon.Long -> "Long"
+ )
+ ++ " "
+ ++
+ (case (Struct.Weapon.get_damage_modifier wp) of
+ Struct.Weapon.Heavy -> "Heavy"
+ Struct.Weapon.Light -> "Light"
+ )
+ ++ " "
+ ++
+ (case (Struct.Weapon.get_range_type wp) of
+ Struct.Weapon.Ranged -> "Ranged"
+ Struct.Weapon.Melee -> "Melee"
+ )
+ ++ ")"
+ )
)
+
+get_weapon_html : Struct.Weapon.Type -> (Html.Html Struct.Event.Type)
get_weapon_html wp =
(Html.ul
[
@@ -190,32 +214,7 @@ get_weapon_html wp =
[
(Html.li
[]
- [
- (Html.text
- (
- (Struct.Weapon.get_name wp)
- ++ " ("
- ++
- (case (Struct.Weapon.get_range_modifier wp) of
- Struct.Weapon.Short -> "Short"
- Struct.Weapon.Long -> "Long"
- )
- ++ " "
- ++
- (case (Struct.Weapon.get_damage_modifier wp) of
- Struct.Weapon.Heavy -> "Heavy"
- Struct.Weapon.Light -> "Light"
- )
- ++ " "
- ++
- (case (Struct.Weapon.get_range_type wp) of
- Struct.Weapon.Ranged -> "Ranged"
- Struct.Weapon.Melee -> "Melee"
- )
- ++ ")"
- )
- )
- ]
+ [ (get_weapon_name_html wp) ]
),
(Html.li
[]
@@ -345,6 +344,17 @@ get_html model char =
)
)
]
+ ),
+ (Html.dt [] [(Html.text "Secondary Weapon:")]),
+ (Html.dd
+ []
+ [
+ (get_weapon_html
+ (Struct.WeaponSet.get_secondary_weapon
+ (Struct.Character.get_weapons char)
+ )
+ )
+ ]
)
]
),