From ed63daa452ef85ca84df2dac34fef5146efd11a8 Mon Sep 17 00:00:00 2001 From: gaithern Date: Fri, 2 Feb 2024 10:04:03 -0600 Subject: [PATCH 1/4] New EotW logic --- worlds/kh1/Client.py | 11 +++ worlds/kh1/Items.py | 202 ++++++++++++++++++++-------------------- worlds/kh1/Locations.py | 26 +++--- worlds/kh1/Options.py | 20 ++++ worlds/kh1/Regions.py | 26 +++--- worlds/kh1/Rules.py | 41 ++++---- worlds/kh1/__init__.py | 17 ++-- 7 files changed, 193 insertions(+), 150 deletions(-) diff --git a/worlds/kh1/Client.py b/worlds/kh1/Client.py index 0e8b2268a4c1..8cdfad1c4490 100644 --- a/worlds/kh1/Client.py +++ b/worlds/kh1/Client.py @@ -97,6 +97,8 @@ def on_package(self, cmd: str, args: dict): filename = f"send{ss}" with open(os.path.join(self.game_communication_path, filename), 'w') as f: f.close() + + #Handle Slot Data if "EXP Multiplier" in list(args['slot_data'].keys()): xp_mult = args['slot_data']["EXP Multiplier"] else: @@ -104,6 +106,15 @@ def on_package(self, cmd: str, args: dict): with open(os.path.join(self.game_communication_path, "xpmult.cfg"), 'w') as f: f.write(str(xp_mult)) f.close() + + if "Required Reports" in list(args['slot_data'].keys()): + reports_required = args['slot_data']["Required Reports"] + else: + reports_required = 4 + with open(os.path.join(self.game_communication_path, "required_reports.cfg"), 'w') as f: + f.write(str(reports_required)) + f.close() + #End Handle Slot Data if cmd in {"ReceivedItems"}: start_index = args["index"] diff --git a/worlds/kh1/Items.py b/worlds/kh1/Items.py index f2c6f4e416c8..7cbb68060fba 100644 --- a/worlds/kh1/Items.py +++ b/worlds/kh1/Items.py @@ -43,61 +43,61 @@ def get_items_by_category(category: str, disclude: list) -> Dict[str, KH1ItemDat #"Lightning Stone": KH1ItemData("Synthesis", code = 264_1014, classification = ItemClassification.filler, weight = 10), #"Dazzling Stone": KH1ItemData("Synthesis", code = 264_1015, classification = ItemClassification.filler, weight = 10), #"Stormy Stone": KH1ItemData("Synthesis", code = 264_1016, classification = ItemClassification.filler, weight = 10), - "Protect Chain": KH1ItemData("Accessory", code = 264_1017, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Protera Chain": KH1ItemData("Accessory", code = 264_1018, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Protega Chain": KH1ItemData("Accessory", code = 264_1019, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Fire Ring": KH1ItemData("Accessory", code = 264_1020, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Fira Ring": KH1ItemData("Accessory", code = 264_1021, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Firaga Ring": KH1ItemData("Accessory", code = 264_1022, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Blizzard Ring": KH1ItemData("Accessory", code = 264_1023, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Blizzara Ring": KH1ItemData("Accessory", code = 264_1024, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Blizzaga Ring": KH1ItemData("Accessory", code = 264_1025, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Thunder Ring": KH1ItemData("Accessory", code = 264_1026, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Thundara Ring": KH1ItemData("Accessory", code = 264_1027, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Thundaga Ring": KH1ItemData("Accessory", code = 264_1028, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ability Stud": KH1ItemData("Accessory", code = 264_1029, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Guard Earring": KH1ItemData("Accessory", code = 264_1030, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Master Earring": KH1ItemData("Accessory", code = 264_1031, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Chaos Ring": KH1ItemData("Accessory", code = 264_1032, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Dark Ring": KH1ItemData("Accessory", code = 264_1033, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Element Ring": KH1ItemData("Accessory", code = 264_1034, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Three Stars": KH1ItemData("Accessory", code = 264_1035, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Power Chain": KH1ItemData("Accessory", code = 264_1036, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Golem Chain": KH1ItemData("Accessory", code = 264_1037, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Titan Chain": KH1ItemData("Accessory", code = 264_1038, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Energy Bangle": KH1ItemData("Accessory", code = 264_1039, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Angel Bangle": KH1ItemData("Accessory", code = 264_1040, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Gaia Bangle": KH1ItemData("Accessory", code = 264_1041, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Magic Armlet": KH1ItemData("Accessory", code = 264_1042, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Rune Armlet": KH1ItemData("Accessory", code = 264_1043, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Atlas Armlet": KH1ItemData("Accessory", code = 264_1044, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Heartguard": KH1ItemData("Accessory", code = 264_1045, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ribbon": KH1ItemData("Accessory", code = 264_1046, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Crystal Crown": KH1ItemData("Accessory", code = 264_1047, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Brave Warrior": KH1ItemData("Accessory", code = 264_1048, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ifrit's Horn": KH1ItemData("Accessory", code = 264_1049, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Inferno Band": KH1ItemData("Accessory", code = 264_1050, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "White Fang": KH1ItemData("Accessory", code = 264_1051, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ray of Light": KH1ItemData("Accessory", code = 264_1052, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Holy Circlet": KH1ItemData("Accessory", code = 264_1053, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Raven's Claw": KH1ItemData("Accessory", code = 264_1054, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Omega Arts": KH1ItemData("Accessory", code = 264_1055, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "EXP Earring": KH1ItemData("Accessory", code = 264_1056, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - #"A41": KH1ItemData("Accessory", code = 264_1057, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "EXP Ring": KH1ItemData("Accessory", code = 264_1058, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "EXP Bracelet": KH1ItemData("Accessory", code = 264_1059, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "EXP Necklace": KH1ItemData("Accessory", code = 264_1060, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Firagun Band": KH1ItemData("Accessory", code = 264_1061, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Blizzagun Band": KH1ItemData("Accessory", code = 264_1062, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Thundagun Band": KH1ItemData("Accessory", code = 264_1063, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ifrit Belt": KH1ItemData("Accessory", code = 264_1064, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Shiva Belt": KH1ItemData("Accessory", code = 264_1065, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ramuh Belt": KH1ItemData("Accessory", code = 264_1066, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Moogle Badge": KH1ItemData("Accessory", code = 264_1067, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Cosmic Arts": KH1ItemData("Accessory", code = 264_1068, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Royal Crown": KH1ItemData("Accessory", code = 264_1069, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Prime Cap": KH1ItemData("Accessory", code = 264_1070, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Obsidian Ring": KH1ItemData("Accessory", code = 264_1071, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Protect Chain": KH1ItemData("Accessory", code = 264_1017, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Protera Chain": KH1ItemData("Accessory", code = 264_1018, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Protega Chain": KH1ItemData("Accessory", code = 264_1019, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Fire Ring": KH1ItemData("Accessory", code = 264_1020, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Fira Ring": KH1ItemData("Accessory", code = 264_1021, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Firaga Ring": KH1ItemData("Accessory", code = 264_1022, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Blizzard Ring": KH1ItemData("Accessory", code = 264_1023, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Blizzara Ring": KH1ItemData("Accessory", code = 264_1024, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Blizzaga Ring": KH1ItemData("Accessory", code = 264_1025, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Thunder Ring": KH1ItemData("Accessory", code = 264_1026, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Thundara Ring": KH1ItemData("Accessory", code = 264_1027, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Thundaga Ring": KH1ItemData("Accessory", code = 264_1028, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Ability Stud": KH1ItemData("Accessory", code = 264_1029, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Guard Earring": KH1ItemData("Accessory", code = 264_1030, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Master Earring": KH1ItemData("Accessory", code = 264_1031, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Chaos Ring": KH1ItemData("Accessory", code = 264_1032, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Dark Ring": KH1ItemData("Accessory", code = 264_1033, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Element Ring": KH1ItemData("Accessory", code = 264_1034, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Three Stars": KH1ItemData("Accessory", code = 264_1035, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Power Chain": KH1ItemData("Accessory", code = 264_1036, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Golem Chain": KH1ItemData("Accessory", code = 264_1037, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Titan Chain": KH1ItemData("Accessory", code = 264_1038, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Energy Bangle": KH1ItemData("Accessory", code = 264_1039, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Angel Bangle": KH1ItemData("Accessory", code = 264_1040, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Gaia Bangle": KH1ItemData("Accessory", code = 264_1041, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Magic Armlet": KH1ItemData("Accessory", code = 264_1042, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Rune Armlet": KH1ItemData("Accessory", code = 264_1043, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Atlas Armlet": KH1ItemData("Accessory", code = 264_1044, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Heartguard": KH1ItemData("Accessory", code = 264_1045, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Ribbon": KH1ItemData("Accessory", code = 264_1046, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Crystal Crown": KH1ItemData("Accessory", code = 264_1047, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Brave Warrior": KH1ItemData("Accessory", code = 264_1048, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Ifrit's Horn": KH1ItemData("Accessory", code = 264_1049, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Inferno Band": KH1ItemData("Accessory", code = 264_1050, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "White Fang": KH1ItemData("Accessory", code = 264_1051, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Ray of Light": KH1ItemData("Accessory", code = 264_1052, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Holy Circlet": KH1ItemData("Accessory", code = 264_1053, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Raven's Claw": KH1ItemData("Accessory", code = 264_1054, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Omega Arts": KH1ItemData("Accessory", code = 264_1055, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "EXP Earring": KH1ItemData("Accessory", code = 264_1056, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + #"A41": KH1ItemData("Accessory", code = 264_1057, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "EXP Ring": KH1ItemData("Accessory", code = 264_1058, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "EXP Bracelet": KH1ItemData("Accessory", code = 264_1059, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "EXP Necklace": KH1ItemData("Accessory", code = 264_1060, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Firagun Band": KH1ItemData("Accessory", code = 264_1061, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Blizzagun Band": KH1ItemData("Accessory", code = 264_1062, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Thundagun Band": KH1ItemData("Accessory", code = 264_1063, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Ifrit Belt": KH1ItemData("Accessory", code = 264_1064, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Shiva Belt": KH1ItemData("Accessory", code = 264_1065, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Ramuh Belt": KH1ItemData("Accessory", code = 264_1066, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Moogle Badge": KH1ItemData("Accessory", code = 264_1067, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Cosmic Arts": KH1ItemData("Accessory", code = 264_1068, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Royal Crown": KH1ItemData("Accessory", code = 264_1069, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Prime Cap": KH1ItemData("Accessory", code = 264_1070, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Obsidian Ring": KH1ItemData("Accessory", code = 264_1071, classification = ItemClassification.useful, max_quantity = 1, weight = 10), #"A56": KH1ItemData("Accessory", code = 264_1072, classification = ItemClassification.filler, max_quantity = 1, weight = 10), #"A57": KH1ItemData("Accessory", code = 264_1073, classification = ItemClassification.filler, max_quantity = 1, weight = 10), #"A58": KH1ItemData("Accessory", code = 264_1074, classification = ItemClassification.filler, max_quantity = 1, weight = 10), @@ -130,36 +130,36 @@ def get_items_by_category(category: str, disclude: list) -> Dict[str, KH1ItemDat "Diamond Dust": KH1ItemData("Keyblades", code = 264_1101, classification = ItemClassification.useful, max_quantity = 1, weight = 10), "One-Winged Angel": KH1ItemData("Keyblades", code = 264_1102, classification = ItemClassification.useful, max_quantity = 1, weight = 10), #"Mage's Staff": KH1ItemData("Weapons", code = 264_1103, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Morning Star": KH1ItemData("Weapons", code = 264_1104, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Shooting Star": KH1ItemData("Weapons", code = 264_1105, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Magus Staff": KH1ItemData("Weapons", code = 264_1106, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Wisdom Staff": KH1ItemData("Weapons", code = 264_1107, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Warhammer": KH1ItemData("Weapons", code = 264_1108, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Silver Mallet": KH1ItemData("Weapons", code = 264_1109, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Grand Mallet": KH1ItemData("Weapons", code = 264_1110, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Lord Fortune": KH1ItemData("Weapons", code = 264_1111, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Violetta": KH1ItemData("Weapons", code = 264_1112, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Dream Rod (Donald)": KH1ItemData("Weapons", code = 264_1113, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Save the Queen": KH1ItemData("Weapons", code = 264_1114, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Wizard's Relic": KH1ItemData("Weapons", code = 264_1115, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Meteor Strike": KH1ItemData("Weapons", code = 264_1116, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Fantasista": KH1ItemData("Weapons", code = 264_1117, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Morning Star": KH1ItemData("Weapons", code = 264_1104, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Shooting Star": KH1ItemData("Weapons", code = 264_1105, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Magus Staff": KH1ItemData("Weapons", code = 264_1106, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Wisdom Staff": KH1ItemData("Weapons", code = 264_1107, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Warhammer": KH1ItemData("Weapons", code = 264_1108, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Silver Mallet": KH1ItemData("Weapons", code = 264_1109, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Grand Mallet": KH1ItemData("Weapons", code = 264_1110, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Lord Fortune": KH1ItemData("Weapons", code = 264_1111, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Violetta": KH1ItemData("Weapons", code = 264_1112, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Dream Rod (Donald)": KH1ItemData("Weapons", code = 264_1113, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Save the Queen": KH1ItemData("Weapons", code = 264_1114, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Wizard's Relic": KH1ItemData("Weapons", code = 264_1115, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Meteor Strike": KH1ItemData("Weapons", code = 264_1116, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Fantasista": KH1ItemData("Weapons", code = 264_1117, classification = ItemClassification.useful, max_quantity = 1, weight = 10), #"Unused (Donald)": KH1ItemData("Weapons", code = 264_1118, classification = ItemClassification.filler, max_quantity = 1, weight = 10), #"Knight's Shield": KH1ItemData("Weapons", code = 264_1119, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Mythril Shield": KH1ItemData("Weapons", code = 264_1120, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Onyx Shield": KH1ItemData("Weapons", code = 264_1121, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Stout Shield": KH1ItemData("Weapons", code = 264_1122, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Golem Shield": KH1ItemData("Weapons", code = 264_1123, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Adamant Shield": KH1ItemData("Weapons", code = 264_1124, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Smasher": KH1ItemData("Weapons", code = 264_1125, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Gigas Fist": KH1ItemData("Weapons", code = 264_1126, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Genji Shield": KH1ItemData("Weapons", code = 264_1127, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Herc's Shield": KH1ItemData("Weapons", code = 264_1128, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Dream Shield": KH1ItemData("Weapons", code = 264_1129, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Save the King": KH1ItemData("Weapons", code = 264_1130, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Defender": KH1ItemData("Weapons", code = 264_1131, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Mighty Shield": KH1ItemData("Weapons", code = 264_1132, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Seven Elements": KH1ItemData("Weapons", code = 264_1133, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mythril Shield": KH1ItemData("Weapons", code = 264_1120, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Onyx Shield": KH1ItemData("Weapons", code = 264_1121, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Stout Shield": KH1ItemData("Weapons", code = 264_1122, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Golem Shield": KH1ItemData("Weapons", code = 264_1123, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Adamant Shield": KH1ItemData("Weapons", code = 264_1124, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Smasher": KH1ItemData("Weapons", code = 264_1125, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Gigas Fist": KH1ItemData("Weapons", code = 264_1126, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Genji Shield": KH1ItemData("Weapons", code = 264_1127, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Herc's Shield": KH1ItemData("Weapons", code = 264_1128, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Dream Shield": KH1ItemData("Weapons", code = 264_1129, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Save the King": KH1ItemData("Weapons", code = 264_1130, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Defender": KH1ItemData("Weapons", code = 264_1131, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Mighty Shield": KH1ItemData("Weapons", code = 264_1132, classification = ItemClassification.useful, max_quantity = 1, weight = 10), + "Seven Elements": KH1ItemData("Weapons", code = 264_1133, classification = ItemClassification.useful, max_quantity = 1, weight = 10), #"Unused (Goofy)": KH1ItemData("Weapons", code = 264_1134, classification = ItemClassification.filler, max_quantity = 1, weight = 10), #"Spear": KH1ItemData("Weapons", code = 264_1135, classification = ItemClassification.filler, max_quantity = 1, weight = 10), #"No Weapon": KH1ItemData("Weapons", code = 264_1136, classification = ItemClassification.filler, max_quantity = 1, weight = 10), @@ -175,9 +175,9 @@ def get_items_by_category(category: str, disclude: list) -> Dict[str, KH1ItemDat #"C05": KH1ItemData("Camping", code = 264_1146, classification = ItemClassification.filler, weight = 10), #"C06": KH1ItemData("Camping", code = 264_1147, classification = ItemClassification.filler, weight = 10), #"C07": KH1ItemData("Camping", code = 264_1148, classification = ItemClassification.filler, weight = 10), - #"Ansem's Report 11": KH1ItemData("Key", code = 264_1149, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - #"Ansem's Report 12": KH1ItemData("Key", code = 264_1150, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - #"Ansem's Report 13": KH1ItemData("Key", code = 264_1151, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ansem's Report 11": KH1ItemData("Unlock", code = 264_1149, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ansem's Report 12": KH1ItemData("Unlock", code = 264_1150, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ansem's Report 13": KH1ItemData("Unlock", code = 264_1151, classification = ItemClassification.filler, max_quantity = 1, weight = 10), "Power Up": KH1ItemData("Stat Ups", code = 264_1152, classification = ItemClassification.filler, weight = 10), "Defense Up": KH1ItemData("Stat Ups", code = 264_1153, classification = ItemClassification.filler, weight = 10), "AP Up": KH1ItemData("Stat Ups", code = 264_1154, classification = ItemClassification.filler, weight = 10), @@ -194,30 +194,30 @@ def get_items_by_category(category: str, disclude: list) -> Dict[str, KH1ItemDat #"Shiitank Rank": KH1ItemData("Synthesis", code = 264_1165, classification = ItemClassification.filler, weight = 10), #"Matsutake Rank": KH1ItemData("Synthesis", code = 264_1166, classification = ItemClassification.filler, weight = 10), #"Mystery Mold": KH1ItemData("Synthesis", code = 264_1167, classification = ItemClassification.filler, weight = 10), - #"Ansem's Report 1": KH1ItemData("Key", code = 264_1168, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 2": KH1ItemData("Key", code = 264_1169, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 3": KH1ItemData("Key", code = 264_1170, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 4": KH1ItemData("Key", code = 264_1171, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 5": KH1ItemData("Key", code = 264_1172, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 6": KH1ItemData("Key", code = 264_1173, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 7": KH1ItemData("Key", code = 264_1174, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 8": KH1ItemData("Key", code = 264_1175, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 9": KH1ItemData("Key", code = 264_1176, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Ansem's Report 10": KH1ItemData("Key", code = 264_1177, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 1": KH1ItemData("Unlock", code = 264_1168, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 2": KH1ItemData("Unlock", code = 264_1169, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 3": KH1ItemData("Unlock", code = 264_1170, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 4": KH1ItemData("Unlock", code = 264_1171, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 5": KH1ItemData("Unlock", code = 264_1172, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 6": KH1ItemData("Unlock", code = 264_1173, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 7": KH1ItemData("Unlock", code = 264_1174, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 8": KH1ItemData("Unlock", code = 264_1175, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 9": KH1ItemData("Unlock", code = 264_1176, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 10": KH1ItemData("Unlock", code = 264_1177, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Khama Vol. 8": KH1ItemData("Key", code = 264_1178, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Salegg Vol. 6": KH1ItemData("Key", code = 264_1179, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Azal Vol. 3": KH1ItemData("Key", code = 264_1180, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Mava Vol. 3": KH1ItemData("Key", code = 264_1181, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Mava Vol. 6": KH1ItemData("Key", code = 264_1182, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - #"Theon Vol. 6": KH1ItemData("Key", code = 264_1183, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Theon Vol. 6": KH1ItemData("Key", code = 264_1183, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Nahara Vol. 5": KH1ItemData("Key", code = 264_1184, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Hafet Vol. 4": KH1ItemData("Key", code = 264_1185, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Empty Bottle": KH1ItemData("Key", code = 264_1186, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Old Book": KH1ItemData("Key", code = 264_1187, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - "Emblem Piece (Flame)": KH1ItemData("Key", code = 264_1188, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - "Emblem Piece (Chest)": KH1ItemData("Key", code = 264_1189, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - "Emblem Piece (Statue)": KH1ItemData("Key", code = 264_1190, classification = ItemClassification.progression, max_quantity = 1, weight = 10), - "Emblem Piece (Fountain)": KH1ItemData("Key", code = 264_1191, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + #"Emblem Piece (Flame)": KH1ItemData("Key", code = 264_1188, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + #"Emblem Piece (Chest)": KH1ItemData("Key", code = 264_1189, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + #"Emblem Piece (Statue)": KH1ItemData("Key", code = 264_1190, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + #"Emblem Piece (Fountain)": KH1ItemData("Key", code = 264_1191, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Log": KH1ItemData("Key", code = 264_1192, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Cloth": KH1ItemData("Key", code = 264_1193, classification = ItemClassification.progression, max_quantity = 1, weight = 10), #"Rope": KH1ItemData("Key", code = 264_1194, classification = ItemClassification.progression, max_quantity = 1, weight = 10), diff --git a/worlds/kh1/Locations.py b/worlds/kh1/Locations.py index f806145c952b..1740d88a12ec 100644 --- a/worlds/kh1/Locations.py +++ b/worlds/kh1/Locations.py @@ -322,19 +322,19 @@ def get_locations_by_category(category: str) -> Dict[str, KH1LocationData]: "Atlantica Undersea Garden Clam": KH1LocationData("Clam", 265_6215), "Atlantica Undersea Cave Clam": KH1LocationData("Clam", 265_6216), - "Ansem's Secret Report 1": KH1LocationData("Reports", 265_7018), - "Ansem's Secret Report 2": KH1LocationData("Reports", 265_7017), - "Ansem's Secret Report 3": KH1LocationData("Reports", 265_7016), - "Ansem's Secret Report 4": KH1LocationData("Reports", 265_7015), - "Ansem's Secret Report 5": KH1LocationData("Reports", 265_7014), - "Ansem's Secret Report 6": KH1LocationData("Reports", 265_7013), - "Ansem's Secret Report 7": KH1LocationData("Reports", 265_7012), - "Ansem's Secret Report 8": KH1LocationData("Reports", 265_7011), - "Ansem's Secret Report 9": KH1LocationData("Reports", 265_7028), - "Ansem's Secret Report 10": KH1LocationData("Reports", 265_7027), - #"Ansem's Secret Report 11": KH1LocationData("Reports", 265_7026), - "Ansem's Secret Report 12": KH1LocationData("Reports", 265_7025), - "Ansem's Secret Report 13": KH1LocationData("Reports", 265_7024), + "Ansem's Report 1": KH1LocationData("Reports", 265_7018), + "Ansem's Report 2": KH1LocationData("Reports", 265_7017), + "Ansem's Report 3": KH1LocationData("Reports", 265_7016), + "Ansem's Report 4": KH1LocationData("Reports", 265_7015), + "Ansem's Report 5": KH1LocationData("Reports", 265_7014), + "Ansem's Report 6": KH1LocationData("Reports", 265_7013), + "Ansem's Report 7": KH1LocationData("Reports", 265_7012), + "Ansem's Report 8": KH1LocationData("Reports", 265_7011), + "Ansem's Report 9": KH1LocationData("Reports", 265_7028), + "Ansem's Report 10": KH1LocationData("Reports", 265_7027), + #"Ansem's Report 11": KH1LocationData("Reports", 265_7026), + "Ansem's Report 12": KH1LocationData("Reports", 265_7025), + "Ansem's Report 13": KH1LocationData("Reports", 265_7024), "Level 001": KH1LocationData("Levels", 265_8001), "Level 002": KH1LocationData("Levels", 265_8002), "Level 003": KH1LocationData("Levels", 265_8003), diff --git a/worlds/kh1/Options.py b/worlds/kh1/Options.py index 25c0e7751698..90dc72c8e3f5 100644 --- a/worlds/kh1/Options.py +++ b/worlds/kh1/Options.py @@ -102,6 +102,24 @@ class EXPMultiplier(NamedRange): "10x": default * 10, } +class RequiredReports(Range): + """ + Determines the number of Ansem's Reports needed to open End of the World + """ + diplay_name = "Reports to Open End of the World" + default = 4 + range_start = 1 + range_end = 13 + +class ReportsInPool(Range): + """ + Determines the number of Ansem's Reports in the item pool. + """ + diplay_name = "Reports in Pool" + default = 4 + range_start = 1 + range_end = 13 + @dataclass class KH1Options(PerGameCommonOptions): goal: Goal @@ -114,3 +132,5 @@ class KH1Options(PerGameCommonOptions): accessory_slot_increase: AccessorySlotIncrease item_slot_increase: ItemSlotIncrease exp_multiplier: EXPMultiplier + required_reports: RequiredReports + reports_in_pool: ReportsInPool diff --git a/worlds/kh1/Regions.py b/worlds/kh1/Regions.py index 7269d75719c4..aa2b25a03522 100644 --- a/worlds/kh1/Regions.py +++ b/worlds/kh1/Regions.py @@ -334,22 +334,22 @@ def create_regions(multiworld: MultiWorld, player: int, goal: str, atlantica: bo regions["Atlantica"].locations.append("Atlantica Undersea Garden Clam") regions["Atlantica"].locations.append("Atlantica Undersea Cave Clam") - regions["Agrabah"].locations.append("Ansem's Secret Report 1") - regions["Hollow Bastion"].locations.append("Ansem's Secret Report 2") + regions["Agrabah"].locations.append("Ansem's Report 1") + regions["Hollow Bastion"].locations.append("Ansem's Report 2") if atlantica or goal == "atlantica": - regions["Atlantica"].locations.append("Ansem's Secret Report 3") - regions["Hollow Bastion"].locations.append("Ansem's Secret Report 4") - regions["Hollow Bastion"].locations.append("Ansem's Secret Report 5") - regions["Hollow Bastion"].locations.append("Ansem's Secret Report 6") - regions["Halloween Town"].locations.append("Ansem's Secret Report 7") - regions["Olympus Coliseum"].locations.append("Ansem's Secret Report 8") - regions["Neverland"].locations.append("Ansem's Secret Report 9") - regions["Hollow Bastion"].locations.append("Ansem's Secret Report 10") - #regions["Agrabah"].locations.append("Ansem's Secret Report 11") + regions["Atlantica"].locations.append("Ansem's Report 3") + regions["Hollow Bastion"].locations.append("Ansem's Report 4") + regions["Hollow Bastion"].locations.append("Ansem's Report 5") + regions["Hollow Bastion"].locations.append("Ansem's Report 6") + regions["Halloween Town"].locations.append("Ansem's Report 7") + regions["Olympus Coliseum"].locations.append("Ansem's Report 8") + regions["Neverland"].locations.append("Ansem's Report 9") + regions["Hollow Bastion"].locations.append("Ansem's Report 10") + #regions["Agrabah"].locations.append("Ansem's Report 11") if goal == "sephiroth": - regions["Olympus Coliseum"].locations.append("Ansem's Secret Report 12") + regions["Olympus Coliseum"].locations.append("Ansem's Report 12") if goal == "unknown": - regions["Hollow Bastion"].locations.append("Ansem's Secret Report 13") + regions["Hollow Bastion"].locations.append("Ansem's Report 13") for i in range(levels): regions["Levels"].locations.append("Level " + str(i+1).rjust(3,'0')) diff --git a/worlds/kh1/Rules.py b/worlds/kh1/Rules.py index da5c118dbae4..e922d62da331 100644 --- a/worlds/kh1/Rules.py +++ b/worlds/kh1/Rules.py @@ -18,7 +18,7 @@ def can_glide(state: CollectionState, player: int) -> bool: return state.has("Glide", player) or state.has("Superglide", player) def has_emblems(state: CollectionState, player: int) -> bool: - return state.has("Emblem Piece (Flame)", player) and state.has("Emblem Piece (Chest)", player) and state.has("Emblem Piece (Statue)", player) and state.has("Emblem Piece (Fountain)", player) + return state.has("Theon Vol. 6", player) and state.has("Red Trinity", player) and state.has("Progressive Fire", player) and (state.has("Progressive Thunder", player) or state.has("High Jump", player) or can_glide(state, player)) def has_item(state: CollectionState, player: int, item) -> bool: return state.has(item, player) @@ -40,7 +40,14 @@ def has_postcards(state: CollectionState, player: int, postcards_required: int) def has_offensive_magic(state: CollectionState, player: int) -> bool: return state.has("Progressive Fire", player) or state.has("Progressive Blizzard", player) or state.has("Progressive Thunder", player) or state.has("Progressive Gravity", player) or state.has("Progressive Stop", player) -def set_rules(multiworld: MultiWorld, player: int, goal: str, atlantica: bool): +def has_reports(state: CollectionState, player: int, required_reports: int) -> bool: + reports_acquired = 0 + for x in range(13): + if has_item(state, player, "Ansem's Report " + str(x+1)): + reports_acquired = reports_acquired + 1 + return reports_acquired >= required_reports + +def set_rules(multiworld: MultiWorld, player: int, goal: str, atlantica: bool, required_reports: int): #Location rules. #Keys #multiworld.get_location("Destiny Islands Chest" , player).access_rule = lambda state: has_item(state, player, "") @@ -123,7 +130,7 @@ def set_rules(multiworld: MultiWorld, player: int, goal: str, atlantica: bool): #multiworld.get_location("Agrabah Cave of Wonders Hall High Left Chest" , player).access_rule = lambda state: has_item(state, player, "") #multiworld.get_location("Agrabah Cave of Wonders Hall Near Bottomless Hall Chest" , player).access_rule = lambda state: has_item(state, player, "") #multiworld.get_location("Agrabah Cave of Wonders Bottomless Hall Raised Platform Chest" , player).access_rule = lambda state: has_item(state, player, "") - multiworld.get_location("Agrabah Cave of Wonders Bottomless Hall Pillar Chest" , player).access_rule = lambda state: has_item(state, player, "High Jump") or can_glide(state, player) + multiworld.get_location("Agrabah Cave of Wonders Bottomless Hall Pillar Chest" , player).access_rule = lambda state: can_glide(state, player) #multiworld.get_location("Agrabah Cave of Wonders Bottomless Hall Across Chasm Chest" , player).access_rule = lambda state: has_item(state, player, "") #multiworld.get_location("Agrabah Cave of Wonders Treasure Room Across Platforms Chest" , player).access_rule = lambda state: has_item(state, player, "") #multiworld.get_location("Agrabah Cave of Wonders Treasure Room Small Treasure Pile Chest" , player).access_rule = lambda state: has_item(state, player, "") @@ -344,22 +351,22 @@ def set_rules(multiworld: MultiWorld, player: int, goal: str, atlantica: bool): #multiworld.get_location("Atlantica Undersea Garden Clam" , player).access_rule = lambda state: has_item(state, player, "") #multiworld.get_location("Atlantica Undersea Cave Clam" , player).access_rule = lambda state: has_item(state, player, "") - #multiworld.get_location("Ansem's Secret Report 1" , player).access_rule = lambda state: has_item(state, player, "") - multiworld.get_location("Ansem's Secret Report 2" , player).access_rule = lambda state: has_emblems(state, player) + #multiworld.get_location("Ansem's Report 1" , player).access_rule = lambda state: has_item(state, player, "") + multiworld.get_location("Ansem's Report 2" , player).access_rule = lambda state: has_emblems(state, player) if atlantica or goal == "atlantica": - multiworld.get_location("Ansem's Secret Report 3" , player).access_rule = lambda state: has_item(state, player, "Mermaid Kick") and has_offensive_magic(state, player) - multiworld.get_location("Ansem's Secret Report 4" , player).access_rule = lambda state: has_emblems(state, player) - multiworld.get_location("Ansem's Secret Report 5" , player).access_rule = lambda state: has_emblems(state, player) - multiworld.get_location("Ansem's Secret Report 6" , player).access_rule = lambda state: has_emblems(state, player) - multiworld.get_location("Ansem's Secret Report 7" , player).access_rule = lambda state: has_item(state, player, "Jack-In-The-Box") and has_item(state, player, "Progressive Fire") - multiworld.get_location("Ansem's Secret Report 8" , player).access_rule = lambda state: has_item(state, player, "Phil Cup") and has_item(state, player, "Pegasus Cup") and has_item(state, player, "Hercules Cup") and has_x_worlds(state, player, 7) - multiworld.get_location("Ansem's Secret Report 9" , player).access_rule = lambda state: has_item(state, player, "Green Trinity") - multiworld.get_location("Ansem's Secret Report 10" , player).access_rule = lambda state: has_emblems(state, player) - #multiworld.get_location("Ansem's Secret Report 11" , player).access_rule = lambda state: has_item(state, player, "") + multiworld.get_location("Ansem's Report 3" , player).access_rule = lambda state: has_item(state, player, "Mermaid Kick") and has_offensive_magic(state, player) + multiworld.get_location("Ansem's Report 4" , player).access_rule = lambda state: has_emblems(state, player) + multiworld.get_location("Ansem's Report 5" , player).access_rule = lambda state: has_emblems(state, player) + multiworld.get_location("Ansem's Report 6" , player).access_rule = lambda state: has_emblems(state, player) + multiworld.get_location("Ansem's Report 7" , player).access_rule = lambda state: has_item(state, player, "Jack-In-The-Box") and has_item(state, player, "Progressive Fire") + multiworld.get_location("Ansem's Report 8" , player).access_rule = lambda state: has_item(state, player, "Phil Cup") and has_item(state, player, "Pegasus Cup") and has_item(state, player, "Hercules Cup") and has_x_worlds(state, player, 7) + multiworld.get_location("Ansem's Report 9" , player).access_rule = lambda state: has_item(state, player, "Green Trinity") + multiworld.get_location("Ansem's Report 10" , player).access_rule = lambda state: has_emblems(state, player) + #multiworld.get_location("Ansem's Report 11" , player).access_rule = lambda state: has_item(state, player, "") if goal == "sephiroth": - multiworld.get_location("Ansem's Secret Report 12" , player).access_rule = lambda state: has_item(state, player, "Phil Cup") and has_item(state, player, "Pegasus Cup") and has_item(state, player, "Hercules Cup") + multiworld.get_location("Ansem's Report 12" , player).access_rule = lambda state: has_item(state, player, "Phil Cup") and has_item(state, player, "Pegasus Cup") and has_item(state, player, "Hercules Cup") if goal == "unknown": - multiworld.get_location("Ansem's Secret Report 13" , player).access_rule = lambda state: has_emblems(state, player) + multiworld.get_location("Ansem's Report 13" , player).access_rule = lambda state: has_emblems(state, player) multiworld.get_location("Complete Phil Cup" , player).access_rule = lambda state: has_item(state, player, "Phil Cup") multiworld.get_location("Complete Phil Cup Solo" , player).access_rule = lambda state: has_item(state, player, "Phil Cup") @@ -394,7 +401,7 @@ def set_rules(multiworld: MultiWorld, player: int, goal: str, atlantica: bool): multiworld.get_entrance("Halloween Town" , player).access_rule = lambda state: has_item(state, player,"Halloween Town") and has_x_worlds(state, player, 2) multiworld.get_entrance("Neverland" , player).access_rule = lambda state: has_item(state, player,"Neverland") and has_x_worlds(state, player, 4) multiworld.get_entrance("Hollow Bastion" , player).access_rule = lambda state: has_item(state, player,"Hollow Bastion") and has_x_worlds(state, player, 5) - multiworld.get_entrance("End of the World" , player).access_rule = lambda state: has_item(state, player,"Hollow Bastion") and has_x_worlds(state, player, 7) and has_emblems(state, player) + multiworld.get_entrance("End of the World" , player).access_rule = lambda state: has_x_worlds(state, player, 7) and has_reports(state, player, required_reports) # Win condition. multiworld.completion_condition[player] = lambda state: state.has_all({"Victory"}, player) \ No newline at end of file diff --git a/worlds/kh1/__init__.py b/worlds/kh1/__init__.py index b93a8d7386e9..1d47b5423082 100644 --- a/worlds/kh1/__init__.py +++ b/worlds/kh1/__init__.py @@ -48,6 +48,9 @@ class KH1World(World): location_name_to_id = {name: data.code for name, data in location_table.items()} def create_items(self): + if self.options.reports_in_pool < self.options.required_reports): + print("LESS REPORTS IN POOL THAN REQUIRED REPORTS, SWAPPING") + item_pool: List[KH1Item] = [] possible_level_up_item_pool = [] level_up_item_pool = [] @@ -82,7 +85,7 @@ def create_items(self): i = i + 1 total_locations = len(self.multiworld.get_unfilled_locations(self.player)) - 1 # for victory placement - non_filler_item_categories = ["Key", "Magic", "Worlds", "Trinities", "Cups", "Summons", "Abilities", "Shared Abilities", "Keyblades"] + non_filler_item_categories = ["Key", "Magic", "Worlds", "Trinities", "Cups", "Summons", "Abilities", "Shared Abilities", "Keyblades", "Accessory", "Weapons"] if self.options.atlantica or self.options.goal == "atlantica": non_filler_item_categories.append("Atlantica") for name, data in item_table.items(): @@ -92,6 +95,9 @@ def create_items(self): if data.category not in non_filler_item_categories: continue item_pool += [self.create_item(name) for _ in range(0, quantity)] + + for i in range(max(self.options.required_reports, self.options.reports_in_pool)): + item_pool += [self.create_item("Ansem's Report " + str(i+1))] # Fill any empty locations with filler items. item_names = [] @@ -112,7 +118,7 @@ def create_items(self): def pre_fill(self) -> None: goal_dict = { - "sephiroth": "Ansem's Secret Report 12", + "sephiroth": "Ansem's Report 12", "wonderland": "Wonderland Ifrit's Horn Event", "deep_jungle": "Deep Jungle Jungle King Event", "agrabah": "Agrabah Genie Event", @@ -120,7 +126,7 @@ def pre_fill(self) -> None: "atlantica": "Atlantica Crabclaw Event", "halloween_town": "Halloween Town Pumpkinhead Event", "neverland": "Neverland Fairy Harp Event", - "unknown": "Ansem's Secret Report 13", + "unknown": "Ansem's Report 13", "final_rest": "End of the World Final Rest Chest", "postcards": "Traverse Town Mail Postcard 10 Event", "final_ansem": "Final Ansem" @@ -131,8 +137,6 @@ def get_filler_item_name(self) -> str: fillers = {} disclude = [] fillers.update(get_items_by_category("Item", disclude)) - fillers.update(get_items_by_category("Accessory", disclude)) - fillers.update(get_items_by_category("Weapons", disclude)) fillers.update(get_items_by_category("Camping", disclude)) fillers.update(get_items_by_category("Stat Ups", disclude)) weights = [data.weight for data in fillers.values()] @@ -140,6 +144,7 @@ def get_filler_item_name(self) -> str: def fill_slot_data(self) -> dict: slot_data = {"EXP Multiplier": int(self.options.exp_multiplier)/16} + slot_data = {"Required Reports": min(int(self.options.required_reports), int(self.options.reports_in_pool))} return slot_data def create_item(self, name: str) -> KH1Item: @@ -151,7 +156,7 @@ def create_event(self, name: str) -> KH1Item: return KH1Item(name, data.classification, data.code, self.player) def set_rules(self): - set_rules(self.multiworld, self.player, self.options.goal, self.options.atlantica) + set_rules(self.multiworld, self.player, self.options.goal, self.options.atlantica, min(self.options.required_reports, self.options.reports_in_pool)) def create_regions(self): create_regions(self.multiworld, self.player, self.options.goal, self.options.atlantica \ From a13bac186475eba7f89eeb925f68a5a85e7c2bd8 Mon Sep 17 00:00:00 2001 From: gaithern Date: Fri, 2 Feb 2024 10:04:25 -0600 Subject: [PATCH 2/4] Update __init__.py --- worlds/kh1/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/kh1/__init__.py b/worlds/kh1/__init__.py index 1d47b5423082..1310a679d66f 100644 --- a/worlds/kh1/__init__.py +++ b/worlds/kh1/__init__.py @@ -48,7 +48,7 @@ class KH1World(World): location_name_to_id = {name: data.code for name, data in location_table.items()} def create_items(self): - if self.options.reports_in_pool < self.options.required_reports): + if self.options.reports_in_pool < self.options.required_reports: print("LESS REPORTS IN POOL THAN REQUIRED REPORTS, SWAPPING") item_pool: List[KH1Item] = [] From bb50db28087a74516e1ebb18eb0234efa03cba53 Mon Sep 17 00:00:00 2001 From: gaithern Date: Fri, 2 Feb 2024 11:06:44 -0600 Subject: [PATCH 3/4] Update __init__.py --- worlds/kh1/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/kh1/__init__.py b/worlds/kh1/__init__.py index 1310a679d66f..0c5386ae3ed6 100644 --- a/worlds/kh1/__init__.py +++ b/worlds/kh1/__init__.py @@ -143,8 +143,8 @@ def get_filler_item_name(self) -> str: return self.multiworld.random.choices([filler for filler in fillers.keys()], weights, k=1)[0] def fill_slot_data(self) -> dict: - slot_data = {"EXP Multiplier": int(self.options.exp_multiplier)/16} - slot_data = {"Required Reports": min(int(self.options.required_reports), int(self.options.reports_in_pool))} + slot_data = {"EXP Multiplier": int(self.options.exp_multiplier)/16 + ,"Required Reports": min(int(self.options.required_reports), int(self.options.reports_in_pool))} return slot_data def create_item(self, name: str) -> KH1Item: From 1c0be10e51c3e82eabe8531c39a9bf1f415ce8ef Mon Sep 17 00:00:00 2001 From: gaithern Date: Fri, 2 Feb 2024 11:24:22 -0600 Subject: [PATCH 4/4] Update Items.py --- worlds/kh1/Items.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/kh1/Items.py b/worlds/kh1/Items.py index 7cbb68060fba..e4fbeac4293a 100644 --- a/worlds/kh1/Items.py +++ b/worlds/kh1/Items.py @@ -175,9 +175,9 @@ def get_items_by_category(category: str, disclude: list) -> Dict[str, KH1ItemDat #"C05": KH1ItemData("Camping", code = 264_1146, classification = ItemClassification.filler, weight = 10), #"C06": KH1ItemData("Camping", code = 264_1147, classification = ItemClassification.filler, weight = 10), #"C07": KH1ItemData("Camping", code = 264_1148, classification = ItemClassification.filler, weight = 10), - "Ansem's Report 11": KH1ItemData("Unlock", code = 264_1149, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ansem's Report 12": KH1ItemData("Unlock", code = 264_1150, classification = ItemClassification.filler, max_quantity = 1, weight = 10), - "Ansem's Report 13": KH1ItemData("Unlock", code = 264_1151, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ansem's Report 11": KH1ItemData("Unlock", code = 264_1149, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 12": KH1ItemData("Unlock", code = 264_1150, classification = ItemClassification.progression, max_quantity = 1, weight = 10), + "Ansem's Report 13": KH1ItemData("Unlock", code = 264_1151, classification = ItemClassification.progression, max_quantity = 1, weight = 10), "Power Up": KH1ItemData("Stat Ups", code = 264_1152, classification = ItemClassification.filler, weight = 10), "Defense Up": KH1ItemData("Stat Ups", code = 264_1153, classification = ItemClassification.filler, weight = 10), "AP Up": KH1ItemData("Stat Ups", code = 264_1154, classification = ItemClassification.filler, weight = 10),