Skip to content

Commit

Permalink
Rewrite region, location and rule handling
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLX5 committed Mar 28, 2024
1 parent 970e530 commit 27e0acf
Show file tree
Hide file tree
Showing 9 changed files with 644 additions and 316 deletions.
1 change: 0 additions & 1 deletion worlds/mmx3/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def __init__(self, player: int, name: str = '', address: int = None, parent=None
LocationName.neon_tiger_mini_boss: starting_id + 0x000A,
LocationName.gravity_beetle_boss: starting_id + 0x000B,
LocationName.blast_hornet_boss: starting_id + 0x000C,
LocationName.blast_hornet_event: starting_id + 0x003F,
LocationName.blast_hornet_mini_boss: starting_id + 0x000D,
LocationName.doppler_lab_1_boss: starting_id + 0x000E,
LocationName.doppler_lab_1_mini_boss: starting_id + 0x000F,
Expand Down
26 changes: 26 additions & 0 deletions worlds/mmx3/Names/EventName.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
blast_hornet_defeated = "Event Blast Hornet Defeated"
blizzard_buffalo_defeated = "Event Blizzard Buffalo Defeated"
toxic_seahorse_defeated = "Event Toxic Seahorse Defeated"
tunnel_rhino_defeated = "Event Tunnel Rhino Defeated"
volt_catfish_defeated = "Event Volt Catfish Defeated"
crush_crawfish_defeated = "Event Crush Crawfish Defeated"
neon_tiger_defeated = "Event Neon Tiger Defeated"
gravity_beetle_defeated = "Event Gravity Beetle Defeated"
vile_defeated = "Event Vile Defeated"
bit_defeated = "Event Bit Defeated"
byte_defeated = "Event Byte Defeated"

dr_doppler_lab_1_clear = "Event Dr. Doppler's Lab 1 Cleared"
dr_doppler_lab_2_clear = "Event Dr. Doppler's Lab 2 Cleared"
dr_doppler_lab_3_clear = "Event Dr. Doppler's Lab 3 Cleared"

blast_hornet_rematch = "Event Blast Hornet Rematch"
blizzard_buffalo_rematch = "Event Blizzard Buffalo Rematch"
toxic_seahorse_rematch = "Event Toxic Seahorse Rematch"
tunnel_rhino_rematch = "Event Tunnel Rhino Rematch"
volt_catfish_rematch = "Event Volt Catfish Rematch"
crush_crawfish_rematch = "Event Crush Crawfish Rematch"
neon_tiger_rematch = "Event Neon Tiger Rematch"
gravity_beetle_rematch = "Event Gravity Beetle Rematch"

boss_rematch_clear = "Event Boss Rematch Clear"
17 changes: 0 additions & 17 deletions worlds/mmx3/Names/ItemName.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,7 @@
maverick_medal = "Maverick Medal"
victory = "Sigma Defeated"

# Zero
zero = "Zero"

# Junk
small_hp = "Small HP Refill"
large_hp = "Large HP Refill"
life = "1-Up"

# Events

event_blast_hornet_defeated = "Event Blast Hornet Defeated"
event_blizzard_buffalo_defeated = "Event Blizzard Buffalo Defeated"
event_toxic_seahorse_defeated = "Event Toxic Seahorse Defeated"
event_tunnel_rhino_defeated = "Event Tunnel Rhino Defeated"
event_volt_catfish_defeated = "Event Volt Catfish Defeated"
event_crush_crawfish_defeated = "Event Crush Crawfish Defeated"
event_neon_tiger_defeated = "Event Neon Tiger Defeated"
event_gravity_beetle_defeated = "Event Gravity Beetle Defeated"
event_vile_defeated = "Event Vile Defeated"
event_bit_defeated = "Event Bit Defeated"
event_byte_defeated = "Event Byte Defeated"
36 changes: 2 additions & 34 deletions worlds/mmx3/Names/LocationName.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
gravity_beetle_hp_6 = "Gravity Beetle Stage - HP Pickup 6 (Third left platform after falling missiles)"

blast_hornet_boss = "Blast Hornet Defeated"
blast_hornet_event = "Blast Hornet's Core Obtained"
blast_hornet_clear = "Blast Hornet Stage - Clear"
blast_hornet_mini_boss = "Blast Hornet Stage - Shurikein Defeated"
blast_hornet_heart_tank = "Blast Hornet Stage - Heart Tank"
Expand All @@ -97,15 +96,15 @@
blast_hornet_hp_1 = "Blast Hornet Stage - HP Pickup 1 (Bottom left of conveyor belts section)"
blast_hornet_hp_2 = "Blast Hornet Stage - HP Pickup 2 (Hidden in left wall of third hangar)"

doppler_lab_1_boss = "Press Disposer/Godkarmachine O' Inary Defeated"
doppler_lab_1_boss = "Dr. Doppler's Lab 1 Boss Defeated"
doppler_lab_1_clear = "Dr. Doppler's Lab 1 - Clear"
doppler_lab_1_mini_boss = "Dr. Doppler's Lab 1 - REX-2000 Defeated"
doppler_lab_1_gold_armor = "Dr. Doppler's Lab 1 - Gold Armor Capsule"
doppler_lab_1_energy = "Dr. Doppler's Lab 1 - Weapon Energy Pickup (Right platform before REX-2000 room)"
doppler_lab_1_hp_1 = "Dr. Doppler's Lab 1 - HP Pickup 1 (Right platform before REX-2000 room)"
doppler_lab_1_hp_2 = "Dr. Doppler's Lab 1 - HP Pickup 2 (Below Ride Armor pad)"

doppler_lab_2_boss = "Volt Kurageil/Vile MK-II Defeated"
doppler_lab_2_boss = "Dr. Doppler's Lab 2 Boss Defeated"
doppler_lab_2_clear = "Dr. Doppler's Lab 2 - Clear"
doppler_lab_2_mini_boss = "Dr. Doppler's Lab 2 - Mosquitus Defeated"
doppler_lab_2_z_saber = "Dr. Doppler's Lab 2 - Z-Saber"
Expand Down Expand Up @@ -140,34 +139,3 @@

bit_defeat = "Bit Defeated"
byte_defeat = "Byte Defeated"

# Regions

intro_stage_region = "Hunter Base - Region"
blizzard_buffalo_region = "Blizzard Buffalo - Region"
toxic_seahorse_region = "Toxic Seahorse - Region"
tunnel_rhino_region = "Tunnel Rhino - Region"
volt_catfish_region = "Volt Catfish - Region"
crush_crawfish_region = "Crush Crawfish - Region"
neon_tiger_region = "Neon Tiger - Region"
gravity_beetle_region = "Gravity Beetle - Region"
blast_hornet_region = "Blast Hornet - Region"
vile_region = "Vile - Region"
bit_byte_region = "Bit and Byte Arena - Region"
dr_doppler_lab_region = "Dr. Doppler's Lab - Region"
dr_doppler_lab_1_region = "Dr. Doppler's Lab 1 - Region"
dr_doppler_lab_2_region = "Dr. Doppler's Lab 2 - Region"
dr_doppler_lab_3_region = "Dr. Doppler's Lab 3 - Region"
dr_doppler_lab_4_region = "Dr. Doppler's Lab 4 - Region"

event_blast_hornet_defeated = "Event Blast Hornet Defeated"
event_blizzard_buffalo_defeated = "Event Blizzard Buffalo Defeated"
event_toxic_seahorse_defeated = "Event Toxic Seahorse Defeated"
event_tunnel_rhino_defeated = "Event Tunnel Rhino Defeated"
event_volt_catfish_defeated = "Event Volt Catfish Defeated"
event_crush_crawfish_defeated = "Event Crush Crawfish Defeated"
event_neon_tiger_defeated = "Event Neon Tiger Defeated"
event_gravity_beetle_defeated = "Event Gravity Beetle Defeated"
event_vile_defeated = "Event Vile Defeated"
event_bit_defeated = "Event Bit Defeated"
event_byte_defeated = "Event Byte Defeated"
76 changes: 76 additions & 0 deletions worlds/mmx3/Names/RegionName.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
intro_stage = "Hunter Base"

blizzard_buffalo = "Blizzard Buffalo"
blizzard_buffalo_start = "Blizzard Buffalo - Starting Area"
blizzard_buffalo_bit_byte = "Blizzard Buffalo - Bit & Byte Arena"
blizzard_buffalo_after_bit_byte = "Blizzard Buffalo - After Bit & Byte Arena"
blizzard_buffalo_boss = "Blizzard Buffalo - Boss Arena"

toxic_seahorse = "Toxic Seahorse"
toxic_seahorse_start = "Toxic Seahorse - Starting Area"
toxic_seahorse_bit_byte = "Toxic Seahorse - Bit & Byte Arena"
toxic_seahorse_underwater = "Toxic Seahorse - Underwater Area"
toxic_seahorse_hootareca = "Toxic Seahorse - Hootareca Arena"
toxic_seahorse_dam = "Toxic Seahorse - Dam Area"
toxic_seahorse_boss = "Toxic Seahorse - Boss Arena"

tunnel_rhino = "Tunnel Rhino"
tunnel_rhino_start = "Tunnel Rhino - Starting Area"
tunnel_rhino_bit_byte = "Tunnel Rhino - Bit & Byte Arena"
tunnel_rhino_wall_jump = "Tunnel Rhino - Wall Jump Area"
tunnel_rhino_hell_crusher = "Tunnel Rhino - Hell Crusher Arena"
tunnel_rhino_climbing = "Tunnel Rhino - Climbing Area"
tunnel_rhino_boss = "Tunnel Rhino - Boss Arena"

volt_catfish = "Volt Catfish"
volt_catfish_start = "Volt Catfish - Starting Area"
volt_catfish_bit_byte = "Volt Catfish - Bit & Byte Arena"
volt_catfish_inside = "Volt Catfish - Inside Power Control Center"
volt_catfish_boss = "Volt Catfish - Boss Arena"

crush_crawfish = "Crush Crawfish"
crush_crawfish_start = "Crush Crawfish - Starting Area"
crush_crawfish_bit_byte = "Crush Crawfish - Bit & Byte Arena"
crush_crawfish_inside = "Crush Crawfish - Inside ship"
crush_crawfish_boss = "Crush Crawfish - Boss Arena"

neon_tiger = "Neon Tiger"
neon_tiger_start = "Neon Tiger - Starting Area"
neon_tiger_worm = "Neon Tiger - Worm Seeker-R Arena"
neon_tiger_bit_byte = "Neon Tiger - Bit & Byte Arena"
neon_tiger_hill = "Neon Tiger - Going down hill"
neon_tiger_boss = "Neon Tiger - Boss Arena"

gravity_beetle = "Gravity Beetle"
gravity_beetle_start = "Gravity Beetle - Starting Area"
gravity_beetle_bit_byte = "Gravity Beetle - Bit & Byte Arena"
gravity_beetle_outside = "Gravity Beetle - Outside"
gravity_beetle_inside = "Gravity Beetle - Inside"
gravity_beetle_boss = "Gravity Beetle - Boss Arena"

blast_hornet = "Blast Hornet"
blast_hornet_start = "Blast Hornet - Starting Area"
blast_hornet_conveyors = "Blast Hornet - After conveyors"
blast_hornet_shurikein = "Blast Hornet - Shurikein Arena"
blast_hornet_outside = "Blast Hornet - Outside"
blast_hornet_bit_byte = "Blast Hornet - Bit & Byte Arena"
blast_hornet_boss = "Blast Hornet - Boss Arena"

vile = "Vile"
vile_before = "Vile - Before fight"
vile_boss = "Vile - Boss Arena"
vile_after = "Vile - After fight"

bit_byte = "Bit and Byte Arena"

dr_doppler_lab = "Dr. Doppler's Lab"

dr_doppler_lab_1 = "Dr. Doppler's Lab 1"

dr_doppler_lab_2 = "Dr. Doppler's Lab 2"

dr_doppler_lab_3 = "Dr. Doppler's Lab 3"
dr_doppler_lab_3_rematches = "Dr. Doppler's Lab 3 - Rematches"
dr_doppler_lab_3_boss = "Dr. Doppler's Lab 3 - Boss"

dr_doppler_lab_4 = "Dr. Doppler's Lab 4"
40 changes: 40 additions & 0 deletions worlds/mmx3/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ class LogicBossWeakness(DefaultOnToggle):
"""
display_name = "Boss Weakness Logic"

class LogicRequireVileDefeatForDoppler(DefaultOnToggle):
"""
Añade a la logica de Dr. Doppler's Lab que Vile sea derrotado para poder accesar.
No afecta a las opciones que realmente abren Dr. Doppler's Lab.
"""
display_name = "Vile in logic for Lab Access"

class LogicZSaber(Choice):
"""
Adds the Z-Saber to the game's logic.
Expand Down Expand Up @@ -56,6 +63,15 @@ class Lab2Boss(Choice):
option_vile = 1
default = 0

class Lab3BossRematchCount(Range):
"""
Cuántos jefes se ocupan vencer para declarar como acabado el boss rush de Dr. Doppler's Lab 3
"""
display_name = "Doppler Lab 2 Boss"
range_start = 0
range_end = 8
default = 8

class DopplerOpen(Choice):
"""
Under what conditions will Dr. Doppler's lab open.
Expand Down Expand Up @@ -184,16 +200,38 @@ class VileSubTankCount(Range):
range_end = 4
default = 2

class BitMedalCount(Range):
"""
How many Maverick Medals are required to access Bit's fight.
"""
display_name = "Bit Medal Count"
range_start = 0
range_end = 6
default = 2

class ByteMedalCount(Range):
"""
How many Maverick Medals are required to access Byte's fight.
Nota: Si el conteo de medallas de Byte es igual o menor al de Bit,
se usara la cantidad de Bit + 1
"""
display_name = "Byte Medal Count"
range_start = 1
range_end = 7
default = 6

@dataclass
class MMX3Options(PerGameCommonOptions):
start_inventory_from_pool: StartInventoryPool
death_link: DeathLink
starting_life_count: StartingLifeCount
logic_boss_weakness: LogicBossWeakness
logic_vile_required: LogicRequireVileDefeatForDoppler
logic_z_saber: LogicZSaber
pickupsanity: PickupSanity
doppler_lab_1_boss: Lab1Boss
doppler_lab_2_boss: Lab2Boss
doppler_lab_3_boss_rematch_count: Lab3BossRematchCount
doppler_open: DopplerOpen
doppler_medal_count: DopplerMedalCount
doppler_weapon_count: DopplerWeaponCount
Expand All @@ -206,4 +244,6 @@ class MMX3Options(PerGameCommonOptions):
vile_upgrade_count: VileArmorUpgradeCount
vile_heart_tank_count: VileHeartTankCount
vile_sub_tank_count: VileSubTankCount
bit_medal_count: BitMedalCount
byte_medal_count: ByteMedalCount

Loading

0 comments on commit 27e0acf

Please sign in to comment.