summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-08-18 18:56:54 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-08-18 18:56:54 +0200
commit7a1686695e70b68b2d4ad49c0f5bc967fa6d1013 (patch)
tree0422b802a88953b3c938f573be5dc7bd9c8cb8d7 /src/battle/mechanic
parent5266e24e01611fc8026dfa0498ee87d7fba65e88 (diff)
Use blc_error in blc_{armor,weapon}.
Dialyzer confuses me: shr_omnimods.erl:90: Overloaded contract for shr_omnimods:apply_coefficient_to_mods/2 has overlapping domains; such contracts are currently unsupported and are simply ignored shr_omnimods.erl:96: Overloaded contract for shr_omnimods:merge_mods/2 has overlapping domains; such contracts are currently unsupported and are simply ignored This seems to imply that shr_omnimods:damage_type_mods() and shr_omnimods:attribute_mods() overlap, which is not supposed to be the case.
Diffstat (limited to 'src/battle/mechanic')
-rw-r--r--src/battle/mechanic/action/btl_action_attack.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/battle/mechanic/action/btl_action_attack.erl b/src/battle/mechanic/action/btl_action_attack.erl
index 04becc8..62c58f8 100644
--- a/src/battle/mechanic/action/btl_action_attack.erl
+++ b/src/battle/mechanic/action/btl_action_attack.erl
@@ -24,7 +24,7 @@
)
-> {float(), integer(), integer()}.
roll_precision_modifier (Attributes, TargetAttributes, TargetLuck) ->
- TargetDodges = shr_attributes:get_dodges(TargetAttributes),
+ TargetDodges = shr_attributes:get_dodge_chance(TargetAttributes),
Accuracy = shr_attributes:get_accuracy(Attributes),
MissChance = max(0, (TargetDodges - Accuracy)),
@@ -48,7 +48,7 @@ roll_precision_modifier (Attributes, TargetAttributes, TargetLuck) ->
)
-> {float(), integer(), integer()}.
roll_critical_modifier (Attributes, Luck) ->
- CriticalHitChance = shr_attributes:get_critical_hits(Attributes),
+ CriticalHitChance = shr_attributes:get_critical_hit_chance(Attributes),
{_Roll, IsSuccess, PositiveModifier, NegativeModifier} =
shr_roll:percentage_with_luck(CriticalHitChance, Luck),
@@ -68,7 +68,7 @@ roll_critical_modifier (Attributes, Luck) ->
)
-> {boolean(), integer(), integer()}.
roll_parry (DefenderAttributes, DefenderLuck) ->
- DefenderParryChance = shr_attributes:get_parries(DefenderAttributes),
+ DefenderParryChance = shr_attributes:get_parry_chance(DefenderAttributes),
{_Roll, IsSuccess, PositiveModifier, NegativeModifier} =
shr_roll:percentage_with_luck(DefenderParryChance, DefenderLuck),
@@ -518,7 +518,7 @@ handle_attack_sequence
(
btl_character:get_base_character(S0Character)
),
- DoubleAttackChance = shr_attributes:get_double_hits(Attributes),
+ DoubleAttackChance = shr_attributes:get_double_hit_chance(Attributes),
{_Roll, IsSuccessful, PositiveModifier, NegativeModifier} =
shr_roll:percentage_with_luck(DoubleAttackChance, S0PlayerLuck),