| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/battle/mechanic/skill/btl_skill_static_heal.erl')
| -rw-r--r-- | src/battle/mechanic/skill/btl_skill_static_heal.erl | 111 | 
1 files changed, 4 insertions, 107 deletions
| diff --git a/src/battle/mechanic/skill/btl_skill_static_heal.erl b/src/battle/mechanic/skill/btl_skill_static_heal.erl index 7a9bf35..b1b7018 100644 --- a/src/battle/mechanic/skill/btl_skill_static_heal.erl +++ b/src/battle/mechanic/skill/btl_skill_static_heal.erl @@ -2,8 +2,7 @@  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --include("tacticians/skills.hrl") --include("tacticians/conditions.hrl") +-include("tacticians/conditions.hrl").  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -18,120 +17,18 @@  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec cast_logic -   ( -      non_neg_integer(), -      non_neg_integer(), -      btl_character_turn_update:type() -   ) -   -> btl_character_turn_update:type(). -cast_logic (TargetIX, Amount, S0Update) -> -   Healing = -      btl_condition:new -      ( -         ?CONDITION_EFFECT_HEAL, -         [], -         -1, -         1, -         {TargetIX, HealAmount} -      ), - -   {_S1HealindAndUpdate, S1Update} = -      btl_cond_heal:apply -      ( -         Healing, -         S0Update -      ), - -   % TODO: Add a btl_turn_result showing the heal to S1Update. - -   S1Update. - --spec group_cast_logic -   ( -      list(non_neg_integer()), -      non_neg_integer(), -      non_neg_integer(), -      btl_character_turn_update:type() -   ) -   -> btl_character_turn_update:type(). -group_cast_logic (TargetIXs, MaxTargets, Amount, S0Update) -> -   case (length(TargetIXs) > MaxTargets) of -      true -> error({skill, target, TargetIXs}); -      false -> ok -   end, - -   lists:foldl -   ( -      fun (TargetIX, S1Update) -> -         cast_logic(Amount, TargetIX, S1Update) -      end, -      S0Update, -      TargetIXs -   ). - --spec player_cast_logic -   ( -      non_neg_integer(), -      non_neg_integer(), -      btl_character_turn_update:type() -   ) -   -> btl_character_turn_update:type(). -player_cast_logic (TargetIX, Amount, S0Update) -> -   Characters = todo, %TODO -   TargetRef = todo, %TODO -   TargetPlayerIX = todo, %TODO - -   % TODO: -   % apply `cast_logic(Amount, TargetIX, S1Update)` on all characters whose -   % PlayerIX == TargetPlayerIX. -   S0Update.  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  -spec cast     ( -      shr_skill:variant(), +      shr_skill:type(),        non_neg_integer(),        list(non_neg_integer()),        list(shr_location:type()),        btl_character_turn_update:type()     )     -> btl_character_turn_update:type(). -cast (?SKILL_VARIANT_ALPHA_0, _UserIX, [TargetIX], _Locations, S0Update) -> -   cast_logic(20, TargetIX, S0Update); -cast (?SKILL_VARIANT_ALPHA_1, _UserIX, [TargetIX], _Locations, S0Update) -> -   cast_logic(40, TargetIX, S0Update); -cast (?SKILL_VARIANT_ALPHA_2, _UserIX, [TargetIX], _Locations, S0Update) -> -   cast_logic(60, TargetIX, S0Update); -cast (?SKILL_VARIANT_ALPHA_3, _UserIX, [TargetIX], _Locations, S0Update) -> -   cast_logic(80, TargetIX, S0Update); -cast (?SKILL_VARIANT_ALPHA_4, _UserIX, [TargetIX], _Locations, S0Update) -> -   cast_logic(100, TargetIX, S0Update); -cast (?SKILL_VARIANT_PHI_0, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 2, 20, S0Update); -cast (?SKILL_VARIANT_PHI_1, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 2, 60, S0Update); -cast (?SKILL_VARIANT_PHI_2, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 2, 100, S0Update); -cast (?SKILL_VARIANT_PHI_3, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 4, 20, S0Update); -cast (?SKILL_VARIANT_PHI_4, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 4, 60, S0Update); -cast (?SKILL_VARIANT_PHI_5, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 4, 100, S0Update); -cast (?SKILL_VARIANT_PHI_6, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 8, 20, S0Update); -cast (?SKILL_VARIANT_PHI_7, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 8, 60, S0Update); -cast (?SKILL_VARIANT_PHI_8, _UserIX, TargetIXs, _Locations, S0Update) -> -   group_cast_logic(TargetIXs, 8, 100, S0Update); -cast (?SKILL_VARIANT_PSI_0, _UserIX, [TargetIX], _Locations, S0Update) -> -   player_cast_logic(TargetIX, 20, S0Update); -cast (?SKILL_VARIANT_PSI_1, _UserIX, [TargetIX], _Locations, S0Update) -> -   player_cast_logic(TargetIX, 40, S0Update); -cast (?SKILL_VARIANT_PSI_2, _UserIX, [TargetIX], _Locations, S0Update) -> -   player_cast_logic(TargetIX, 60, S0Update); -cast (?SKILL_VARIANT_PSI_3, _UserIX, [TargetIX], _Locations, S0Update) -> -   player_cast_logic(TargetIX, 80, S0Update). +cast (_Skill, _UserIX, _TargetIXs, _Locations, S0Update) -> +   S0Update. | 


