From 4228ecf917439b65949600f005f298f31a4979ff Mon Sep 17 00:00:00 2001 From: nsensfel Date: Mon, 18 Nov 2019 18:15:31 +0100 Subject: ... --- src/battle/mechanic/condition/btl_cond_heal.erl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/battle/mechanic') 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}). -- cgit v1.2.3-70-g09d2