From 7a1686695e70b68b2d4ad49c0f5bc967fa6d1013 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sun, 18 Aug 2019 18:56:54 +0200 Subject: 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. --- src/battle/mechanic/action/btl_action_attack.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/battle/mechanic') 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), -- cgit v1.2.3-70-g09d2