summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/battle/struct')
-rw-r--r-- | src/battle/struct/btl_character.erl | 10 | ||||
-rw-r--r-- | src/battle/struct/btl_condition_parameters.erl | 27 |
2 files changed, 5 insertions, 32 deletions
diff --git a/src/battle/struct/btl_character.erl b/src/battle/struct/btl_character.erl index fa1fcde..9769f8f 100644 --- a/src/battle/struct/btl_character.erl +++ b/src/battle/struct/btl_character.erl @@ -21,7 +21,7 @@ { player_ix :: non_neg_integer(), rank :: rank(), - location :: {non_neg_integer(), non_neg_integer()}, + location :: shr_location:type(), current_health :: integer(), %% Negative integers let us reverse attacks. skill_points :: integer(), %% Negative integers let us reverse skill uses. is_active :: boolean(), @@ -37,7 +37,7 @@ { player_ix :: non_neg_integer(), rank :: rank(), - location :: {non_neg_integer(), non_neg_integer()}, + location :: shr_location:type(), current_health :: integer(), %% Negative integers let us reverse attacks. skill_points :: integer(), %% Negative integers let us reverse skill uses. is_active :: boolean(), @@ -156,7 +156,7 @@ get_player_index (#btl_char_ref{ player_ix = R }) -> R. get_rank (#btl_char{ rank = R }) -> R; get_rank (#btl_char_ref{ rank = R }) -> R. --spec get_location (either()) -> {non_neg_integer(), non_neg_integer()}. +-spec get_location (either()) -> shr_location:type(). get_location (#btl_char{ location = R }) -> R; get_location (#btl_char_ref{ location = R }) -> R. @@ -225,7 +225,7 @@ ataxia_set_rank (Rank, Char) -> -spec set_location ( - {non_neg_integer(), non_neg_integer()}, + shr_location:type(), shr_omnimods:type(), type() ) @@ -261,7 +261,7 @@ set_location (Location, LocOmnimods, Char) -> -spec ataxia_set_location ( - {non_neg_integer(), non_neg_integer()}, + shr_location:type(), shr_omnimods:type(), type() ) diff --git a/src/battle/struct/btl_condition_parameters.erl b/src/battle/struct/btl_condition_parameters.erl index 280e37c..eb78245 100644 --- a/src/battle/struct/btl_condition_parameters.erl +++ b/src/battle/struct/btl_condition_parameters.erl @@ -10,7 +10,6 @@ targets :: list(non_neg_integer()), locations :: list(shr_location:type()), uses :: (non_neg_integer() | -1), - duration :: (non_neg_integer() | -1), chance :: (0..100 | -1), other :: any() } @@ -40,10 +39,6 @@ set_uses/2, ataxia_set_uses/2, - get_duration/1, - set_duration/2, - ataxia_set_duration/2, - get_chance/1, set_chance/2, ataxia_set_chance/2, @@ -115,28 +110,6 @@ ataxia_set_uses (Uses, Params) -> ataxic:update_field(#btl_cond_params.uses, ataxic:constant(Uses)) }. -%%%%%%%%%%%%%%%%%% -%%%% Duration %%%% -%%%%%%%%%%%%%%%%%% --spec get_duration (type(_)) -> (non_neg_integer() | -1). -get_duration (Params) -> Params#btl_cond_params.duration. - --spec set_duration ((non_neg_integer() | -1), type(ODT)) -> type(ODT). -set_duration (Duration, Params) -> - Params#btl_cond_params{ duration = Duration }. - --spec ataxia_set_duration - ( - (non_neg_integer() | -1), - type(ODT) - ) - -> {type(ODT), ataxic:basic()}. -ataxia_set_duration (Duration, Params) -> - { - set_duration(Duration, Params), - ataxic:update_field(#btl_cond_params.duration, ataxic:constant(Duration)) - }. - %%%%%%%%%%%%%%%% %%%% Chance %%%% %%%%%%%%%%%%%%%% |