aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/struct/attack.erl')
-rw-r--r--src/struct/attack.erl23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/struct/attack.erl b/src/struct/attack.erl
index 7b81adc..7f6b302 100644
--- a/src/struct/attack.erl
+++ b/src/struct/attack.erl
@@ -281,7 +281,7 @@ get_sequence (AttackRange, AttackerWeapon, DefenderWeapon) ->
[First, Counter, Second]
end.
--spec encode (struct()) -> binary().
+-spec encode (struct()) -> {list(any())}.
% This shouldn't be a possibility. Types in this module are a mess...
encode (Attack) ->
Order = Attack#attack.order,
@@ -290,15 +290,12 @@ encode (Attack) ->
IsParry = Attack#attack.is_parry,
Damage = Attack#attack.damage,
- jiffy:encode
- (
- {
- [
- {<<"ord">>, encode_order(Order)},
- {<<"pre">>, encode_precision(Precision)},
- {<<"cri">>, IsCritical},
- {<<"par">>, IsParry},
- {<<"dmg">>, Damage}
- ]
- }
- ).
+ {
+ [
+ {<<"ord">>, encode_order(Order)},
+ {<<"pre">>, encode_precision(Precision)},
+ {<<"cri">>, IsCritical},
+ {<<"par">>, IsParry},
+ {<<"dmg">>, Damage}
+ ]
+ }.