summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/battle/struct/btl_attack.erl')
-rw-r--r-- | src/battle/struct/btl_attack.erl | 23 |
1 files changed, 22 insertions, 1 deletions
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, |