summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-06-04 15:46:32 +0200 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-06-04 15:46:32 +0200 |
commit | 1aec9784102855c4bf2e5d2ad9a945166aed2051 (patch) | |
tree | f6849f76d4bd426c2fd94da88b9b668316c53e86 /src/battle/struct/btl_attack.erl | |
parent | 124cc7160d80bc9fcafd1a1592fa046ef44d6ef7 (diff) |
...
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, |