From 27e6fba1b383b6045c8ef42a4beea9903359b07d Mon Sep 17 00:00:00 2001 From: nsensfel Date: Tue, 8 Oct 2019 17:12:35 +0200 Subject: ... --- src/battle/mechanic/condition/blt_cond_heal.erl | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/battle/mechanic/condition/blt_cond_heal.erl') diff --git a/src/battle/mechanic/condition/blt_cond_heal.erl b/src/battle/mechanic/condition/blt_cond_heal.erl index dd7a820..2479720 100644 --- a/src/battle/mechanic/condition/blt_cond_heal.erl +++ b/src/battle/mechanic/condition/blt_cond_heal.erl @@ -22,17 +22,20 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -spec apply ( - non_neg_integer(), - non_neg_integer(), - btl_battle:type() + btl_condition:type(), + btl_character_turn_update:type() ) -> { btl_condition:type(), [ataxic:basic()], - btl_character:type(), - [ataxic:basic()] + btl_character_turn_update:type() }. -apply (Condition, Character) -> - % TODO - {Condition, [], Character, []}. +apply (Condition, Update) -> + {TargetIX, Amount} = + case btl_condition:get_parameter(Condition) of + {StoredTargetIX, StoredAmount} -> {StoredTargetIX, StoredAmount}; + Other -> error({condition, parameter, Other}) + end, + % TODO + {Condition, [], Update}. -- cgit v1.2.3-70-g09d2