summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-12 17:48:41 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-12 17:48:41 +0200
commita132188ccc244a6d802bd1c32fbf196d4cb53cbd (patch)
treebd54e576ea8164d3efc801d9c56420218a74e591 /src/battle/struct/btl_character.erl
parentb853df7a1c3efef6b84b90fe8c492611564f8b53 (diff)
Got it to load the map (full of "error" tiles).
Diffstat (limited to 'src/battle/struct/btl_character.erl')
-rw-r--r--src/battle/struct/btl_character.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/battle/struct/btl_character.erl b/src/battle/struct/btl_character.erl
index d9362ea..3f5c360 100644
--- a/src/battle/struct/btl_character.erl
+++ b/src/battle/struct/btl_character.erl
@@ -89,9 +89,9 @@
list({non_neg_integer(), non_neg_integer()})
)
-> {non_neg_integer(), non_neg_integer()}.
-find_random_location (BattlemapWidth, BattlemapHeight, ForbiddenLocations) ->
- X = shr_roll:between(0, (BattlemapWidth - 1)),
- Y = shr_roll:between(0, (BattlemapHeight - 1)),
+find_random_location (MapWidth, MapHeight, ForbiddenLocations) ->
+ X = shr_roll:between(0, (MapWidth - 1)),
+ Y = shr_roll:between(0, (MapHeight - 1)),
IsForbidden = lists:member({X, Y}, ForbiddenLocations),
@@ -99,8 +99,8 @@ find_random_location (BattlemapWidth, BattlemapHeight, ForbiddenLocations) ->
true ->
find_random_location
(
- BattlemapWidth,
- BattlemapHeight,
+ MapWidth,
+ MapHeight,
ForbiddenLocations
);
@@ -241,9 +241,9 @@ set_statistics (Stats, Char) ->
list({non_neg_integer(), non_neg_integer()})
)
-> type().
-random (ID, PlayerIX, BattlemapWidth, BattlemapHeight, ForbiddenLocations) ->
+random (ID, PlayerIX, MapWidth, MapHeight, ForbiddenLocations) ->
Location =
- find_random_location(BattlemapWidth, BattlemapHeight, ForbiddenLocations),
+ find_random_location(MapWidth, MapHeight, ForbiddenLocations),
WeaponIDs = {shr_weapon:random_id(), shr_weapon:random_id()},
ArmorID = shr_armor:random_id(),
Attributes = shr_attributes:random(),