From 1aec9784102855c4bf2e5d2ad9a945166aed2051 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Tue, 4 Jun 2019 15:46:32 +0200 Subject: ... --- src/battle/struct/btl_attack.erl | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/battle/struct/btl_attack.erl') diff --git a/src/battle/struct/btl_attack.erl b/src/battle/struct/btl_attack.erl index 189cb0e..6d7f32e 100644 --- a/src/battle/struct/btl_attack.erl +++ b/src/battle/struct/btl_attack.erl @@ -36,7 +36,7 @@ get_sequence/3, get_description_of/5, apply_to_healths_and_lucks/5, - new_opportunity/2, + attack_of_opportunity/0 ] ). @@ -411,8 +411,26 @@ get_description_of CanParry, DefenderLuck, AttackerLuck + ); +get_description_of +( + opportunity, + Attacker, + Defender, + AttackerLuck, + DefenderLuck +) -> + effect_of_attack + ( + opportunity, + Attacker, + Defender, + false, + AttackerLuck, + DefenderLuck ). + -spec apply_to_healths_and_lucks ( maybe_type(), @@ -555,6 +573,9 @@ get_sequence (AttackRange, AttackerWeapon, DefenderWeapon) -> _ -> [First, Second] end. +-spec attack_of_opportunity () -> opportunity. +attack_of_opportunity () -> opportunity. + -spec encode (type()) -> {list(any())}. encode (Attack) -> Order = Attack#attack.order, -- cgit v1.2.3-70-g09d2