summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-11-18 10:40:03 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-11-18 10:40:03 +0100
commit3fb30b108828e3ad6bf811c0f3372a79ec6e9595 (patch)
treeef12976907cea83f7ef70168173d487b3cdc018e /src/battle/struct/btl_condition_parameters.erl
parentcc4e39960d3c56fceb2e31c01bf286dccc73615c (diff)
...
Diffstat (limited to 'src/battle/struct/btl_condition_parameters.erl')
-rw-r--r--src/battle/struct/btl_condition_parameters.erl37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/battle/struct/btl_condition_parameters.erl b/src/battle/struct/btl_condition_parameters.erl
index eb78245..e00dfeb 100644
--- a/src/battle/struct/btl_condition_parameters.erl
+++ b/src/battle/struct/btl_condition_parameters.erl
@@ -35,6 +35,11 @@
ataxia_set_targets/2,
ataxia_set_targets/3,
+ get_locations/1,
+ set_locations/2,
+ ataxia_set_locations/2,
+ ataxia_set_locations/3,
+
get_uses/1,
set_uses/2,
ataxia_set_uses/2,
@@ -59,6 +64,38 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%
+%%%% Locations %%%%
+%%%%%%%%%%%%%%%%%
+-spec get_locations (type(_)) -> list(shr_location:type()).
+get_locations (Params) -> Params#btl_cond_params.locations.
+
+-spec set_locations (list(shr_location:type()), type(ODT)) -> type(ODT).
+set_locations (Locations, Params) ->
+ Params#btl_cond_params{ locations = Locations }.
+
+-spec ataxia_set_locations
+ (
+ list(shr_location:type()),
+ type(ODT)
+ )
+ -> {type(ODT), ataxic:basic()}.
+ataxia_set_locations (Locations, Params) ->
+ ataxia_set_locations(Locations, ataxic:constant(Locations), Params).
+
+-spec ataxia_set_locations
+ (
+ list(shr_location:type()),
+ ataxic:basic(),
+ type(ODT)
+ )
+ -> {type(ODT), ataxic:basic()}.
+ataxia_set_locations (Locations, LocationsAtaxicUpdate, Params) ->
+ {
+ set_locations(Locations, Params),
+ ataxic:update_field(#btl_cond_params.locations, LocationsAtaxicUpdate)
+ }.
+
+%%%%%%%%%%%%%%%%%
%%%% Targets %%%%
%%%%%%%%%%%%%%%%%
-spec get_targets (type(_)) -> list(non_neg_integer()).