Last commit to fix ice cross spilt the area logically in cross-dungeon
Wiki table function Trap flags for gauntlet doors
This commit is contained in:
@@ -734,6 +734,7 @@ def reassign_boss(boss_region, boss_key, builder, gt, world, player):
|
||||
|
||||
|
||||
def experiment(world, player):
|
||||
# print_wiki_doors(dungeon_regions, world, player)
|
||||
cross_dungeon(world, player)
|
||||
|
||||
|
||||
@@ -750,8 +751,12 @@ def convert_to_sectors(region_names, world, player):
|
||||
matching_sectors = []
|
||||
while len(exits) > 0:
|
||||
ext = exits.pop()
|
||||
if ext.connected_region is not None:
|
||||
connect_region = ext.connected_region
|
||||
door = world.check_for_door(ext.name, player)
|
||||
if ext.connected_region is not None or door is not None and door.controller is not None:
|
||||
if door is not None and door.controller is not None:
|
||||
connect_region = world.get_entrance(door.controller.name, player).parent_region
|
||||
else:
|
||||
connect_region = ext.connected_region
|
||||
if connect_region not in region_chunk and connect_region in region_list:
|
||||
region_list.remove(connect_region)
|
||||
region_chunk.append(connect_region)
|
||||
@@ -763,7 +768,6 @@ def convert_to_sectors(region_names, world, player):
|
||||
if existing not in matching_sectors:
|
||||
matching_sectors.append(existing)
|
||||
else:
|
||||
door = world.check_for_door(ext.name, player)
|
||||
if door is not None and door.controller is None and door.dest is None:
|
||||
outstanding_doors.append(door)
|
||||
sector = Sector()
|
||||
|
||||
6
Doors.py
6
Doors.py
@@ -1006,11 +1006,11 @@ def create_doors(world, player):
|
||||
create_door(player, 'GT Gauntlet 2 EN', Intr).dir(Ea, 0x5d, Top, High).pos(2),
|
||||
create_door(player, 'GT Gauntlet 2 SW', Intr).dir(So, 0x5d, Left, High).pos(0),
|
||||
create_door(player, 'GT Gauntlet 3 NW', Intr).dir(No, 0x5d, Left, High).pos(0),
|
||||
create_door(player, 'GT Gauntlet 3 SW', Nrml).dir(So, 0x5d, Left, High).pos(1),
|
||||
create_door(player, 'GT Gauntlet 4 NW', Nrml).dir(No, 0x6d, Left, High).pos(0),
|
||||
create_door(player, 'GT Gauntlet 3 SW', Nrml).dir(So, 0x5d, Left, High).trap(0x2).pos(1),
|
||||
create_door(player, 'GT Gauntlet 4 NW', Nrml).dir(No, 0x6d, Left, High).trap(0x4).pos(0),
|
||||
create_door(player, 'GT Gauntlet 4 SW', Intr).dir(So, 0x6d, Left, High).pos(1),
|
||||
create_door(player, 'GT Gauntlet 5 NW', Intr).dir(No, 0x6d, Left, High).pos(1),
|
||||
create_door(player, 'GT Gauntlet 5 WS', Nrml).dir(We, 0x6d, Bot, High).pos(2),
|
||||
create_door(player, 'GT Gauntlet 5 WS', Nrml).dir(We, 0x6d, Bot, High).trap(0x1).pos(2),
|
||||
create_door(player, 'GT Beam Dash ES', Nrml).dir(Ea, 0x6c, Bot, High).pos(2).kill(),
|
||||
create_door(player, 'GT Beam Dash WS', Intr).dir(We, 0x6c, Bot, High).pos(0),
|
||||
create_door(player, 'GT Lanmolas 2 ES', Intr).dir(Ea, 0x6c, Bot, High).pos(0),
|
||||
|
||||
39
Utils.py
39
Utils.py
@@ -184,5 +184,44 @@ def read_entrance_data(old_rom='Zelda no Densetsu - Kamigami no Triforce (Japan)
|
||||
print("%s: %s" % (dp, bytes))
|
||||
|
||||
|
||||
def print_wiki_doors(d_regions, world, player):
|
||||
|
||||
for d, region_list in d_regions.items():
|
||||
tile_map = {}
|
||||
for region in region_list:
|
||||
tile = None
|
||||
r = world.get_region(region, player)
|
||||
for ext in r.exits:
|
||||
door = world.check_for_door(ext.name, player)
|
||||
if door is not None and door.roomIndex != -1:
|
||||
tile = door.roomIndex
|
||||
break
|
||||
if tile is not None:
|
||||
if tile not in tile_map:
|
||||
tile_map[tile] = []
|
||||
tile_map[tile].append(r)
|
||||
print(d)
|
||||
print('{| class="wikitable"')
|
||||
print('|-')
|
||||
print('! Room')
|
||||
print('! Supertile')
|
||||
print('! Doors')
|
||||
for tile, region_list in tile_map.items():
|
||||
tile_done = False
|
||||
for region in region_list:
|
||||
print('|-')
|
||||
print('| '+region.name)
|
||||
if not tile_done:
|
||||
listlen = len(region_list)
|
||||
link = '| {{UnderworldMapLink|'+str(tile)+'}}'
|
||||
print(link if listlen < 2 else '| rowspan = '+str(listlen)+' '+link)
|
||||
tile_done = True
|
||||
strs_to_print = []
|
||||
for ext in region.exits:
|
||||
strs_to_print.append(ext.name)
|
||||
print('| '+' <br /> '.join(strs_to_print))
|
||||
print('|}')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
read_entrance_data(old_rom='C:\\Users\\Randall\\Documents\\kwyn\\orig\\z3.sfc')
|
||||
Reference in New Issue
Block a user