Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 55 additions & 14 deletions worlds/okamihd/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def create_static_precollected_item_list(world: "OkamiWorld") -> List[Item]:
return precollected_items



brush_techniques_items = {
# Brush Techniques — item codes = 0x100 + game bitfield index (from BrushOverlay enum)
BrushTechniques.GREENSPROUT_BLOOM.value: ItemData(0x104, ItemClassification.progression), # bit 4
Expand Down Expand Up @@ -117,13 +116,13 @@ def create_static_precollected_item_list(world: "OkamiWorld") -> List[Item]:

quest_items = {
# Quest Items
"Canine Tracker": ItemData(0x42, ItemClassification.progression,count_in_pool=0),
"Canine Tracker": ItemData(0x42, ItemClassification.progression, count_in_pool=0),
"Lucky Mallet": ItemData(0x43, ItemClassification.progression),
"Border Key": ItemData(0x44, ItemClassification.progression,count_in_pool=0),
"Dragon Orb": ItemData(0x45, ItemClassification.progression,count_in_pool=0),
"Fox Rods": ItemData(0x46, ItemClassification.progression,count_in_pool=0),
"Border Key": ItemData(0x44, ItemClassification.progression, count_in_pool=0),
"Dragon Orb": ItemData(0x45, ItemClassification.progression, count_in_pool=0),
"Fox Rods": ItemData(0x46, ItemClassification.progression, count_in_pool=0),
"Thunder Brew": ItemData(0x47, ItemClassification.progression),
"Shell Amulet": ItemData(0x48, ItemClassification.progression,count_in_pool=0),
"Shell Amulet": ItemData(0x48, ItemClassification.progression, count_in_pool=0),

"Mask": ItemData(0x49, ItemClassification.progression),
"Golden Mushroom": ItemData(0x5f, ItemClassification.progression),
Expand All @@ -132,7 +131,7 @@ def create_static_precollected_item_list(world: "OkamiWorld") -> List[Item]:
"Sewaprolo": ItemData(0x63, ItemClassification.progression),
"Charcoal": ItemData(0x71, ItemClassification.progression),
"Blinding Snow": ItemData(0x72, ItemClassification.progression),
"Treasure Box": ItemData(0x73, ItemClassification.progression,count_in_pool=0),
"Treasure Box": ItemData(0x73, ItemClassification.progression, count_in_pool=0),
"Herbal Medicine": ItemData(0x75, ItemClassification.progression),
"Pinwheel": ItemData(0x76, ItemClassification.progression),
"Marlin Rod": ItemData(0x77, ItemClassification.progression),
Expand All @@ -152,16 +151,20 @@ def create_static_precollected_item_list(world: "OkamiWorld") -> List[Item]:
}
useful_items = {
# Useful items - Counts here are invalid, it's intended, to not fille the item pool with these
"Sun Fragment": ItemData(0x05, ItemClassification.useful,count_in_pool=9), # Should be 15
"Astral Pouch": ItemData(0x06, ItemClassification.useful,count_in_pool=0),# Intended
"Stray Bead": ItemData(0xCC, ItemClassification.useful,count_in_pool=0),# Should be 99, set to 0 for now cause they mess with container collection states
"Sun Fragment": ItemData(0x05, ItemClassification.useful, count_in_pool=9), # Should be 15
"Astral Pouch": ItemData(0x06, ItemClassification.useful, count_in_pool=0), # Intended
"Stray Bead": ItemData(0xCC, ItemClassification.useful, count_in_pool=0),
# Should be 99, set to 0 for now cause they mess with container collection states
# probably will have to be changed to progession_skip balancing once DF shops get randomized
"Demon Fang": ItemData(0x1F, ItemClassification.useful, count_in_pool=0), # to see when DF shops get randomized
# Technically a filler item, but useful feels more appropriate. Warping with those without Fountain will probably be out of logic.
"Mermaid Coin": ItemData(0x0e, ItemClassification.useful,count_in_pool=5),#Accurate count, kept it since it isn't too much
"Golden Peach": ItemData(0x0f, ItemClassification.useful,count_in_pool=10), # 14 in total... Probably not useful to have THAT many?,
"Gold Dust": ItemData(0x9e, ItemClassification.useful,count_in_pool=11), # 15 if we count the ones sold by merchants, which we may randomize, only 1 in a chest if we don't count those...
"Praise": ItemData(0x59,ItemClassification.useful,count_in_pool=0) #Here for testing for now; Doesn't work
"Mermaid Coin": ItemData(0x0e, ItemClassification.useful, count_in_pool=5),
# Accurate count, kept it since it isn't too much
"Golden Peach": ItemData(0x0f, ItemClassification.useful, count_in_pool=10),
# 14 in total... Probably not useful to have THAT many?,
"Gold Dust": ItemData(0x9e, ItemClassification.useful, count_in_pool=11),
# 15 if we count the ones sold by merchants, which we may randomize, only 1 in a chest if we don't count those...
"Praise": ItemData(0x59, ItemClassification.useful, count_in_pool=0) # Here for testing for now; Doesn't work
}

filler_items = {
Expand Down Expand Up @@ -276,6 +279,42 @@ def create_static_precollected_item_list(world: "OkamiWorld") -> List[Item]:
"Karmic Transformer 9": ItemData(0x7c, ItemClassification.useful, count_in_pool=0)
}

mist_warp_unlocks = {
# MIST WARPS POINTS
"Mist Warp Unlock - Kamiki Village": ItemData(0x500, ItemClassification.progression),
"Mist Warp Unlock - Shinshu Field": ItemData(0x501, ItemClassification.progression),
"Mist Warp Unlock - Cursed Agata Forest": ItemData(0x502, ItemClassification.progression),
"Mist Warp Unlock - Cursed Taka Pass": ItemData(0x503, ItemClassification.progression),
"Mist Warp Unlock - Kusa Village": ItemData(0x504, ItemClassification.progression),
"Mist Warp Unlock - Sasa Sanctuary": ItemData(0x505, ItemClassification.progression),
"Mist Warp Unlock - City Checkpoint": ItemData(0x506, ItemClassification.progression),
"Mist Warp Unlock - Cursed Ryoshima Coast": ItemData(0x507, ItemClassification.progression),
"Mist Warp Unlock - North Ryoshima Coast": ItemData(0x508, ItemClassification.progression),
"Mist Warp Unlock - North Ryoshima Coast (Rocky Area)": ItemData(0x509, ItemClassification.progression),
"Mist Warp Unlock - Dragon Palace": ItemData(0x50A, ItemClassification.progression),
## ARC 3 WARPS
# "Mist Warp Unlock - Kamui": ItemData(0x50B, ItemClassification.progression),
# "Mist Warp Unlock - Wep'keer": ItemData(0x50C, ItemClassification.progression),
# "Mist Warp Unlock - Inner Yoshpet": ItemData(0x50D, ItemClassification.progression),
# "Mist Warp Unlock - Kamui(Ezofuji - Rocky Area)": ItemData(0x50E, ItemClassification.progression),

}
mermaid_spring_unlocks = {

# MERMAID SPRINGS
"Mermaid Sping Unlock - Shinshu Field": ItemData(0x510, ItemClassification.progression),
"Mermaid Sping Unlock - Agata Forest": ItemData(0x511, ItemClassification.progression),
"Mermaid Sping Unlock - Taka Pass": ItemData(0x512, ItemClassification.progression),
"Mermaid Sping Unlock - Sasa Sanctuary": ItemData(0x513, ItemClassification.progression),
"Mermaid Sping Unlock - Ryoshima Coast": ItemData(0x514, ItemClassification.progression),
"Mermaid Sping Unlock - Sei-an City": ItemData(0x515, ItemClassification.progression),
"Mermaid Sping Unlock - Northen Ryoshima Coast": ItemData(0x516, ItemClassification.progression),
"Mermaid Sping Unlock - Catcall Tower": ItemData(0x517, ItemClassification.progression),
"Mermaid Sping Unlock - Dragon Palace": ItemData(0x518, ItemClassification.progression),
## ARC 3 SPRINGS
# "Mermaid Sping Unlock - Kamui": ItemData(0x519, ItemClassification.progression),
}

item_table = {
**brush_techniques_items,
**equips,
Expand All @@ -288,6 +327,8 @@ def create_static_precollected_item_list(world: "OkamiWorld") -> List[Item]:
**weapons_items,
**progressive_weapons,
**karmic_transformers,
**mist_warp_unlocks,
**mermaid_spring_unlocks
}
junk_weights = {
# TODO: Junk items weight - Based of the number of times it appears in chests in vanilla
Expand Down
25 changes: 16 additions & 9 deletions worlds/okamihd/RegionsData/r102.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import TYPE_CHECKING

from BaseClasses import LocationProgressType
from rule_builder.rules import True_
from rule_builder.rules import True_, Has
from ..CheckIds import brush_check_id, collected_object_check_id, container_check_id, shop_check_id
from ..Enums.BrushTechniques import BrushTechniques
from ..Enums.LocationType import LocationType
Expand All @@ -16,20 +16,23 @@

exits = {
RegionNames.STONE_KAMIKI: [
ExitData(RegionNames.KAMIKI_VILLAGE, required_items_events=["Kamiki Village - Fight with Mr.Orange"], one_way=True)],
ExitData(RegionNames.KAMIKI_VILLAGE, required_items_events=["Kamiki Village - Fight with Mr.Orange"],
one_way=True)],
RegionNames.KAMIKI_VILLAGE: [ExitData(RegionNames.KAMIKI_ISLANDS, needs_long_swim=True, loading_screen=False),
ExitData(RegionNames.SUSANOS_HOUSE),
ExitData(RegionNames.KUSHIS_HOUSE),
ExitData(RegionNames.ORANGES_HOUSE),
ExitData(RegionNames.RIVER_OF_THE_HEAVENS_KAMIKI),
ExitData(RegionNames.CURSED_SHINSHU_FIELD,
required_items_events=["Kamiki Village - Help Susano Train/Break the boulder"]),
required_items_events=[
"Kamiki Village - Help Susano Train/Break the boulder"]),
ExitData(RegionNames.SHINSHU_FIELD,
required_items_events=["Kamiki Village - Help Susano Train/Break the boulder",
"Shinshu Field - Restore Guardian Sapling"]),
"Shinshu Field - Restore Guardian Sapling"]),
# One way bc this is not a logical access.
ExitData(RegionNames.KAMIKI_MERCHANT,
required_items_events=["Kamiki Village - Help Susano Train/Break the boulder"],
required_items_events=[
"Kamiki Village - Help Susano Train/Break the boulder"],
one_way=True, loading_screen=False)],
RegionNames.SUSANOS_HOUSE: [ExitData(RegionNames.SUSANOS_UNDERGROUD)]
}
Expand Down Expand Up @@ -77,7 +80,8 @@
}
locations = {
RegionNames.STONE_KAMIKI: {
"Kamiki Village - Sunrise": LocData(brush_check_id(27), type=LocationType.CONSTELLATION,progress_type=LocationProgressType.EXCLUDED),
"Kamiki Village - Sunrise": LocData(brush_check_id(27), type=LocationType.CONSTELLATION,
progress_type=LocationProgressType.EXCLUDED),
# Brush acquisition (bit 27)
},
RegionNames.KAMIKI_VILLAGE: {
Expand All @@ -96,7 +100,9 @@
container_check_id(MapIds.KAMIKI_VILLAGE, 32), type=LocationType.UNDERWATER_CHEST), # spawn_idx=32, Vase
"Kamiki Village - Hasugami": LocData(brush_check_id(5),
required_items_events=["Kamiki Village - Restore Sakuya's Tree"],
type=LocationType.CONSTELLATION,progress_type=LocationProgressType.EXCLUDED), # Brush acquisition (Waterlily)
type=LocationType.CONSTELLATION,
progress_type=LocationProgressType.EXCLUDED),
# Brush acquisition (Waterlily)
"Kamiki Village - Buried chest in field": LocData(container_check_id(MapIds.KAMIKI_VILLAGE, 13),
type=LocationType.BURIED_CHEST),
# spawn_idx=13, Dragonfly Bead
Expand Down Expand Up @@ -126,7 +132,8 @@
# Kushi's Gift is not a container - it's an event/NPC reward. Keep old ID for now.
"Kamiki Village - Kushi's Gift": LocData(collected_object_check_id(MapIndexes.KAMIKI_VILLAGE, 11),
# mapId=3 (KamikiVillage enum index)
required_items_events=["Kamiki Village - Repair Kushi's Watermill"],progress_type=LocationProgressType.EXCLUDED),
required_items_events=["Kamiki Village - Repair Kushi's Watermill"],
progress_type=LocationProgressType.EXCLUDED),
},
RegionNames.KAMIKI_ISLANDS: {
"Kamiki Village - East Islands Sun fragment chest": LocData(container_check_id(MapIds.KAMIKI_VILLAGE, 42)),
Expand Down Expand Up @@ -160,6 +167,6 @@

warps = {
RegionNames.STONE_KAMIKI: [
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=True_, trigger_warp_from=True_)
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=Has("Mist Warp Unlock - Kamiki Village"), trigger_warp_from=True_)
]
}
2 changes: 1 addition & 1 deletion worlds/okamihd/RegionsData/r105.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@

warps = {
RegionNames.CITY_CHECKPOINT_TAKA: [
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=True_, trigger_warp_from=True_)
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=Has("Mist Warp Unlock - City Checkpoint"), trigger_warp_from=True_)
]
}
4 changes: 2 additions & 2 deletions worlds/okamihd/RegionsData/r108.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import TYPE_CHECKING

from BaseClasses import LocationProgressType
from rule_builder.rules import True_
from rule_builder.rules import True_, Has
from ..CheckIds import container_check_id, shop_check_id
from ..Enums.BrushTechniques import BrushTechniques
from ..Enums.LocationType import LocationType
Expand Down Expand Up @@ -119,6 +119,6 @@

warps = {
RegionNames.KUSA_VILLAGE: [
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=True_, trigger_warp_from=True_)
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=Has("Mist Warp Unlock - Kusa Village"), trigger_warp_from=True_)
]
}
4 changes: 2 additions & 2 deletions worlds/okamihd/RegionsData/r109.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@

warps={
RegionNames.SASA_SANCTUARY:[
WarpData(type=WarpType.MERMAID_SPRING, trigger_warp_to=Has( "Sasa Sanctuary - Dig with Mr. Bamboo."), trigger_warp_from=Has( "Sasa Sanctuary - Dig with Mr. Bamboo."))
WarpData(type=WarpType.MERMAID_SPRING, trigger_warp_to=Has("Mermaid Sping Unlock - Sasa Sanctuary"), trigger_warp_from=Has( "Sasa Sanctuary - Dig with Mr. Bamboo."))
],
RegionNames.SASA_SANCTUARY_ENTRANCE:[
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=True_, trigger_warp_from=True_),
WarpData(type=WarpType.MIST_WARP, trigger_warp_to=Has("Mist Warp Unlock - Sasa Sanctuary"), trigger_warp_from=True_),
]
}
2 changes: 1 addition & 1 deletion worlds/okamihd/RegionsData/r200.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
}
warps = {
RegionNames.SEIAN_CITY_ARISTOCRATIC: [
WarpData(WarpType.MERMAID_SPRING, Has("Imperial Palace - Defeat Blight"),
WarpData(WarpType.MERMAID_SPRING, Has("Mermaid Sping Unlock - Sei-an City"),
Has("Imperial Palace - Defeat Blight"))
]
}
13 changes: 9 additions & 4 deletions worlds/okamihd/RegionsData/r203.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import TYPE_CHECKING

from BaseClasses import LocationProgressType
from rule_builder.rules import Has
from rule_builder.rules import Has, True_
from ..CheckIds import container_check_id, shop_check_id, brush_check_id
from ..Enums.BrushTechniques import BrushTechniques
from ..Enums.LocationType import LocationType
Expand All @@ -18,7 +18,8 @@
required_items_events=["Dragon Palace - Get Shell Amulet from Otohime"]),
ExitData(RegionNames.DRAGON_PALACE_GARDEN, one_way=True,
required_items_events=["Dragon Palace - Get Shell Amulet from Otohime"]),
ExitData(RegionNames.DRAGON_PALACE_CAVE, required_items_events=["Dragon Palace - Open Treasure Cave behind stairs"])
ExitData(RegionNames.DRAGON_PALACE_CAVE,
required_items_events=["Dragon Palace - Open Treasure Cave behind stairs"])
],
RegionNames.DRAGON_PALACE_SPRING: [
ExitData(RegionNames.DRAGON_PALACE, one_way=True)
Expand All @@ -34,7 +35,8 @@
# FIXME: This should give shell amulet, and it should be removed from pool since it can't be picked up rn
# FIXME: Change this to a location later
"Dragon Palace - Get Shell Amulet from Otohime": EventData(),
"Dragon Palace - Give Dragon Orb to Otohime": EventData(required_items_events=["Inside the dragon - Get Dragon Orb"])
"Dragon Palace - Give Dragon Orb to Otohime": EventData(
required_items_events=["Inside the dragon - Get Dragon Orb"])
},
RegionNames.DRAGON_PALACE_SPRING: {
"Dragon Palace - Restore the soothing spring": EventData(type=LocationType.DIGGING_MINIGAME_HARD,
Expand Down Expand Up @@ -87,7 +89,10 @@
}
warps = {
RegionNames.DRAGON_PALACE_SPRING: [
WarpData(WarpType.MERMAID_SPRING, Has("Dragon Palace - Restore the soothing spring"),
WarpData(WarpType.MERMAID_SPRING, Has("Mermaid Sping Unlock - Dragon Palace"),
Has("Dragon Palace - Restore the soothing spring"))
],
RegionNames.DRAGON_PALACE: [
WarpData(WarpType.MIST_WARP, Has("Mist Warp Unlock - Dragon Palace"), True_)
]
}
2 changes: 1 addition & 1 deletion worlds/okamihd/RegionsData/r20a.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
}
warps = {
RegionNames.CATCALL_TOWER_TOP: [
WarpData(WarpType.MERMAID_SPRING, Has("Catcall Tower - Unlock warp"), Has("Catcall Tower - Unlock warp"))
WarpData(WarpType.MERMAID_SPRING, Has("Mermaid Sping Unlock - Catcall Tower"), Has("Catcall Tower - Unlock warp"))
]
}
Loading
Loading