Files
Archipelago/worlds/jakanddaxter/Items.py
massimilianodelliubaldini 1c42bdb353 Move Randomizer (#26)
* Finally remove debug-segment text, update Python imports to relative paths.

* HUGE refactor to Regions/Rules to support move rando, first hub area coded.

* More refactoring.

* Another refactor - may squash.

* Fix some Rules, reuse some code by returning key regions from build_regions.

* More regions added. A couple of TODOs.

* Fixed trade logic, added LPC regions.

* Added Spider, Snowy, Boggy. Fixed Misty's orbs.

* Fix circular import, assert orb counts per level, fix a few naming errors.

* Citadel added, missing locs and connections fixed. First move rando seed generated.

* Add Move Rando to Options class.

* Fixed rules for prerequisite moves.

* Implement client functionality for move rando, add blurbs to game info page.

* Fix wrong address for cache checks.

* Fix byte alignment of offsets, refactor read_memory for better code reuse.

* Refactor memory offsets and add some unit tests.

* Make green eco the filler item, also define a maximum ID. Fix Boggy tether locations.
2024-06-27 10:12:48 -04:00

93 lines
3.8 KiB
Python

from BaseClasses import Item
from .GameID import jak1_name, jak1_max
from .locs import (OrbLocations as Orbs,
CellLocations as Cells,
ScoutLocations as Scouts,
SpecialLocations as Specials,
OrbCacheLocations as Caches)
class JakAndDaxterItem(Item):
game: str = jak1_name
# Power Cells are generic, fungible, interchangeable items. Every cell is indistinguishable from every other.
cell_item_table = {
0: "Power Cell",
}
# Scout flies are interchangeable within their respective sets of 7. Notice the abbreviated level name after each item.
# Also, notice that their Item ID equals their respective Power Cell's Location ID. This is necessary for
# game<->archipelago communication.
scout_item_table = {
95: "Scout Fly - GR",
75: "Scout Fly - SV",
7: "Scout Fly - FJ",
20: "Scout Fly - SB",
28: "Scout Fly - MI",
68: "Scout Fly - FC",
76: "Scout Fly - RV",
57: "Scout Fly - PB",
49: "Scout Fly - LPC",
43: "Scout Fly - BS",
88: "Scout Fly - MP",
77: "Scout Fly - VC",
85: "Scout Fly - SC",
65: "Scout Fly - SM",
90: "Scout Fly - LT",
91: "Scout Fly - GMC",
}
# Orbs are also generic and interchangeable.
orb_item_table = {
1: "Precursor Orb",
}
# These are special items representing unique unlocks in the world. Notice that their Item ID equals their
# respective Location ID. Like scout flies, this is necessary for game<->archipelago communication.
# TODO - These numbers of checks may be inaccurate post-region refactor.
special_item_table = {
5: "Fisherman's Boat", # Unlocks 14 checks in Misty Island
4: "Jungle Elevator", # Unlocks 2 checks in Forbidden Jungle
2: "Blue Eco Switch", # Unlocks 1 check in Jungle and 1 in Beach
17: "Flut Flut", # Unlocks 2 checks in Swamp and 2 in Snowy
33: "Warrior's Pontoons", # Unlocks 14 checks in Swamp and everything post-Rock Village
105: "Snowy Mountain Gondola", # Unlocks 15 checks in Snowy Mountain
60: "Yellow Eco Switch", # Unlocks 1 check in Pass and 1 in Snowy
63: "Snowy Fort Gate", # Unlocks 3 checks in Snowy Mountain
71: "Freed The Blue Sage", # 1 of 3 unlocks for the final staircase and 2 checks in Citadel
72: "Freed The Red Sage", # 1 of 3 unlocks for the final staircase and 2 checks in Citadel
73: "Freed The Yellow Sage", # 1 of 3 unlocks for the final staircase and 2 checks in Citadel
70: "Freed The Green Sage", # Unlocks the final elevator
}
# These are the move items for move randomizer. Notice that their Item ID equals some of the Orb Cache Location ID's.
# This was 100% arbitrary. There's no reason to tie moves to orb caches except that I need a place to put them. ;_;
move_item_table = {
10344: "Crouch",
10369: "Crouch Jump",
11072: "Crouch Uppercut",
12634: "Roll",
12635: "Roll Jump",
10945: "Double Jump",
14507: "Jump Dive",
14838: "Jump Kick",
23348: "Punch",
23349: "Punch Uppercut",
23350: "Kick",
# 24038: "Orb Cache at End of Blast Furnace", # TODO - IDK, we didn't need all of the orb caches for move rando.
# 24039: "Orb Cache at End of Launch Pad Room",
# 24040: "Orb Cache at Start of Launch Pad Room",
}
# All Items
# While we're here, do all the ID conversions needed.
item_table = {
**{Cells.to_ap_id(k): cell_item_table[k] for k in cell_item_table},
**{Scouts.to_ap_id(k): scout_item_table[k] for k in scout_item_table},
**{Orbs.to_ap_id(k): orb_item_table[k] for k in orb_item_table},
**{Specials.to_ap_id(k): special_item_table[k] for k in special_item_table},
**{Caches.to_ap_id(k): move_item_table[k] for k in move_item_table},
jak1_max: "Green Eco Pill" # Filler item.
}