Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.

Commit 6681237

Browse files
committed
Automap pather for Shenk
1 parent 5825260 commit 6681237

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed
911 Bytes
Loading
936 Bytes
Loading

src/pather.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ def __init__(self):
126126
1228: {'TRAV_AUTOMAP': (430, 10)},
127127
1229: {'TRAV_AUTOMAP': (442, -8)},
128128
1230: {'TRAV_AUTOMAP': (406, -25)},
129+
# Shenk
130+
1146: {'SHENK_WP_AUTOMAP': (66, 28), 'SHENK_ROCK_AUTOMAP': (124, 38)},
131+
1147: {'SHENK_WP_AUTOMAP': (137, 108), 'SHENK_ROCK_AUTOMAP': (195, 118)},
132+
1148: {'SHENK_WP_AUTOMAP': (213, 138), 'SHENK_ROCK_AUTOMAP': (271, 148)}, # A5_SHENK_SAFE_DIST
133+
1149: {'SHENK_WP_AUTOMAP': (269, 168), 'SHENK_ROCK_AUTOMAP': (327, 178)},
129134

130135
# A5 town
131136
0: {'A5_TOWN_0': (27, 249), 'A5_TOWN_1': (-92, -137), 'A5_TOWN_11': (-313, -177)},
@@ -419,6 +424,8 @@ def __init__(self):
419424
(Location.A5_LARZUK, Location.A5_MALAH): [1014, 1007, 1003, 1000, 1001],
420425
(Location.A5_NIHLATHAK_PORTAL, Location.A5_STASH): [1009, 1008, 1006, 1005],
421426
(Location.A5_NIHLATHAK_PORTAL, Location.A5_WP): [1009, 1008, 1006],
427+
# Eldritch and Shenk
428+
(Location.A5_SHENK_START, Location.A5_SHENK_SAFE_DIST): [1146, 1147, 1148],
422429
}
423430
self._paths = {
424431
# A5 Town
@@ -958,3 +965,5 @@ def show_automap_pos(template: list[str], threshold=0.75):
958965
keyboard.wait("f11")
959966
show_automap_pos(["A5_TOWN_AUTOMAP"])
960967
#show_automap_pos(["TRAV_AUTOMAP"])
968+
#show_automap_pos(["SHENK_WP_AUTOMAP", "SHENK_WP1_AUTOMAP"])
969+
#show_automap_pos(["SHENK_ROCK_AUTOMAP"])

src/run/shenk_eld.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ def battle(self, do_shenk: bool, do_pre_buff: bool, game_stats) -> bool | tuple[
5858
game_stats.update_location("Shk")
5959
self._curr_loc = Location.A5_SHENK_START
6060
# No force move, otherwise we might get stuck at stairs!
61-
if not self._pather.traverse_nodes((Location.A5_SHENK_START, Location.A5_SHENK_SAFE_DIST), self._char):
61+
if self._char.capabilities.can_teleport_natively:
62+
self._pather.traverse_nodes_fixed([(1128, 710)]*4, self._char)
63+
success = self._pather.traverse_nodes_automap([1148], self._char, force_tp=True)
64+
else:
65+
success = self._pather.traverse_nodes_automap((Location.A5_SHENK_START, Location.A5_SHENK_SAFE_DIST), self._char)
66+
if not success:
6267
return False
6368
self._char.kill_shenk()
6469
loc = Location.A5_SHENK_END

0 commit comments

Comments
 (0)