summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-02-15 15:53:58 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-02-15 15:53:58 +0100
commit9b91ff37a1e39f48631b5bee338c31318d1e2336 (patch)
treeccaa397a8268bcc8c2679ecbfa5fe75bf11b242a /src/battle/mechanic
parent103d1672665b64c85808836778fde21b7622abd1 (diff)
/{btl,map}_{map,location,direction}/shr_\2/
Diffstat (limited to 'src/battle/mechanic')
-rw-r--r--src/battle/mechanic/turn_action/btl_turn_actions_attack.erl2
-rw-r--r--src/battle/mechanic/turn_action/btl_turn_actions_move.erl32
2 files changed, 17 insertions, 17 deletions
diff --git a/src/battle/mechanic/turn_action/btl_turn_actions_attack.erl b/src/battle/mechanic/turn_action/btl_turn_actions_attack.erl
index 462e868..b59efb7 100644
--- a/src/battle/mechanic/turn_action/btl_turn_actions_attack.erl
+++ b/src/battle/mechanic/turn_action/btl_turn_actions_attack.erl
@@ -123,7 +123,7 @@ handle_attack_sequence
-> list(btl_attack:step()).
get_attack_sequence (Character, TargetCharacter) ->
Range =
- btl_location:dist
+ shr_location:dist
(
btl_character:get_location(Character),
btl_character:get_location(TargetCharacter)
diff --git a/src/battle/mechanic/turn_action/btl_turn_actions_move.erl b/src/battle/mechanic/turn_action/btl_turn_actions_move.erl
index bf023d5..814239b 100644
--- a/src/battle/mechanic/turn_action/btl_turn_actions_move.erl
+++ b/src/battle/mechanic/turn_action/btl_turn_actions_move.erl
@@ -18,18 +18,18 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec cross
(
- btl_map:type(),
- list(btl_location:type()),
- list(btl_direction:enum()),
+ shr_map:type(),
+ list(shr_location:type()),
+ list(shr_direction:enum()),
non_neg_integer(),
- btl_location:type()
+ shr_location:type()
)
- -> {btl_location:type(), non_neg_integer()}.
+ -> {shr_location:type(), non_neg_integer()}.
cross (_Map, _ForbiddenLocations, [], Cost, Location) ->
{Location, Cost};
cross (Map, ForbiddenLocations, [Step|NextSteps], Cost, Location) ->
- NextLocation = btl_location:apply_direction(Step, Location),
- NextTileInstance = btl_map:get_tile_instance(NextLocation, Map),
+ NextLocation = shr_location:apply_direction(Step, Location),
+ NextTileInstance = shr_map:get_tile_instance(NextLocation, Map),
NextTileClassID = shr_tile:extract_main_class_id(NextTileInstance),
NextTile = shr_tile:from_class_id(NextTileClassID),
NextCost = (Cost + shr_tile:get_cost(NextTile)),
@@ -49,21 +49,21 @@ cross (Map, ForbiddenLocations, [Step|NextSteps], Cost, Location) ->
-spec cross
(
- btl_map:type(),
- list(btl_location:type()),
- list(btl_direction:enum()),
- btl_location:type()
+ shr_map:type(),
+ list(shr_location:type()),
+ list(shr_direction:enum()),
+ shr_location:type()
)
- -> {btl_location:type(), non_neg_integer()}.
+ -> {shr_location:type(), non_neg_integer()}.
cross (Map, ForbiddenLocations, Path, Location) ->
cross(Map, ForbiddenLocations, Path, 0, Location).
-spec get_path_cost_and_destination
(
btl_character_turn_data:type(),
- list(btl_direction:type())
+ list(shr_direction:type())
)
- -> {non_neg_integer(), btl_location:type()}.
+ -> {non_neg_integer(), shr_location:type()}.
get_path_cost_and_destination (Data, Path) ->
Character = btl_character_turn_data:get_character(Data),
CharacterIX = btl_character_turn_data:get_character_ix(Data),
@@ -116,8 +116,8 @@ assert_character_can_move (Data, Cost) ->
(
btl_character_current_data:type(),
btl_character_turn_update:type(),
- list(btl_direction:type()),
- btl_location:type()
+ list(shr_direction:type()),
+ shr_location:type()
)
-> btl_character_turn_update:type().
commit_move (PreviousCurrentData, Update, Path, NewLocation) ->