Skip to content

Commit

Permalink
pre-v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbrq committed Apr 22, 2024
1 parent a02cdb8 commit 7d84c7f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion worlds/mlss/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ async def game_watcher(self, ctx: "BizHawkClientContext") -> None:
"key": f"mlss_flag{location - 0xD9FFFF}_{ctx.team}_{ctx.slot}",
"default": 0,
"want_reply": False,
"operations": [{"operation": "replace", "value": 1}]
"operations": [{"operation": "or", "value": 1 << (location - 0xDA0000)}]
}])
continue
if location in roomException:
Expand Down
31 changes: 15 additions & 16 deletions worlds/mlss/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,14 +452,14 @@ class MLSSLocation(Location):
]

kidnappedFlag: typing.List[LocationData] = [
LocationData("Badge Shop Peach Kidnapped Flag 1", 0x3c0640, 2),
LocationData("Badge Shop Peach Kidnapped Flag 2", 0x3c0642, 2),
LocationData("Badge Shop Peach Kidnapped Flag 3", 0x3c0644, 2),
LocationData("Pants Shop Peach Kidnapped Flag 1", 0x3c0646, 2),
LocationData("Pants Shop Peach Kidnapped Flag 2", 0x3c0648, 2),
LocationData("Pants Shop Peach Kidnapped Flag 3", 0x3c064a, 2),
LocationData("Shop Peach Kidnapped Flag 1", 0x3c0606, 3),
LocationData("Shop Peach Kidnapped Flag 2", 0x3c0608, 3)
LocationData("Badge Shop Enter Fungitown Flag 1", 0x3c0640, 2),
LocationData("Badge Shop Enter Fungitown Flag 2", 0x3c0642, 2),
LocationData("Badge Shop Enter Fungitown Flag 3", 0x3c0644, 2),
LocationData("Pants Shop Enter Fungitown Flag 1", 0x3c0646, 2),
LocationData("Pants Shop Enter Fungitown Flag 2", 0x3c0648, 2),
LocationData("Pants Shop Enter Fungitown Flag 3", 0x3c064a, 2),
LocationData("Shop Enter Fungitown Flag 1", 0x3c0606, 3),
LocationData("Shop Enter Fungitown Flag 2", 0x3c0608, 3)
]

beanstarFlag: typing.List[LocationData] = [
Expand Down Expand Up @@ -846,14 +846,13 @@ class MLSSLocation(Location):
(0x4345, 0x4, 0x1e9409), # Thunder Hand
(0x42FF, 0x80, 0x251071), # Beanstone Reward
(0x42F9, 0x2, 0xDA0000), # Dragohoho
(0x4300, 0x40, 0xDA0001), # Queen Bean
(0x433D, 0x1, 0xDA0002), # Chuckolator
(0x43FC, 0x80, 0xDA0003), # Popple 2
(0x433D, 0x2, 0xDA0004), # Mom Piranha
(0x4342, 0x10, 0xDA0005), # Fungitowm
(0x433D, 0x8, 0xDA0006), # Beanstar
(0x430F, 0x40, 0xDA0007), # Jojora
(0x433D, 0x10, 0xDA0008) # Birdo
(0x433D, 0x1, 0xDA0001), # Chuckolator
(0x43FC, 0x80, 0xDA0002), # Popple 2
(0x433D, 0x2, 0xDA0003), # Mom Piranha
(0x4342, 0x10, 0xDA0004), # Fungitowm
(0x433D, 0x8, 0xDA0005), # Beanstar
(0x430F, 0x40, 0xDA0006), # Jojora
(0x433D, 0x10, 0xDA0007) # Birdo
]

roomException = {
Expand Down
10 changes: 5 additions & 5 deletions worlds/mlss/Names/LocationName.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ class LocationName():
ShopMomPiranhaFlag2 = "Shop Mom Piranha Flag 2"
ShopMomPiranhaFlag3 = "Shop Mom Piranha Flag 3"
ShopMomPiranhaFlag4 = "Shop Mom Piranha Flag 4"
ShopPeachKidnappedFlag1 = "Shop Peach Kidnapped Flag 1"
ShopPeachKidnappedFlag2 = "Shop Peach Kidnapped Flag 2"
ShopPeachKidnappedFlag1 = "Shop Enter Fungitown Flag 1"
ShopPeachKidnappedFlag2 = "Shop Enter Fungitown Flag 2"
FungitownShopStartingFlag1 = "Fungitown Shop Starting Flag 1"
FungitownShopStartingFlag2 = "Fungitown Shop Starting Flag 2"
FungitownShopStartingFlag3 = "Fungitown Shop Starting Flag 3"
Expand Down Expand Up @@ -477,9 +477,9 @@ class LocationName():
PantsShopMomPiranhaFlag1 = "Pants Shop Mom Piranha Flag 1"
PantsShopMomPiranhaFlag2 = "Pants Shop Mom Piranha Flag 2"
PantsShopMomPiranhaFlag3 = "Pants Shop Mom Piranha Flag 3"
PantsShopPeachKidnappedFlag1 = "Pants Shop Peach Kidnapped Flag 1"
PantsShopPeachKidnappedFlag2 = "Pants Shop Peach Kidnapped Flag 2"
PantsShopPeachKidnappedFlag3 = "Pants Shop Peach Kidnapped Flag 3"
PantsShopPeachKidnappedFlag1 = "Pants Shop Enter Fungitown Flag 1"
PantsShopPeachKidnappedFlag2 = "Pants Shop Enter Fungitown Flag 2"
PantsShopPeachKidnappedFlag3 = "Pants Shop Enter Fungitown Flag 3"
PantsShopBeanstarCompleteFlag1 = "Pants Shop Beanstar Complete Flag 1"
PantsShopBeanstarCompleteFlag2 = "Pants Shop Beanstar Complete Flag 2"
PantsShopBeanstarCompleteFlag3 = "Pants Shop Beanstar Complete Flag 3"
Expand Down
19 changes: 12 additions & 7 deletions worlds/mlss/Options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Options import Choice, Toggle, StartInventoryPool, PerGameCommonOptions
from Options import Choice, Toggle, StartInventoryPool, PerGameCommonOptions, Range
from dataclasses import dataclass


Expand Down Expand Up @@ -168,16 +168,21 @@ class RandomizeBosses(Choice):

class ScaleStats(Toggle):
"""
This scales enemy HP and XP according to the area of the game you are in.
This scales enemy HP, POW, DEF, and XP to vanilla values.
This setting is intended for use with the Enemy Randomizer and is Recommended to turn on.
If you are not using the Enemy Randomizer the effects will be minimal.
"""
display_name = "Scale Enemy Stats"


class ScalePow(Toggle):
class XPMultiplier(Range):
"""
This scales enemy POW according to the area of the game you are in.
This will multiply any XP you receive in battle by the chosen multiplier.
"""
display_name = "Scale Enemy POW"
display_name = "XP Multiplier"
range_start = 1
range_end = 4
default = 1


class TattleHp(Toggle):
Expand Down Expand Up @@ -260,7 +265,7 @@ class MLSSOptions(PerGameCommonOptions):
randomize_bosses: RandomizeBosses
randomize_backgrounds: RandomizeBackgrounds
scale_stats: ScaleStats
scale_pow: ScalePow
xp_multiplier: XPMultiplier
tattle_hp: TattleHp
mario_color: MarioColor
luigi_color: LuigiColor
Expand Down
6 changes: 3 additions & 3 deletions worlds/mlss/Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create_regions(world: "MLSSWorld", excluded: typing.List[str]):
create_region(world, "Shop Starting Flag", startingFlag, excluded)
create_region(world, "Shop Chuckolator Flag", chuckolatorFlag, excluded)
create_region(world, "Shop Piranha Flag", piranhaFlag, excluded)
create_region(world, "Shop Peach Kidnapped Flag", kidnappedFlag, excluded)
create_region(world, "Shop Enter Fungitown Flag", kidnappedFlag, excluded)
create_region(world, "Shop Beanstar Complete Flag", beanstarFlag, excluded)
create_region(world, "Shop Birdo Flag", birdoFlag, excluded)
create_region(world, "Surfable", surfable, excluded)
Expand Down Expand Up @@ -69,8 +69,8 @@ def connect_regions(world: "MLSSWorld"):
connect(world, names, "Fungitown", "FungitownBeanstar", lambda state: StateLogic.pieces(state, world.player) or state.can_reach("FungitownBirdo", "Region", world.player))
connect(world, names, "Main Area", "Shop Starting Flag", lambda state: StateLogic.brooch(state, world.player) or StateLogic.rose(state, world.player))
connect(world, names, "Shop Starting Flag", "Shop Chuckolator Flag", lambda state: (StateLogic.brooch(state, world.player) and StateLogic.fruits(state, world.player) and (StateLogic.thunder(state, world.player) or StateLogic.fire(state, world.player) or StateLogic.hammers(state, world.player))) or state.can_reach("Shop Piranha Flag", "Region", world.player))
connect(world, names, "Shop Starting Flag", "Shop Piranha Flag", lambda state: StateLogic.thunder(state, world.player) or state.can_reach("Shop Peach Kidnapped Flag", "Region", world.player))
connect(world, names, "Shop Starting Flag", "Shop Peach Kidnapped Flag", lambda state: StateLogic.fungitown(state, world.player) or state.can_reach("Shop Beanstar Complete Flag", "Region", world.player))
connect(world, names, "Shop Starting Flag", "Shop Piranha Flag", lambda state: StateLogic.thunder(state, world.player) or state.can_reach("Shop Enter Fungitown Flag", "Region", world.player))
connect(world, names, "Shop Starting Flag", "Shop Enter Fungitown Flag", lambda state: StateLogic.fungitown(state, world.player) or state.can_reach("Shop Beanstar Complete Flag", "Region", world.player))
connect(world, names, "Shop Starting Flag", "Shop Beanstar Complete Flag", lambda state: (StateLogic.castleTown(state, world.player) and StateLogic.pieces(state, world.player) and StateLogic.rose(state, world.player)) or state.can_reach("Shop Birdo Flag", "Region", world.player))
connect(world, names, "Main Area", "Sewers", lambda state: StateLogic.rose(state, world.player))
connect(world, names, "Main Area", "Airport", lambda state: StateLogic.thunder(state, world.player))
Expand Down
6 changes: 3 additions & 3 deletions worlds/mlss/Rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ def write_tokens(world: "MLSSWorld", patch: MLSSProcedurePatch) -> None:
if world.options.scale_stats:
patch.write_token(
APTokenTypes.WRITE,
0x1E9418,
0xD00002,
bytes([0x1])
)

if world.options.scale_pow:
if world.options.xp_multiplier:
patch.write_token(
APTokenTypes.WRITE,
0x1E9419,
0xD00003,
bytes([0x1])
)

Expand Down

0 comments on commit 7d84c7f

Please sign in to comment.