summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-11-18 18:15:31 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-11-18 18:15:31 +0100
commit4228ecf917439b65949600f005f298f31a4979ff (patch)
tree76c12e4eb2b2cfe30deb2d68b8cedb73797e074a /src/battle/mechanic
parentdbbff9e8555a30bbae2d22b17973216f00bd5b70 (diff)
...
Diffstat (limited to 'src/battle/mechanic')
-rw-r--r--src/battle/mechanic/condition/btl_cond_heal.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/battle/mechanic/condition/btl_cond_heal.erl b/src/battle/mechanic/condition/btl_cond_heal.erl
index ba9840d..7de6369 100644
--- a/src/battle/mechanic/condition/btl_cond_heal.erl
+++ b/src/battle/mechanic/condition/btl_cond_heal.erl
@@ -5,9 +5,13 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-include("tacticians/conditions.hrl").
+-type turn_result() :: {non_neg_integer(), non_neg_integer()}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-export_type([turn_result/0]).
+
-export
(
[
@@ -216,3 +220,15 @@ apply (SelfRef, S0Update, S0Context) ->
{VolatileData, S1Update}
end.
+
+-spec encode_turn_result (any()) -> binary().
+encode_turn_result ({CharIX, HealingAmount}) ->
+ jiffy:encode
+ (
+ [
+ {<<"ix">>, CharIX},
+ {<<"p">>, HealingAmount}
+ ]
+ );
+encode_turn_result (Other) ->
+ error({turn_result, Other}).