summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-06-05 11:24:52 +0200
committernsensfel <SpamShield0@noot-noot.org>2019-06-05 11:24:52 +0200
commit1afb69a11b0e291c7bfd6c24bdd8e55742e61889 (patch)
tree21c09b15ddcc3272bbb8fa8d41676ffa56ca3130 /src/battle/struct/btl_attack.erl
parent1aec9784102855c4bf2e5d2ad9a945166aed2051 (diff)
[Broken] Changing how actions are handled...
Diffstat (limited to 'src/battle/struct/btl_attack.erl')
-rw-r--r--src/battle/struct/btl_attack.erl28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/battle/struct/btl_attack.erl b/src/battle/struct/btl_attack.erl
index 6d7f32e..baaa5a7 100644
--- a/src/battle/struct/btl_attack.erl
+++ b/src/battle/struct/btl_attack.erl
@@ -5,7 +5,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--type order() :: ('first' | 'second' | 'counter' | 'opportunity').
+-type order() :: ('first' | 'second' | 'counter').
-type precision() :: ('misses' | 'grazes' | 'hits').
-record
@@ -411,26 +411,8 @@ 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(),
@@ -573,8 +555,12 @@ get_sequence (AttackRange, AttackerWeapon, DefenderWeapon) ->
_ -> [First, Second]
end.
--spec attack_of_opportunity () -> opportunity.
-attack_of_opportunity () -> opportunity.
+-spec attack_of_opportunity () -> list(step()).
+attack_of_opportunity () ->
+ [
+ {first, false},
+ {second, false}
+ ].
-spec encode (type()) -> {list(any())}.
encode (Attack) ->