Skip to content

Commit

Permalink
Item groups + small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbrq committed Dec 18, 2024
1 parent cacab68 commit 9973678
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .run/Archipelago Unittests.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Archipelago Unittests" type="tests" factoryName="Unittests">
<module name="Archipelago" />
<module name="ArchipelagoMainMLSS" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
Expand Down
7 changes: 7 additions & 0 deletions worlds/mlss/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,12 @@ class MLSSItem(Item):
"Hammers": 3,
}

mlss_item_name_groups = {
"Beanstar Piece": { "Beanstar Piece 1", "Beanstar Piece 2", "Beanstar Piece 3", "Beanstar Piece 4"},
"Beanfruit": { "Bean Fruit 1", "Bean Fruit 2", "Bean Fruit 3", "Bean Fruit 4", "Bean Fruit 5", "Bean Fruit 6", "Bean Fruit 7"},
"Neon Egg": { "Blue Neon Egg", "Red Neon Egg", "Green Neon Egg", "Yellow Neon Egg", "Purple Neon Egg", "Orange Neon Egg", "Azure Neon Egg"},
"Chuckola Fruit": { "Red Chuckola Fruit", "Purple Chuckola Fruit", "White Chuckola Fruit"}
}

item_table: typing.Dict[str, ItemData] = {item.itemName: item for item in itemList}
items_by_id: typing.Dict[int, ItemData] = {item.code: item for item in itemList}
10 changes: 5 additions & 5 deletions worlds/mlss/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ class MLSSLocation(Location):
LocationData("Hoohoo Village North Cave Room 1 Coin Block", 0x39DAA0, 0),
LocationData("Hoohoo Village South Cave Coin Block 1", 0x39DAC5, 0),
LocationData("Hoohoo Village South Cave Coin Block 2", 0x39DAD5, 0),
LocationData("Hoohoo Mountain Base Boo Statue Cave Coin Block 1", 0x39DAE2, 0),
LocationData("Hoohoo Mountain Base Boo Statue Cave Coin Block 2", 0x39DAF2, 0),
LocationData("Hoohoo Mountain Base Boo Statue Cave Coin Block 3", 0x39DAFA, 0),
LocationData("Hoohoo Mountain Base Boostatue Cave Coin Block 1", 0x39DAE2, 0),
LocationData("Hoohoo Mountain Base Boostatue Cave Coin Block 2", 0x39DAF2, 0),
LocationData("Hoohoo Mountain Base Boostatue Cave Coin Block 3", 0x39DAFA, 0),
LocationData("Beanbean Outskirts NW Coin Block", 0x39DB8F, 0),
LocationData("Beanbean Outskirts S Room 1 Coin Block", 0x39DC18, 0),
LocationData("Beanbean Outskirts S Room 2 Coin Block", 0x39DC3D, 0),
Expand Down Expand Up @@ -298,7 +298,7 @@ class MLSSLocation(Location):
LocationData("Beanbean Outskirts Before Harhall Digspot 1", 0x39E951, 0),
LocationData("Beanbean Outskirts Before Harhall Digspot 2", 0x39E959, 0),
LocationData("Beanstar Piece Harhall", 0x1E9441, 2),
LocationData("Beanbean Outskirts Boo Statue Mole", 0x1E9434, 2),
LocationData("Beanbean Outskirts Boostatue Mole", 0x1E9434, 2),
LocationData("Harhall's Pants", 0x1E9444, 2),
LocationData("Beanbean Outskirts S Room 2 Digspot 1", 0x39DC65, 0),
LocationData("Beanbean Outskirts S Room 2 Digspot 2", 0x39DC5D, 0),
Expand Down Expand Up @@ -786,7 +786,7 @@ class MLSSLocation(Location):
(0x4373, 0x10, 0x277A45), # Teehee Valley Mole
(0x434D, 0x8, 0x1E9444), # Harhall's Pants
(0x432E, 0x10, 0x1E9441), # Harhall Beanstar Piece
(0x434B, 0x8, 0x1E9434), # Outskirts Boo Statue Mole
(0x434B, 0x8, 0x1E9434), # Outskirts Boostatue Mole
(0x42FE, 0x2, 0x1E943E), # Red Goblet
(0x42FE, 0x4, 0x24E628), # Green Goblet
(0x4301, 0x10, 0x250621), # Red Chuckola Fruit
Expand Down
8 changes: 4 additions & 4 deletions worlds/mlss/Names/LocationName.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class LocationName:
HoohooMountainBaseBoostatueRoomDigspot1 = "Hoohoo Mountain Base Boostatue Room Digspot 1"
HoohooMountainBaseBoostatueRoomDigspot2 = "Hoohoo Mountain Base Boostatue Room Digspot 2"
HoohooMountainBaseBoostatueRoomDigspot3 = "Hoohoo Mountain Base Boostatue Room Digspot 3"
BeanbeanOutskirtsBooStatueMole = "Beanbean Outskirts Boo Statue Mole"
BeanbeanOutskirtsBooStatueMole = "Beanbean Outskirts Boostatue Mole"
HoohooMountainBaseGrassyAreaBlock1 = "Hoohoo Mountain Base Grassy Area Block 1"
HoohooMountainBaseGrassyAreaBlock2 = "Hoohoo Mountain Base Grassy Area Block 2"
HoohooMountainBaseGuffawhaRuinsEntranceDigspot = "Hoohoo Mountain Base Guffawha Ruins Entrance Digspot"
Expand Down Expand Up @@ -533,9 +533,9 @@ class LocationName:
BadgeShopMomPiranhaFlag2 = "Badge Shop Mom Piranha Flag 2"
BadgeShopMomPiranhaFlag3 = "Badge Shop Mom Piranha Flag 3"
HarhallsPants = "Harhall's Pants"
HoohooMountainBaseBooStatueCaveCoinBlock1 = "Hoohoo Mountain Base Boo Statue Cave Coin Block 1"
HoohooMountainBaseBooStatueCaveCoinBlock2 = "Hoohoo Mountain Base Boo Statue Cave Coin Block 2"
HoohooMountainBaseBooStatueCaveCoinBlock3 = "Hoohoo Mountain Base Boo Statue Cave Coin Block 3"
HoohooMountainBaseBooStatueCaveCoinBlock1 = "Hoohoo Mountain Base Boostatue Cave Coin Block 1"
HoohooMountainBaseBooStatueCaveCoinBlock2 = "Hoohoo Mountain Base Boostatue Cave Coin Block 2"
HoohooMountainBaseBooStatueCaveCoinBlock3 = "Hoohoo Mountain Base Boostatue Cave Coin Block 3"
BeanbeanOutskirtsNWCoinBlock = "Beanbean Outskirts NW Coin Block"
BeanbeanOutskirtsSRoom1CoinBlock = "Beanbean Outskirts S Room 1 Coin Block"
BeanbeanOutskirtsSRoom2CoinBlock = "Beanbean Outskirts S Room 2 Coin Block"
Expand Down
2 changes: 1 addition & 1 deletion worlds/mlss/Rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def enemy_randomize(caller: APProcedurePatch, rom: bytes):
stream.seek(pos)
temp = stream.read(1)
stream.seek(pos)
stream.write(bytes([temp[0] | 0x8]))
stream.write(bytes([temp[0] | 0x80]))
stream.seek(pos + 1)
stream.write(groups.pop())

Expand Down
2 changes: 1 addition & 1 deletion worlds/mlss/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def set_rules(world: "MLSSWorld", excluded):
if "Badge" in location.name or "Pants" in location.name:
add_rule(
world.get_location(location.name),
lambda state: StateLogic.brooch(state, world.player) or StateLogic.rose(state, world.player),
lambda state: (StateLogic.brooch(state, world.player) and StateLogic.fruits(state, world.player)) or StateLogic.rose(state, world.player),
)
if location.itemType != 0 and location.name not in excluded:
if "Bowser" in location.name and world.options.castle_skip:
Expand Down
4 changes: 2 additions & 2 deletions worlds/mlss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Set, Dict, Any
from .Locations import all_locations, location_table, bowsers, bowsersMini, hidden, coins
from .Options import MLSSOptions
from .Items import MLSSItem, itemList, item_frequencies, item_table
from .Items import MLSSItem, itemList, item_frequencies, item_table, mlss_item_name_groups
from .Names.LocationName import LocationName
from .Client import MLSSClient
from .Regions import create_regions, connect_regions
Expand Down Expand Up @@ -53,9 +53,9 @@ class MLSSWorld(World):
options_dataclass = MLSSOptions
options: MLSSOptions
settings: typing.ClassVar[MLSSSettings]
item_name_groups = mlss_item_name_groups
item_name_to_id = {name: data.code for name, data in item_table.items()}
location_name_to_id = {loc_data.name: loc_data.id for loc_data in all_locations}
required_client_version = (0, 5, 0)

disabled_locations: Set[str]

Expand Down

0 comments on commit 9973678

Please sign in to comment.