* Add the cotm package with working seed playthrough generation. * Add the proper event flag IDs for the Item codes. * Oooops. Put the world completion condition in! * Adjust the game name and abbreviations. * Implement more settings. * Account for too many start_inventory_from_pool cards with Halve DSS Cards Placed. * Working (albeit very sloooooooooooow) ROM patching. * Screw you, bsdiff! AP Procedure Patch for life! * Nuke stage_assert_generate as the ROM is no longer needed for that. * Working item writing and position adjusting. * Fix the magic item graphics in Locations wherein they can be fixed. * Enable sub-weapon shuffle * Get the seed display working. * Get the enemy item drop randomization working. Phew! * Enemy drop rando and seed display fixes. * Functional Countdown + Early Double setting * Working multiworld (yay!) * Fix item links and demo shenanigans. * Add Wii U VC hash and a docs section explaining the rereleases. * Change all client read/writes to EWRAM instead of Combined WRAM. * Custom text insertion foundations. * Working text converter and word wrap detector. * More refinements to the text wrap system. * Well and truly working sent/received messages. * Add DeathLink and Battle Arena goal options. * Add tracker stuff, unittests, all locations countdown, presets. * Add to README, CODEOWNERS, and inno_setup * Add to README, CODEOWNERS, and inno_setup * Address some suggestions/problems. * Switch the Items and Locations to using dataclasses. * Add note about the alternate classes to the Game Page. * Oooops, typo! * Touch up the Options descriptions. * Fix Battle Arena flag being detected incorrectly on connection and name the locked location/item pairs better. * Implement option groups * Swap the Lizard-man Locations into their correct Regions. * Local start inventory, better DeathLink message handling, handle receiving over 255 of an item. * Update the PopTracker pack links to no longer point to the Releases page. * Add Skip Dialogues option. * Update the presets for the accessibility rework. * Swap the choices in the accessibility preset options. * Uhhhhhhh...just see the apworld v4 changelog for this one. * Ooops, typo! * . * Bunch of small stuff * Correctly change "Fake" to "Breakable" in this comment. Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * Make can_touch_water one line. Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * Make broke_iron_maidens one line. Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * Fix majors countdown and make can_open_ceremonial_door one line. * Make the Trap AP Item less obvious. * Add Progression + Useful stuff, patcher handling for incompatible versions, and fix some mypy stuff. * Better option groups. * Change Early Double to Early Escape Item. * Update DeathLink description and ditch the Menu region. * Fix the Start Broken choice for Iron Maiden Behavior * Remove the forced option change with Arena goal + required All Bosses and Arena. * Update the Game Page with the removal of the forced option combination change. * Fix client potential to send packets nonstop. * More review addressing. * Fix the new select_drop code. * Fix the new select_drop code for REAL this time. * Send another LocationScout if we send Location checks without having the Location info. --------- Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Co-authored-by: Exempt-Medic <ExemptMedic@Gmail.com> Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
		
			
				
	
	
		
			190 lines
		
	
	
		
			9.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			190 lines
		
	
	
		
			9.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
from .data import lname
 | 
						|
from typing import Dict, List, Optional, TypedDict, Union
 | 
						|
 | 
						|
 | 
						|
class RegionInfo(TypedDict, total=False):
 | 
						|
    locations: List[str]
 | 
						|
    entrances: Dict[str, str]
 | 
						|
 | 
						|
 | 
						|
# # #    KEY    # # #
 | 
						|
# "locations" = A list of the Locations to add to that Region when adding said Region.
 | 
						|
# "entrances" = A dict of the connecting Regions to the Entrances' names to add to that Region when adding said Region.
 | 
						|
cvcotm_region_info: Dict[str, RegionInfo] = {
 | 
						|
    "Catacomb": {"locations": [lname.sr3,
 | 
						|
                               lname.cc1,
 | 
						|
                               lname.cc3,
 | 
						|
                               lname.cc3b,
 | 
						|
                               lname.cc4,
 | 
						|
                               lname.cc5,
 | 
						|
                               lname.cc8,
 | 
						|
                               lname.cc8b,
 | 
						|
                               lname.cc9,
 | 
						|
                               lname.cc10,
 | 
						|
                               lname.cc13,
 | 
						|
                               lname.cc14,
 | 
						|
                               lname.cc14b,
 | 
						|
                               lname.cc16,
 | 
						|
                               lname.cc20,
 | 
						|
                               lname.cc22,
 | 
						|
                               lname.cc24,
 | 
						|
                               lname.cc25],
 | 
						|
                 "entrances": {"Abyss Stairway": "Catacomb to Stairway"}},
 | 
						|
 | 
						|
    "Abyss Stairway": {"locations": [lname.as2,
 | 
						|
                                     lname.as3],
 | 
						|
                       "entrances": {"Audience Room": "Stairway to Audience"}},
 | 
						|
 | 
						|
    "Audience Room": {"locations": [lname.as4,
 | 
						|
                                    lname.as9,
 | 
						|
                                    lname.ar4,
 | 
						|
                                    lname.ar7,
 | 
						|
                                    lname.ar8,
 | 
						|
                                    lname.ar9,
 | 
						|
                                    lname.ar10,
 | 
						|
                                    lname.ar11,
 | 
						|
                                    lname.ar14,
 | 
						|
                                    lname.ar14b,
 | 
						|
                                    lname.ar16,
 | 
						|
                                    lname.ar17,
 | 
						|
                                    lname.ar17b,
 | 
						|
                                    lname.ar18,
 | 
						|
                                    lname.ar19,
 | 
						|
                                    lname.ar21,
 | 
						|
                                    lname.ar25,
 | 
						|
                                    lname.ar26,
 | 
						|
                                    lname.ar27,
 | 
						|
                                    lname.ar30,
 | 
						|
                                    lname.ar30b,
 | 
						|
                                    lname.ow0,
 | 
						|
                                    lname.ow1,
 | 
						|
                                    lname.ow2,
 | 
						|
                                    lname.th1,
 | 
						|
                                    lname.th3],
 | 
						|
                      "entrances": {"Machine Tower Bottom": "Audience to Machine Bottom",
 | 
						|
                                    "Machine Tower Top": "Audience to Machine Top",
 | 
						|
                                    "Chapel Tower Bottom": "Audience to Chapel",
 | 
						|
                                    "Underground Gallery Lower": "Audience to Gallery",
 | 
						|
                                    "Underground Warehouse Start": "Audience to Warehouse",
 | 
						|
                                    "Underground Waterway Start": "Audience to Waterway",
 | 
						|
                                    "Observation Tower": "Audience to Observation",
 | 
						|
                                    "Ceremonial Room": "Ceremonial Door"}},
 | 
						|
 | 
						|
    "Machine Tower Bottom": {"locations": [lname.mt0,
 | 
						|
                                           lname.mt2,
 | 
						|
                                           lname.mt3,
 | 
						|
                                           lname.mt4,
 | 
						|
                                           lname.mt6,
 | 
						|
                                           lname.mt8,
 | 
						|
                                           lname.mt10,
 | 
						|
                                           lname.mt11],
 | 
						|
                             "entrances": {"Machine Tower Top": "Machine Bottom to Top"}},
 | 
						|
 | 
						|
    "Machine Tower Top": {"locations": [lname.mt13,
 | 
						|
                                        lname.mt14,
 | 
						|
                                        lname.mt17,
 | 
						|
                                        lname.mt19]},
 | 
						|
 | 
						|
    "Eternal Corridor Pit": {"locations": [lname.ec5],
 | 
						|
                             "entrances": {"Underground Gallery Upper": "Corridor to Gallery",
 | 
						|
                                           "Chapel Tower Bottom": "Escape the Gallery Pit"}},
 | 
						|
 | 
						|
    "Chapel Tower Bottom": {"locations": [lname.ec7,
 | 
						|
                                          lname.ec9,
 | 
						|
                                          lname.ct1,
 | 
						|
                                          lname.ct4,
 | 
						|
                                          lname.ct5,
 | 
						|
                                          lname.ct6,
 | 
						|
                                          lname.ct6b,
 | 
						|
                                          lname.ct8,
 | 
						|
                                          lname.ct10,
 | 
						|
                                          lname.ct13,
 | 
						|
                                          lname.ct15],
 | 
						|
                            "entrances": {"Eternal Corridor Pit": "Into the Corridor Pit",
 | 
						|
                                          "Underground Waterway End": "Dip Into Waterway End",
 | 
						|
                                          "Chapel Tower Top": "Climb to Chapel Top"}},
 | 
						|
 | 
						|
    "Chapel Tower Top": {"locations": [lname.ct16,
 | 
						|
                                       lname.ct18,
 | 
						|
                                       lname.ct21,
 | 
						|
                                       lname.ct22],
 | 
						|
                         "entrances": {"Battle Arena": "Arena Passage"}},
 | 
						|
 | 
						|
    "Battle Arena": {"locations": [lname.ct26,
 | 
						|
                                   lname.ct26b,
 | 
						|
                                   lname.ba24,
 | 
						|
                                   lname.arena_victory]},
 | 
						|
 | 
						|
    "Underground Gallery Upper": {"locations": [lname.ug0,
 | 
						|
                                                lname.ug1,
 | 
						|
                                                lname.ug2,
 | 
						|
                                                lname.ug3,
 | 
						|
                                                lname.ug3b],
 | 
						|
                                  "entrances": {"Eternal Corridor Pit": "Gallery to Corridor",
 | 
						|
                                                "Underground Gallery Lower": "Gallery Upper to Lower"}},
 | 
						|
 | 
						|
    "Underground Gallery Lower": {"locations": [lname.ug8,
 | 
						|
                                                lname.ug10,
 | 
						|
                                                lname.ug13,
 | 
						|
                                                lname.ug15,
 | 
						|
                                                lname.ug20],
 | 
						|
                                  "entrances": {"Underground Gallery Upper": "Gallery Lower to Upper"}},
 | 
						|
 | 
						|
    "Underground Warehouse Start": {"locations": [lname.uw1],
 | 
						|
                                    "entrances": {"Underground Warehouse Main": "Into Warehouse Main"}},
 | 
						|
 | 
						|
    "Underground Warehouse Main": {"locations": [lname.uw6,
 | 
						|
                                                 lname.uw8,
 | 
						|
                                                 lname.uw9,
 | 
						|
                                                 lname.uw10,
 | 
						|
                                                 lname.uw11,
 | 
						|
                                                 lname.uw14,
 | 
						|
                                                 lname.uw16,
 | 
						|
                                                 lname.uw16b,
 | 
						|
                                                 lname.uw19,
 | 
						|
                                                 lname.uw23,
 | 
						|
                                                 lname.uw24,
 | 
						|
                                                 lname.uw25]},
 | 
						|
 | 
						|
    "Underground Waterway Start": {"locations": [lname.uy1],
 | 
						|
                                   "entrances": {"Underground Waterway Main": "Into Waterway Main"}},
 | 
						|
 | 
						|
    "Underground Waterway Main": {"locations": [lname.uy3,
 | 
						|
                                                lname.uy3b,
 | 
						|
                                                lname.uy4,
 | 
						|
                                                lname.uy5,
 | 
						|
                                                lname.uy7,
 | 
						|
                                                lname.uy8,
 | 
						|
                                                lname.uy9,
 | 
						|
                                                lname.uy9b,
 | 
						|
                                                lname.uy12],
 | 
						|
                                  "entrances": {"Underground Waterway End": "Onward to Waterway End"}},
 | 
						|
 | 
						|
    "Underground Waterway End": {"locations": [lname.uy12b,
 | 
						|
                                               lname.uy13,
 | 
						|
                                               lname.uy17,
 | 
						|
                                               lname.uy18]},
 | 
						|
 | 
						|
    "Observation Tower": {"locations": [lname.ot1,
 | 
						|
                                        lname.ot2,
 | 
						|
                                        lname.ot3,
 | 
						|
                                        lname.ot5,
 | 
						|
                                        lname.ot8,
 | 
						|
                                        lname.ot9,
 | 
						|
                                        lname.ot12,
 | 
						|
                                        lname.ot13,
 | 
						|
                                        lname.ot16,
 | 
						|
                                        lname.ot20]},
 | 
						|
 | 
						|
    "Ceremonial Room": {"locations": [lname.cr1,
 | 
						|
                                      lname.dracula]},
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
def get_region_info(region: str, info: str) -> Optional[Union[List[str], Dict[str, str]]]:
 | 
						|
    return cvcotm_region_info[region].get(info, None)
 | 
						|
 | 
						|
 | 
						|
def get_all_region_names() -> List[str]:
 | 
						|
    return [reg_name for reg_name in cvcotm_region_info]
 |