|
1 | 1 |
|
2 | 2 | from .Names import LocationName
|
3 | 3 |
|
| 4 | + |
| 5 | +class BowserRoom(): |
| 6 | + name: str |
| 7 | + exitAddress: int |
| 8 | + roomID: int |
| 9 | + |
| 10 | + def __init__(self, name: str, exitAddress: int, roomID: int): |
| 11 | + self.name = name |
| 12 | + self.exitAddress = exitAddress |
| 13 | + self.roomID = roomID |
| 14 | + |
| 15 | +full_bowser_rooms = [ |
| 16 | + BowserRoom("Hallway 1 - Door 1", 0x3A680, 0x0D), |
| 17 | + BowserRoom("Hallway 1 - Door 2", 0x3A684, 0x0D), |
| 18 | + BowserRoom("Hallway 1 - Door 3", 0x3A688, 0x0D), |
| 19 | + BowserRoom("Hallway 1 - Door 4", 0x3A68C, 0x0D), |
| 20 | + BowserRoom("Hallway 2 - Door 1", 0x3A8CB, 0xD0), |
| 21 | + BowserRoom("Hallway 2 - Door 2", 0x3A8CF, 0xD0), |
| 22 | + BowserRoom("Hallway 2 - Door 3", 0x3A8D3, 0xD0), |
| 23 | + BowserRoom("Hallway 2 - Door 4", 0x3A8D7, 0xD0), |
| 24 | + |
| 25 | + BowserRoom("Room 1", 0x3A705, 0xD4), |
| 26 | + BowserRoom("Room 2", 0x3A763, 0xD3), |
| 27 | + BowserRoom("Room 3", 0x3A800, 0xD2), |
| 28 | + BowserRoom("Room 4", 0x3A83D, 0xD1), |
| 29 | + BowserRoom("Room 5", 0x3A932, 0xCF), |
| 30 | + BowserRoom("Room 6", 0x3A9E1, 0xCE), |
| 31 | + BowserRoom("Room 7", 0x3AA75, 0xCD), |
| 32 | + BowserRoom("Room 8", 0x3AAC7, 0xCC), |
| 33 | +] |
| 34 | + |
| 35 | +standard_bowser_rooms = [ |
| 36 | + BowserRoom("Room 1", 0x3A705, 0xD4), |
| 37 | + BowserRoom("Room 2", 0x3A763, 0xD3), |
| 38 | + BowserRoom("Room 3", 0x3A800, 0xD2), |
| 39 | + BowserRoom("Room 4", 0x3A83D, 0xD1), |
| 40 | + BowserRoom("Room 5", 0x3A932, 0xCF), |
| 41 | + BowserRoom("Room 6", 0x3A9E1, 0xCE), |
| 42 | + BowserRoom("Room 7", 0x3AA75, 0xCD), |
| 43 | + BowserRoom("Room 8", 0x3AAC7, 0xCC), |
| 44 | +] |
| 45 | + |
| 46 | + |
| 47 | +class BossRoom(): |
| 48 | + name: str |
| 49 | + exitAddress: int |
| 50 | + exitAddressAlt: int |
| 51 | + roomID: int |
| 52 | + |
| 53 | + def __init__(self, name: str, exitAddress: int, roomID: int, exitAddressAlt=None): |
| 54 | + self.name = name |
| 55 | + self.exitAddress = exitAddress |
| 56 | + self.roomID = roomID |
| 57 | + self.exitAddressAlt = exitAddressAlt |
| 58 | + |
| 59 | + |
| 60 | +submap_boss_rooms = [ |
| 61 | + BossRoom("#1 Lemmy Koopa", 0x311E3, 0xF6), # Submap 0x1F6 |
| 62 | + BossRoom("#3 Lemmy Koopa", 0x33749, 0xF2), # Submap 0x1F2 |
| 63 | + BossRoom("Valley Reznor", 0x3A132, 0xDE), # Submap 0x1DE |
| 64 | + BossRoom("#7 Larry Koopa", 0x3A026, 0xEB), # Submap 0x1EB |
| 65 | +] |
| 66 | + |
| 67 | +ow_boss_rooms = [ |
| 68 | + BossRoom("#2 Morton Koopa Jr.", 0x3209B, 0xE5), # OW 0x0E5 |
| 69 | + BossRoom("Vanilla Reznor", 0x33EAB, 0xDF), # OW 0x0DF |
| 70 | + BossRoom("#4 Ludwig von Koopa", 0x346EA, 0xD9), # OW 0x0D9 |
| 71 | + BossRoom("Forest Reznor", 0x3643E, 0xD5, 0x36442), # OW 0x0D5 |
| 72 | + BossRoom("#5 Roy Koopa", 0x35ABC, 0xCC), # OW 0x0CC |
| 73 | + BossRoom("Chocolate Reznor", 0x3705B, 0xE2), # OW 0x0E2 |
| 74 | + BossRoom("#6 Wendy O. Koopa", 0x38BB5, 0xD3), # OW 0x0D3 |
| 75 | +] |
| 76 | + |
| 77 | + |
4 | 78 | class SMWPath():
|
5 | 79 | thisEndDirection: int
|
6 | 80 | otherLevelID: int
|
@@ -203,6 +277,9 @@ def __init__(self, levelName: str, levelIDAddress: int, eventIDValue: int, exit1
|
203 | 277 | 0x3B,
|
204 | 278 | 0x3A,
|
205 | 279 | 0x37,
|
| 280 | +] |
| 281 | + |
| 282 | +special_zone_levels = [ |
206 | 283 | 0x4E,
|
207 | 284 | 0x4F,
|
208 | 285 | 0x50,
|
@@ -443,6 +520,7 @@ def generate_level_list(world, player):
|
443 | 520 | world.random.shuffle(easy_single_levels_copy)
|
444 | 521 | hard_single_levels_copy = hard_single_levels.copy()
|
445 | 522 | world.random.shuffle(hard_single_levels_copy)
|
| 523 | + special_zone_levels_copy = special_zone_levels.copy() |
446 | 524 | easy_double_levels_copy = easy_double_levels.copy()
|
447 | 525 | world.random.shuffle(easy_double_levels_copy)
|
448 | 526 | hard_double_levels_copy = hard_double_levels.copy()
|
@@ -474,6 +552,8 @@ def generate_level_list(world, player):
|
474 | 552 | shuffled_level_list.append(0x16)
|
475 | 553 |
|
476 | 554 | single_levels_copy = (easy_single_levels_copy.copy() + hard_single_levels_copy.copy())
|
| 555 | + if not world.exclude_special_zone[player]: |
| 556 | + single_levels_copy.extend(special_zone_levels_copy) |
477 | 557 | world.random.shuffle(single_levels_copy)
|
478 | 558 |
|
479 | 559 | castle_fortress_levels_copy = (easy_castle_fortress_levels_copy.copy() + hard_castle_fortress_levels_copy.copy())
|
@@ -566,14 +646,17 @@ def generate_level_list(world, player):
|
566 | 646 |
|
567 | 647 | # Special Zone
|
568 | 648 | shuffled_level_list.append(0x4D)
|
569 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
570 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
571 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
572 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
573 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
574 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
575 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
576 |
| - shuffled_level_list.append(single_levels_copy.pop(0)) |
| 649 | + if not world.exclude_special_zone[player]: |
| 650 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 651 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 652 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 653 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 654 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 655 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 656 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 657 | + shuffled_level_list.append(single_levels_copy.pop(0)) |
| 658 | + else: |
| 659 | + shuffled_level_list.extend(special_zone_levels_copy) |
577 | 660 | shuffled_level_list.append(0x48)
|
578 | 661 |
|
579 | 662 | return shuffled_level_list
|
0 commit comments