summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-09-16 17:54:29 +0200
committernsensfel <SpamShield0@noot-noot.org>2019-09-16 17:54:29 +0200
commit511cf3d3d11d8bbe6a11f439cc1786bed19b059d (patch)
treeae96e650823e4cd49a62ae35e555dddf689e0304 /src/shared/battle/Battle/Struct/Omnimods.elm
parent7bd57ea12ba9dde0b88b2476a91737fd4d3de840 (diff)
Dmg type from T-Data, no more atk sum.
Diffstat (limited to 'src/shared/battle/Battle/Struct/Omnimods.elm')
-rw-r--r--src/shared/battle/Battle/Struct/Omnimods.elm43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/shared/battle/Battle/Struct/Omnimods.elm b/src/shared/battle/Battle/Struct/Omnimods.elm
index f36efcd..8da3173 100644
--- a/src/shared/battle/Battle/Struct/Omnimods.elm
+++ b/src/shared/battle/Battle/Struct/Omnimods.elm
@@ -6,8 +6,6 @@ module Battle.Struct.Omnimods exposing
merge_attributes,
none,
apply_to_attributes,
- get_attack_damage,
- get_damage_sum,
get_attribute_mods,
get_attribute_mod,
get_attack_mods,
@@ -159,47 +157,6 @@ apply_to_attributes omnimods attributes =
omnimods.attributes
)
-get_damage_sum : Type -> Int
-get_damage_sum omni =
- (Dict.foldl (\t -> \v -> \result -> (result + v)) 0 omni.attack)
-
-get_attack_damage : Float -> Type -> Type -> Int
-get_attack_damage dmg_modifier atk_omni def_omni =
- let
- base_def =
- (
- case
- (Dict.get
- (Battle.Struct.DamageType.encode
- Battle.Struct.DamageType.Base
- )
- def_omni.defense
- )
- of
- (Just v) -> v
- Nothing -> 0
- )
- in
- (Dict.foldl
- (\t -> \v -> \result ->
- let
- actual_atk =
- (max
- 0
- (
- (ceiling ((toFloat v) * dmg_modifier))
- - base_def
- )
- )
- in
- case (Dict.get t def_omni.defense) of
- (Just def_v) -> (result + (max 0 (actual_atk - def_v)))
- Nothing -> (result + actual_atk)
- )
- 0
- atk_omni.attack
- )
-
apply_damage_modifier : Int -> Type -> Type
apply_damage_modifier damage_modifier omnimods =
{omnimods |