| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-10-21 21:50:25 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-10-21 21:50:25 +0200 | 
| commit | 3391371f9979f374e5cb3243e1f71500c6115f90 (patch) | |
| tree | 4c59b4c03c7837c86fe758f524b6b4b595abdb31 /src/battle/mechanic/condition/btl_cond_heal.erl | |
| parent | c2bff6b098480af6a21bde453494f8ff64219ea7 (diff) | |
Update for Ataxia.
Diffstat (limited to 'src/battle/mechanic/condition/btl_cond_heal.erl')
| -rw-r--r-- | src/battle/mechanic/condition/btl_cond_heal.erl | 78 | 
1 files changed, 0 insertions, 78 deletions
diff --git a/src/battle/mechanic/condition/btl_cond_heal.erl b/src/battle/mechanic/condition/btl_cond_heal.erl index 897768a..f38de7b 100644 --- a/src/battle/mechanic/condition/btl_cond_heal.erl +++ b/src/battle/mechanic/condition/btl_cond_heal.erl @@ -18,84 +18,6 @@  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec apply_to_character -   ( -      btl_condition:type(), -      btl_character:type() -   ) -   -> -   { -      btl_condition:type(), -      btl_condition:update_action(), -      [{btl_character:type(), ataxic:basic()}] -   }. -apply_to_character (Condition, S0Character) -> -   {_TargetIX, Amount} = btl_condition:get_parameters(Condition), - -   case btl_character:get_is_alive(S0Character) of -      false -> {Condition, none, []}; -      true -> -         RemainingUses = btl_condition:get_remaining_uses(Condition), -         CurrentHealth = btl_character:get_current_health(S0Character), -         MaxHealth = -            shr_attributes:get_health -            ( -               shr_character:get_attributes -               ( -                  btl_character:get_base_character(S0Character) -               ) -            ), - -         UpdatedHealth = min(MaxHealth, (CurrentHealth + Amount)), -         UpdatedRemainingUses = - -         {S1Character, CharacterUpdate} = -            btl_character:ataxia_set_current_health(UpdatedHealth, S0Character), - -         if -            (RemainingUses == -1) -> -               { -                  Condition, -                  none, -                  [{S1Character, CharacterUpdate}] -               }; - -            (RemainingUses == 1) -> -               { -                  remove, -                  [{S1Character, CharacterUpdate}] -               }; - -            (RemainingUses == 0) -> -               { -                  remove, -                  [{S1Character, CharacterUpdate}] -               }; - -            true -> -               {UpdatedCondition, ConditionUpdate} = -                  btl_condition:ataxia_set_remaining_uses -                  ( -                     UpdatedRemainingUses, -                     Condition -                  ), -               { -                  UpdatedCondition, -                  {update, ConditionUpdate}, -                  [{S1Character, CharacterUpdate}] -               } -         end -   end. - --spec handle_context -   ( -      shr_condition:context(), -      btl_condition:type() -   ) -   -> shr_condition:context(). -handle_context ({Trigger, ReadOnly, VolatileData}, Condition) -> -   {_TargetIX, _Amount} = btl_condition:get_parameters(Condition), -   {Trigger, ReadOnly, VolatileData}.  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  | 


