From a118fa8784d7b1097afd7937318bfab0895a18f6 Mon Sep 17 00:00:00 2001 From: gaithern Date: Mon, 20 Nov 2023 20:53:30 -0600 Subject: [PATCH 1/3] Big changes --- data/lua/connector_khcom.lua | 208 +++++++++++++++++++- worlds/khcom/Items.py | 360 +++++++++++++++++++++++------------ worlds/khcom/Options.py | 42 +++- worlds/khcom/__init__.py | 34 +++- 4 files changed, 509 insertions(+), 135 deletions(-) diff --git a/data/lua/connector_khcom.lua b/data/lua/connector_khcom.lua index 7c295b2be194..c73e44f92fd5 100644 --- a/data/lua/connector_khcom.lua +++ b/data/lua/connector_khcom.lua @@ -8,6 +8,159 @@ function define_item_ids() item_ids["Silver Card Pack"] = 2661002 item_ids["Gold Card Pack"] = 2661003 + item_ids["Kingdom Key 1-3"] = 2661011 + item_ids["Kingdom Key 4-6"] = 2661012 + item_ids["Kingdom Key 7-9"] = 2661013 + item_ids["Kingdom Key 0"] = 2661014 + item_ids["Three Wishes 1-3"] = 2661021 + item_ids["Three Wishes 4-6"] = 2661022 + item_ids["Three Wishes 7-9"] = 2661023 + item_ids["Three Wishes 0"] = 2661024 + item_ids["Crabclaw 1-3"] = 2661031 + item_ids["Crabclaw 4-6"] = 2661032 + item_ids["Crabclaw 7-9"] = 2661033 + item_ids["Crabclaw 0"] = 2661034 + item_ids["Pumpkinhead 1-3"] = 2661041 + item_ids["Pumpkinhead 4-6"] = 2661042 + item_ids["Pumpkinhead 7-9"] = 2661043 + item_ids["Pumpkinhead 0"] = 2661044 + item_ids["Fairy Harp 1-3"] = 2661051 + item_ids["Fairy Harp 4-6"] = 2661052 + item_ids["Fairy Harp 7-9"] = 2661053 + item_ids["Fairy Harp 0"] = 2661054 + item_ids["Wishing Star 1-3"] = 2661061 + item_ids["Wishing Star 4-6"] = 2661062 + item_ids["Wishing Star 7-9"] = 2661063 + item_ids["Wishing Star 0"] = 2661064 + item_ids["Spellbinder 1-3"] = 2661071 + item_ids["Spellbinder 4-6"] = 2661072 + item_ids["Spellbinder 7-9"] = 2661073 + item_ids["Spellbinder 0"] = 2661074 + item_ids["Metal Chocobo 1-3"] = 2661081 + item_ids["Metal Chocobo 4-6"] = 2661082 + item_ids["Metal Chocobo 7-9"] = 2661083 + item_ids["Metal Chocobo 0"] = 2661084 + item_ids["Olympia 1-3"] = 2661091 + item_ids["Olympia 4-6"] = 2661092 + item_ids["Olympia 7-9"] = 2661093 + item_ids["Olympia 0"] = 2661094 + item_ids["Lionheart 1-3"] = 2661101 + item_ids["Lionheart 4-6"] = 2661102 + item_ids["Lionheart 7-9"] = 2661103 + item_ids["Lionheart 0"] = 2661104 + item_ids["Lady Luck 1-3"] = 2661111 + item_ids["Lady Luck 4-6"] = 2661112 + item_ids["Lady Luck 7-9"] = 2661113 + item_ids["Lady Luck 0"] = 2661114 + item_ids["Divine Rose 1-3"] = 2661121 + item_ids["Divine Rose 4-6"] = 2661122 + item_ids["Divine Rose 7-9"] = 2661123 + item_ids["Divine Rose 0"] = 2661124 + item_ids["Oathkeeper 1-3"] = 2661131 + item_ids["Oathkeeper 4-6"] = 2661132 + item_ids["Oathkeeper 7-9"] = 2661133 + item_ids["Oathkeeper 0"] = 2661134 + item_ids["Oblivion 1-3"] = 2661141 + item_ids["Oblivion 4-6"] = 2661142 + item_ids["Oblivion 7-9"] = 2661143 + item_ids["Oblivion 0"] = 2661144 + item_ids["Diamond Dust 1-3"] = 2661151 + item_ids["Diamond Dust 4-6"] = 2661152 + item_ids["Diamond Dust 7-9"] = 2661153 + item_ids["Diamond Dust 0"] = 2661154 + item_ids["One Winged Angel 1-3"] = 2661161 + item_ids["One Winged Angel 4-6"] = 2661162 + item_ids["One Winged Angel 7-9"] = 2661163 + item_ids["One Winged Angel 0"] = 2661164 + item_ids["Ultima Weapon 1-3"] = 2661171 + item_ids["Ultima Weapon 4-6"] = 2661172 + item_ids["Ultima Weapon 7-9"] = 2661173 + item_ids["Ultima Weapon 0"] = 2661174 + item_ids["Fire 1-3"] = 2661181 + item_ids["Fire 4-6"] = 2661182 + item_ids["Fire 7-9"] = 2661183 + item_ids["Fire 0"] = 2661184 + item_ids["Blizzard 1-3"] = 2661191 + item_ids["Blizzard 4-6"] = 2661192 + item_ids["Blizzard 7-9"] = 2661193 + item_ids["Blizzard 0"] = 2661194 + item_ids["Thunder 1-3"] = 2661201 + item_ids["Thunder 4-6"] = 2661202 + item_ids["Thunder 7-9"] = 2661203 + item_ids["Thunder 0"] = 2661204 + item_ids["Cure 1-3"] = 2661211 + item_ids["Cure 4-6"] = 2661212 + item_ids["Cure 7-9"] = 2661213 + item_ids["Cure 0"] = 2661214 + item_ids["Gravity 1-3"] = 2661221 + item_ids["Gravity 4-6"] = 2661222 + item_ids["Gravity 7-9"] = 2661223 + item_ids["Gravity 0"] = 2661224 + item_ids["Stop 1-3"] = 2661231 + item_ids["Stop 4-6"] = 2661232 + item_ids["Stop 7-9"] = 2661233 + item_ids["Stop 0"] = 2661234 + item_ids["Aero 1-3"] = 2661241 + item_ids["Aero 4-6"] = 2661242 + item_ids["Aero 7-9"] = 2661243 + item_ids["Aero 0"] = 2661244 + item_ids["Simba 1-3"] = 2661251 + item_ids["Simba 4-6"] = 2661252 + item_ids["Simba 7-9"] = 2661253 + item_ids["Simba 0"] = 2661254 + item_ids["Genie 1-3"] = 2661261 + item_ids["Genie 4-6"] = 2661262 + item_ids["Genie 7-9"] = 2661263 + item_ids["Genie 0"] = 2661264 + item_ids["Bambi 1-3"] = 2661271 + item_ids["Bambi 4-6"] = 2661272 + item_ids["Bambi 7-9"] = 2661273 + item_ids["Bambi 0"] = 2661274 + item_ids["Dumbo 1-3"] = 2661281 + item_ids["Dumbo 4-6"] = 2661282 + item_ids["Dumbo 7-9"] = 2661283 + item_ids["Dumbo 0"] = 2661284 + item_ids["Tinker Bell 1-3"] = 2661291 + item_ids["Tinker Bell 4-6"] = 2661292 + item_ids["Tinker Bell 7-9"] = 2661293 + item_ids["Tinker Bell 0"] = 2661294 + item_ids["Mushu 1-3"] = 2661301 + item_ids["Mushu 4-6"] = 2661302 + item_ids["Mushu 7-9"] = 2661303 + item_ids["Mushu 0"] = 2661304 + item_ids["Cloud 1-3"] = 2661311 + item_ids["Cloud 4-6"] = 2661312 + item_ids["Cloud 7-9"] = 2661313 + item_ids["Cloud 0"] = 2661314 + item_ids["Potion 1-3"] = 2661321 + item_ids["Potion 4-6"] = 2661322 + item_ids["Potion 7-9"] = 2661323 + item_ids["Potion 0"] = 2661324 + item_ids["Hi-Potion 1-3"] = 2661331 + item_ids["Hi-Potion 4-6"] = 2661332 + item_ids["Hi-Potion 7-9"] = 2661333 + item_ids["Hi-Potion 0"] = 2661334 + item_ids["Mega-Potion 1-3"] = 2661341 + item_ids["Mega-Potion 4-6"] = 2661342 + item_ids["Mega-Potion 7-9"] = 2661343 + item_ids["Mega-Potion 0"] = 2661344 + item_ids["Ether 1-3"] = 2661351 + item_ids["Ether 4-6"] = 2661352 + item_ids["Ether 7-9"] = 2661353 + item_ids["Ether 0"] = 2661354 + item_ids["Mega-Ether 1-3"] = 2661361 + item_ids["Mega-Ether 4-6"] = 2661362 + item_ids["Mega-Ether 7-9"] = 2661363 + item_ids["Mega-Ether 0"] = 2661364 + item_ids["Elixir 1-3"] = 2661371 + item_ids["Elixir 4-6"] = 2661372 + item_ids["Elixir 7-9"] = 2661373 + item_ids["Elixir 0"] = 2661374 + item_ids["Megalixir 1-3"] = 2661381 + item_ids["Megalixir 4-6"] = 2661382 + item_ids["Megalixir 7-9"] = 2661383 + item_ids["Megalixir 0"] = 2661384 + item_ids["Enemy Card Shadow"] = 2662001 item_ids["Enemy Card Soldier"] = 2662002 item_ids["Enemy Card Large Body"] = 2662003 @@ -368,7 +521,7 @@ char_to_hex_map = define_char_to_hex_map() exceptions = define_exceptions() journal_bit_location_ids = define_journal_bit_location_ids() -pack_size = 2 +pack_size = 3 --Addresses current_gold_map_cards_addresses = {} @@ -528,14 +681,16 @@ function set_deck_pointer(deck_number, offset, value) end function set_starting_deck() - memory.write_u16_le(deck_cp_cost_address, 0x0034) - memory.write_u16_le(deck_card_count_address, 0x02) + memory.write_u16_le(deck_cp_cost_address, 43) + memory.write_u16_le(deck_card_count_address, 0x03) memory.write_u16_le(battle_cards_address, 0x1008) --Kingdom Key 8 set_deck_pointer(1, 0, 0x0000) - memory.write_u16_le(battle_cards_address + 2, 0x10CE) --Cure 6 + memory.write_u16_le(battle_cards_address + 2, 0x1007) --Kingdom Key 7 set_deck_pointer(1, 1, 0x0001) - local i = 3 + memory.write_u16_le(battle_cards_address + 4, 0x1006) --Kingdom Key 6 + set_deck_pointer(1, 2, 0x0002) + local i = 4 while i <= 15 do memory.write_u16_le(battle_cards_address + 2*(i-1), 0x0FFF) set_deck_pointer(1, i-1, 0xFFFF) @@ -794,6 +949,27 @@ function add_battle_card(battle_card) end end +function add_battle_card_specific_value(battle_card, value) + offset = find_empty_battle_card_offset() + for k,v in pairs(win_conditions) do + if k == battle_card then + memory.write_u16_le(battle_cards_address + (2 * offset), v) + return + end + end + for k,v in pairs(battle_cards) do + if k == battle_card then + card_value = value + if not has_value(exceptions, v[1]+card_value) then + memory.write_u16_le(battle_cards_address + (2 * offset), v[1]+card_value) + print("Got Card: " .. battle_card .. " " .. tostring(card_value)) + else + print(battle_card .. " " .. tostring(value) .. " is an exception card, skipping.") + end + end + end +end + function open_card_pack(card_pack) print("Opening " .. card_pack) if card_pack == "Bronze Card Pack" then @@ -857,6 +1033,28 @@ function receive_items() add_battle_card(received_item_name:sub(12)) item_found = true end + if string.sub(received_item_name, -3) == "1-3" and not item_found then + add_battle_card_specific_value(received_item_name:sub(1, -5), 1) + add_battle_card_specific_value(received_item_name:sub(1, -5), 2) + add_battle_card_specific_value(received_item_name:sub(1, -5), 3) + item_found = true + end + if string.sub(received_item_name, -3) == "4-6" and not item_found then + add_battle_card_specific_value(received_item_name:sub(1, -5), 4) + add_battle_card_specific_value(received_item_name:sub(1, -5), 5) + add_battle_card_specific_value(received_item_name:sub(1, -5), 6) + item_found = true + end + if string.sub(received_item_name, -3) == "7-9" and not item_found then + add_battle_card_specific_value(received_item_name:sub(1, -5), 7) + add_battle_card_specific_value(received_item_name:sub(1, -5), 8) + add_battle_card_specific_value(received_item_name:sub(1, -5), 9) + item_found = true + end + if string.sub(received_item_name, -1) == "0" and not item_found then + add_battle_card_specific_value(received_item_name:sub(1, -3), 0) + item_found = true + end for k,v in pairs(win_conditions) do if not item_found then if k == received_item_name then diff --git a/worlds/khcom/Items.py b/worlds/khcom/Items.py index 4ad49b0e87e2..a0b6569bd503 100644 --- a/worlds/khcom/Items.py +++ b/worlds/khcom/Items.py @@ -9,16 +9,17 @@ class KHCOMItem(Item): class KHCOMItemData(NamedTuple): category: str + sub: str = "None" code: Optional[int] = None classification: ItemClassification = ItemClassification.filler max_quantity: int = 1 weight: int = 1 -def get_items_by_category(category: str) -> Dict[str, KHCOMItemData]: +def get_items_by_category(category: str, disclude: list) -> Dict[str, KHCOMItemData]: item_dict: Dict[str, KHCOMItemData] = {} for name, data in item_table.items(): - if data.category == category: + if data.category == category and all(x not in name for x in disclude): item_dict.setdefault(name, data) return item_dict @@ -26,127 +27,246 @@ def get_items_by_category(category: str) -> Dict[str, KHCOMItemData]: item_table: Dict[str, KHCOMItemData] = { #Battle Cards - "Bronze Card Pack": KHCOMItemData("Filler", 266_1001, ItemClassification.filler, weight=500), - "Silver Card Pack": KHCOMItemData("Filler", 266_1002, ItemClassification.filler, weight=300), - "Gold Card Pack": KHCOMItemData("Filler", 266_1003, ItemClassification.filler, weight=100), + "Bronze Card Pack": KHCOMItemData("Packs", code = 266_1001, classification = ItemClassification.filler, weight = 500), + "Silver Card Pack": KHCOMItemData("Packs", code = 266_1002, classification = ItemClassification.filler, weight = 300), + "Gold Card Pack": KHCOMItemData("Packs", code = 266_1003, classification = ItemClassification.filler, weight = 100), + "Kingdom Key 1-3": KHCOMItemData("Sets", code = 266_1011, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Kingdom Key 4-6": KHCOMItemData("Sets", code = 266_1012, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Kingdom Key 7-9": KHCOMItemData("Sets", code = 266_1013, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Kingdom Key 0": KHCOMItemData("Sets", code = 266_1014, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Three Wishes 1-3": KHCOMItemData("Sets", code = 266_1021, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Three Wishes 4-6": KHCOMItemData("Sets", code = 266_1022, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Three Wishes 7-9": KHCOMItemData("Sets", code = 266_1023, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Three Wishes 0": KHCOMItemData("Sets", code = 266_1024, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Crabclaw 1-3": KHCOMItemData("Sets", code = 266_1031, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Crabclaw 4-6": KHCOMItemData("Sets", code = 266_1032, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Crabclaw 7-9": KHCOMItemData("Sets", code = 266_1033, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Crabclaw 0": KHCOMItemData("Sets", code = 266_1034, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Pumpkinhead 1-3": KHCOMItemData("Sets", code = 266_1041, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Pumpkinhead 4-6": KHCOMItemData("Sets", code = 266_1042, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Pumpkinhead 7-9": KHCOMItemData("Sets", code = 266_1043, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Pumpkinhead 0": KHCOMItemData("Sets", code = 266_1044, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fairy Harp 1-3": KHCOMItemData("Sets", code = 266_1051, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fairy Harp 4-6": KHCOMItemData("Sets", code = 266_1052, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fairy Harp 7-9": KHCOMItemData("Sets", code = 266_1053, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fairy Harp 0": KHCOMItemData("Sets", code = 266_1054, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Wishing Star 1-3": KHCOMItemData("Sets", code = 266_1061, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Wishing Star 4-6": KHCOMItemData("Sets", code = 266_1062, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Wishing Star 7-9": KHCOMItemData("Sets", code = 266_1063, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Wishing Star 0": KHCOMItemData("Sets", code = 266_1064, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Spellbinder 1-3": KHCOMItemData("Sets", code = 266_1071, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Spellbinder 4-6": KHCOMItemData("Sets", code = 266_1072, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Spellbinder 7-9": KHCOMItemData("Sets", code = 266_1073, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Spellbinder 0": KHCOMItemData("Sets", code = 266_1074, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Metal Chocobo 1-3": KHCOMItemData("Sets", code = 266_1081, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Metal Chocobo 4-6": KHCOMItemData("Sets", code = 266_1082, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Metal Chocobo 7-9": KHCOMItemData("Sets", code = 266_1083, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Metal Chocobo 0": KHCOMItemData("Sets", code = 266_1084, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Olympia 1-3": KHCOMItemData("Sets", code = 266_1091, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Olympia 4-6": KHCOMItemData("Sets", code = 266_1092, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Olympia 7-9": KHCOMItemData("Sets", code = 266_1093, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Olympia 0": KHCOMItemData("Sets", code = 266_1094, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lionheart 1-3": KHCOMItemData("Sets", code = 266_1101, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lionheart 4-6": KHCOMItemData("Sets", code = 266_1102, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lionheart 7-9": KHCOMItemData("Sets", code = 266_1103, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lionheart 0": KHCOMItemData("Sets", code = 266_1104, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lady Luck 1-3": KHCOMItemData("Sets", code = 266_1111, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lady Luck 4-6": KHCOMItemData("Sets", code = 266_1112, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lady Luck 7-9": KHCOMItemData("Sets", code = 266_1113, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Lady Luck 0": KHCOMItemData("Sets", code = 266_1114, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Divine Rose 1-3": KHCOMItemData("Sets", code = 266_1121, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Divine Rose 4-6": KHCOMItemData("Sets", code = 266_1122, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Divine Rose 7-9": KHCOMItemData("Sets", code = 266_1123, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Divine Rose 0": KHCOMItemData("Sets", code = 266_1124, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oathkeeper 1-3": KHCOMItemData("Sets", code = 266_1131, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oathkeeper 4-6": KHCOMItemData("Sets", code = 266_1132, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oathkeeper 7-9": KHCOMItemData("Sets", code = 266_1133, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oathkeeper 0": KHCOMItemData("Sets", code = 266_1134, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oblivion 1-3": KHCOMItemData("Sets", code = 266_1141, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oblivion 4-6": KHCOMItemData("Sets", code = 266_1142, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oblivion 7-9": KHCOMItemData("Sets", code = 266_1143, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Oblivion 0": KHCOMItemData("Sets", code = 266_1144, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Diamond Dust 1-3": KHCOMItemData("Sets", code = 266_1151, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Diamond Dust 4-6": KHCOMItemData("Sets", code = 266_1152, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Diamond Dust 7-9": KHCOMItemData("Sets", code = 266_1153, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Diamond Dust 0": KHCOMItemData("Sets", code = 266_1154, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "One Winged Angel 1-3": KHCOMItemData("Sets", code = 266_1161, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "One Winged Angel 4-6": KHCOMItemData("Sets", code = 266_1162, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "One Winged Angel 7-9": KHCOMItemData("Sets", code = 266_1163, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "One Winged Angel 0": KHCOMItemData("Sets", code = 266_1164, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ultima Weapon 1-3": KHCOMItemData("Sets", code = 266_1171, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ultima Weapon 4-6": KHCOMItemData("Sets", code = 266_1172, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ultima Weapon 7-9": KHCOMItemData("Sets", code = 266_1173, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ultima Weapon 0": KHCOMItemData("Sets", code = 266_1174, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fire 1-3": KHCOMItemData("Sets", code = 266_1181, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fire 4-6": KHCOMItemData("Sets", code = 266_1182, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fire 7-9": KHCOMItemData("Sets", code = 266_1183, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Fire 0": KHCOMItemData("Sets", code = 266_1184, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Blizzard 1-3": KHCOMItemData("Sets", code = 266_1191, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Blizzard 4-6": KHCOMItemData("Sets", code = 266_1192, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Blizzard 7-9": KHCOMItemData("Sets", code = 266_1193, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Blizzard 0": KHCOMItemData("Sets", code = 266_1194, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Thunder 1-3": KHCOMItemData("Sets", code = 266_1201, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Thunder 4-6": KHCOMItemData("Sets", code = 266_1202, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Thunder 7-9": KHCOMItemData("Sets", code = 266_1203, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Thunder 0": KHCOMItemData("Sets", code = 266_1204, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cure 1-3": KHCOMItemData("Sets", code = 266_1211, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cure 4-6": KHCOMItemData("Sets", code = 266_1212, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cure 7-9": KHCOMItemData("Sets", code = 266_1213, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cure 0": KHCOMItemData("Sets", code = 266_1214, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Gravity 1-3": KHCOMItemData("Sets", code = 266_1221, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Gravity 4-6": KHCOMItemData("Sets", code = 266_1222, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Gravity 7-9": KHCOMItemData("Sets", code = 266_1223, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Gravity 0": KHCOMItemData("Sets", code = 266_1224, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Stop 1-3": KHCOMItemData("Sets", code = 266_1231, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Stop 4-6": KHCOMItemData("Sets", code = 266_1232, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Stop 7-9": KHCOMItemData("Sets", code = 266_1233, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Stop 0": KHCOMItemData("Sets", code = 266_1234, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Aero 1-3": KHCOMItemData("Sets", code = 266_1241, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Aero 4-6": KHCOMItemData("Sets", code = 266_1242, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Aero 7-9": KHCOMItemData("Sets", code = 266_1243, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Aero 0": KHCOMItemData("Sets", code = 266_1244, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Simba 1-3": KHCOMItemData("Sets", code = 266_1251, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Simba 4-6": KHCOMItemData("Sets", code = 266_1252, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Simba 7-9": KHCOMItemData("Sets", code = 266_1253, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Simba 0": KHCOMItemData("Sets", code = 266_1254, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Genie 1-3": KHCOMItemData("Sets", code = 266_1261, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Genie 4-6": KHCOMItemData("Sets", code = 266_1262, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Genie 7-9": KHCOMItemData("Sets", code = 266_1263, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Genie 0": KHCOMItemData("Sets", code = 266_1264, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Bambi 1-3": KHCOMItemData("Sets", code = 266_1271, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Bambi 4-6": KHCOMItemData("Sets", code = 266_1272, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Bambi 7-9": KHCOMItemData("Sets", code = 266_1273, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Bambi 0": KHCOMItemData("Sets", code = 266_1274, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Dumbo 1-3": KHCOMItemData("Sets", code = 266_1281, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Dumbo 4-6": KHCOMItemData("Sets", code = 266_1282, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Dumbo 7-9": KHCOMItemData("Sets", code = 266_1283, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Dumbo 0": KHCOMItemData("Sets", code = 266_1284, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Tinker Bell 1-3": KHCOMItemData("Sets", code = 266_1291, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Tinker Bell 4-6": KHCOMItemData("Sets", code = 266_1292, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Tinker Bell 7-9": KHCOMItemData("Sets", code = 266_1293, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Tinker Bell 0": KHCOMItemData("Sets", code = 266_1294, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mushu 1-3": KHCOMItemData("Sets", code = 266_1301, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mushu 4-6": KHCOMItemData("Sets", code = 266_1302, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mushu 7-9": KHCOMItemData("Sets", code = 266_1303, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mushu 0": KHCOMItemData("Sets", code = 266_1304, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cloud 1-3": KHCOMItemData("Sets", code = 266_1311, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cloud 4-6": KHCOMItemData("Sets", code = 266_1312, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cloud 7-9": KHCOMItemData("Sets", code = 266_1313, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Cloud 0": KHCOMItemData("Sets", code = 266_1314, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Potion 1-3": KHCOMItemData("Sets", code = 266_1321, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Potion 4-6": KHCOMItemData("Sets", code = 266_1322, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Potion 7-9": KHCOMItemData("Sets", code = 266_1323, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Potion 0": KHCOMItemData("Sets", code = 266_1324, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Hi-Potion 1-3": KHCOMItemData("Sets", code = 266_1331, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Hi-Potion 4-6": KHCOMItemData("Sets", code = 266_1332, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Hi-Potion 7-9": KHCOMItemData("Sets", code = 266_1333, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Hi-Potion 0": KHCOMItemData("Sets", code = 266_1334, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Potion 1-3": KHCOMItemData("Sets", code = 266_1341, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Potion 4-6": KHCOMItemData("Sets", code = 266_1342, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Potion 7-9": KHCOMItemData("Sets", code = 266_1343, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Potion 0": KHCOMItemData("Sets", code = 266_1344, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ether 1-3": KHCOMItemData("Sets", code = 266_1351, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ether 4-6": KHCOMItemData("Sets", code = 266_1352, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ether 7-9": KHCOMItemData("Sets", code = 266_1353, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Ether 0": KHCOMItemData("Sets", code = 266_1354, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Ether 1-3": KHCOMItemData("Sets", code = 266_1361, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Ether 4-6": KHCOMItemData("Sets", code = 266_1362, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Ether 7-9": KHCOMItemData("Sets", code = 266_1363, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Mega-Ether 0": KHCOMItemData("Sets", code = 266_1364, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Elixir 1-3": KHCOMItemData("Sets", code = 266_1371, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Elixir 4-6": KHCOMItemData("Sets", code = 266_1372, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Elixir 7-9": KHCOMItemData("Sets", code = 266_1373, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Elixir 0": KHCOMItemData("Sets", code = 266_1374, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Megalixir 1-3": KHCOMItemData("Sets", code = 266_1381, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Megalixir 4-6": KHCOMItemData("Sets", code = 266_1382, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Megalixir 7-9": KHCOMItemData("Sets", code = 266_1383, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + "Megalixir 0": KHCOMItemData("Sets", code = 266_1384, classification = ItemClassification.filler, max_quantity = 1, weight = 10), + + #Enemy Battle Cards + "Enemy Card Shadow": KHCOMItemData("Enemy Cards", code = 266_2001, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Soldier": KHCOMItemData("Enemy Cards", code = 266_2002, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Large Body": KHCOMItemData("Enemy Cards", code = 266_2003, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Red Nocturne": KHCOMItemData("Enemy Cards", code = 266_2004, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Blue Rhapsody": KHCOMItemData("Enemy Cards", code = 266_2005, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Yellow Opera": KHCOMItemData("Enemy Cards", code = 266_2006, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Green Requiem": KHCOMItemData("Enemy Cards", code = 266_2007, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Powerwild": KHCOMItemData("Enemy Cards", code = 266_2008, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Bouncywild": KHCOMItemData("Enemy Cards", code = 266_2009, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Air Soldier": KHCOMItemData("Enemy Cards", code = 266_2010, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Bandit": KHCOMItemData("Enemy Cards", code = 266_2011, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Fat Bandit": KHCOMItemData("Enemy Cards", code = 266_2012, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Barrel Spider": KHCOMItemData("Enemy Cards", code = 266_2013, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Search Ghost": KHCOMItemData("Enemy Cards", code = 266_2014, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Sea Neon": KHCOMItemData("Enemy Cards", code = 266_2015, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Screwdiver": KHCOMItemData("Enemy Cards", code = 266_2016, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Aquatank": KHCOMItemData("Enemy Cards", code = 266_2017, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Wight Knight": KHCOMItemData("Enemy Cards", code = 266_2018, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Gargoyle": KHCOMItemData("Enemy Cards", code = 266_2019, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Pirate": KHCOMItemData("Enemy Cards", code = 266_2020, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Air Pirate": KHCOMItemData("Enemy Cards", code = 266_2021, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Darkball": KHCOMItemData("Enemy Cards", code = 266_2022, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Defender": KHCOMItemData("Enemy Cards", code = 266_2023, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Wyvern": KHCOMItemData("Enemy Cards", code = 266_2024, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Neoshadow": KHCOMItemData("Enemy Cards", code = 266_2025, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card White Mushroom": KHCOMItemData("Enemy Cards", code = 266_2026, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Black Fungus": KHCOMItemData("Enemy Cards", code = 266_2027, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Creeper Plant": KHCOMItemData("Enemy Cards", code = 266_2028, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Tornado Step": KHCOMItemData("Enemy Cards", code = 266_2029, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Crescendo": KHCOMItemData("Enemy Cards", code = 266_2030, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Guard Armor": KHCOMItemData("Enemy Cards", code = 266_2031, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Parasite Cage": KHCOMItemData("Enemy Cards", code = 266_2032, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Trickmaster": KHCOMItemData("Enemy Cards", code = 266_2033, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Darkside": KHCOMItemData("Enemy Cards", code = 266_2034, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Card Soldier (Red)": KHCOMItemData("Enemy Cards", code = 266_2035, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Card Soldier (Black)": KHCOMItemData("Enemy Cards", code = 266_2036, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Hades": KHCOMItemData("Enemy Cards", code = 266_2037, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Jafar": KHCOMItemData("Enemy Cards", code = 266_2039, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Oogie Boogie": KHCOMItemData("Enemy Cards", code = 266_2040, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Ursula": KHCOMItemData("Enemy Cards", code = 266_2041, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Hook": KHCOMItemData("Enemy Cards", code = 266_2042, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Dragon Maleficent": KHCOMItemData("Enemy Cards", code = 266_2043, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Riku": KHCOMItemData("Enemy Cards", code = 266_2044, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Larxene": KHCOMItemData("Enemy Cards", code = 266_2045, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Vexen": KHCOMItemData("Enemy Cards", code = 266_2046, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Marluxia": KHCOMItemData("Enemy Cards", code = 266_2047, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Lexaeus": KHCOMItemData("Enemy Cards", code = 266_2048, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Ansem": KHCOMItemData("Enemy Cards", code = 266_2049, classification = ItemClassification.filler, max_quantity = 1, weight = 1), + "Enemy Card Axel": KHCOMItemData("Enemy Cards", code = 266_2050, classification = ItemClassification.filler, max_quantity = 1, weight = 1), - #Enemy Battle Cards - "Enemy Card Shadow": KHCOMItemData("Filler", 266_2001, ItemClassification.filler, weight=5), - "Enemy Card Soldier": KHCOMItemData("Filler", 266_2002, ItemClassification.filler, weight=5), - "Enemy Card Large Body": KHCOMItemData("Filler", 266_2003, ItemClassification.filler, weight=5), - "Enemy Card Red Nocturne": KHCOMItemData("Filler", 266_2004, ItemClassification.filler, weight=5), - "Enemy Card Blue Rhapsody": KHCOMItemData("Filler", 266_2005, ItemClassification.filler, weight=5), - "Enemy Card Yellow Opera": KHCOMItemData("Filler", 266_2006, ItemClassification.filler, weight=5), - "Enemy Card Green Requiem": KHCOMItemData("Filler", 266_2007, ItemClassification.filler, weight=5), - "Enemy Card Powerwild": KHCOMItemData("Filler", 266_2008, ItemClassification.filler, weight=5), - "Enemy Card Bouncywild": KHCOMItemData("Filler", 266_2009, ItemClassification.filler, weight=5), - "Enemy Card Air Soldier": KHCOMItemData("Filler", 266_2010, ItemClassification.filler, weight=5), - "Enemy Card Bandit": KHCOMItemData("Filler", 266_2011, ItemClassification.filler, weight=5), - "Enemy Card Fat Bandit": KHCOMItemData("Filler", 266_2012, ItemClassification.filler, weight=5), - "Enemy Card Barrel Spider": KHCOMItemData("Filler", 266_2013, ItemClassification.filler, weight=5), - "Enemy Card Search Ghost": KHCOMItemData("Filler", 266_2014, ItemClassification.filler, weight=5), - "Enemy Card Sea Neon": KHCOMItemData("Filler", 266_2015, ItemClassification.filler, weight=5), - "Enemy Card Screwdiver": KHCOMItemData("Filler", 266_2016, ItemClassification.filler, weight=5), - "Enemy Card Aquatank": KHCOMItemData("Filler", 266_2017, ItemClassification.filler, weight=5), - "Enemy Card Wight Knight": KHCOMItemData("Filler", 266_2018, ItemClassification.filler, weight=5), - "Enemy Card Gargoyle": KHCOMItemData("Filler", 266_2019, ItemClassification.filler, weight=5), - "Enemy Card Pirate": KHCOMItemData("Filler", 266_2020, ItemClassification.filler, weight=5), - "Enemy Card Air Pirate": KHCOMItemData("Filler", 266_2021, ItemClassification.filler, weight=5), - "Enemy Card Darkball": KHCOMItemData("Filler", 266_2022, ItemClassification.filler, weight=5), - "Enemy Card Defender": KHCOMItemData("Filler", 266_2023, ItemClassification.filler, weight=5), - "Enemy Card Wyvern": KHCOMItemData("Filler", 266_2024, ItemClassification.filler, weight=5), - "Enemy Card Neoshadow": KHCOMItemData("Filler", 266_2025, ItemClassification.filler, weight=5), - "Enemy Card White Mushroom": KHCOMItemData("Filler", 266_2026, ItemClassification.filler, weight=5), - "Enemy Card Black Fungus": KHCOMItemData("Filler", 266_2027, ItemClassification.filler, weight=5), - "Enemy Card Creeper Plant": KHCOMItemData("Filler", 266_2028, ItemClassification.filler, weight=5), - "Enemy Card Tornado Step": KHCOMItemData("Filler", 266_2029, ItemClassification.filler, weight=5), - "Enemy Card Crescendo": KHCOMItemData("Filler", 266_2030, ItemClassification.filler, weight=5), - "Enemy Card Guard Armor": KHCOMItemData("Filler", 266_2031, ItemClassification.filler, weight=5), - "Enemy Card Parasite Cage": KHCOMItemData("Filler", 266_2032, ItemClassification.filler, weight=5), - "Enemy Card Trickmaster": KHCOMItemData("Filler", 266_2033, ItemClassification.filler, weight=5), - "Enemy Card Darkside": KHCOMItemData("Filler", 266_2034, ItemClassification.filler, weight=5), - "Enemy Card Card Soldier (Red)": KHCOMItemData("Filler", 266_2035, ItemClassification.filler, weight=5), - "Enemy Card Card Soldier (Black)": KHCOMItemData("Filler", 266_2036, ItemClassification.filler, weight=5), - "Enemy Card Hades": KHCOMItemData("Filler", 266_2037, ItemClassification.filler, weight=5), - "Enemy Card Jafar": KHCOMItemData("Filler", 266_2039, ItemClassification.filler, weight=5), - "Enemy Card Oogie Boogie": KHCOMItemData("Filler", 266_2040, ItemClassification.filler, weight=5), - "Enemy Card Ursula": KHCOMItemData("Filler", 266_2041, ItemClassification.filler, weight=5), - "Enemy Card Hook": KHCOMItemData("Filler", 266_2042, ItemClassification.filler, weight=5), - "Enemy Card Dragon Maleficent": KHCOMItemData("Filler", 266_2043, ItemClassification.filler, weight=5), - "Enemy Card Riku": KHCOMItemData("Filler", 266_2044, ItemClassification.filler, weight=5), - "Enemy Card Larxene": KHCOMItemData("Filler", 266_2045, ItemClassification.filler, weight=5), - "Enemy Card Vexen": KHCOMItemData("Filler", 266_2046, ItemClassification.filler, weight=5), - "Enemy Card Marluxia": KHCOMItemData("Filler", 266_2047, ItemClassification.filler, weight=5), - "Enemy Card Lexaeus": KHCOMItemData("Filler", 266_2048, ItemClassification.filler, weight=5), - "Enemy Card Ansem": KHCOMItemData("Filler", 266_2049, ItemClassification.filler, weight=5), - "Enemy Card Axel": KHCOMItemData("Filler", 266_2050, ItemClassification.filler, weight=5), - - #Gold Map Cards - #"Key of Beginnings F01": KHCOMItemData("Gold Map Cards", 266_3001, ItemClassification.progression, 1, 1), - #"Key of Beginnings F02": KHCOMItemData("Gold Map Cards", 266_3002, ItemClassification.progression, 1, 1), - #"Key of Beginnings F03": KHCOMItemData("Gold Map Cards", 266_3003, ItemClassification.progression, 1, 1), - #"Key of Beginnings F04": KHCOMItemData("Gold Map Cards", 266_3004, ItemClassification.progression, 1, 1), - #"Key of Beginnings F05": KHCOMItemData("Gold Map Cards", 266_3005, ItemClassification.progression, 1, 1), - #"Key of Beginnings F06": KHCOMItemData("Gold Map Cards", 266_3006, ItemClassification.progression, 1, 1), - #"Key of Beginnings F07": KHCOMItemData("Gold Map Cards", 266_3007, ItemClassification.progression, 1, 1), - #"Key of Beginnings F08": KHCOMItemData("Gold Map Cards", 266_3008, ItemClassification.progression, 1, 1), - #"Key of Beginnings F09": KHCOMItemData("Gold Map Cards", 266_3009, ItemClassification.progression, 1, 1), - #"Key of Beginnings F10": KHCOMItemData("Gold Map Cards", 266_3010, ItemClassification.progression, 1, 1), - #"Key of Beginnings F11": KHCOMItemData("Gold Map Cards", 266_3011, ItemClassification.progression, 1, 1), - #"Key of Beginnings F12": KHCOMItemData("Gold Map Cards", 266_3012, ItemClassification.progression, 1, 1), - #"Key of Beginnings F13": KHCOMItemData("Gold Map Cards", 266_3013, ItemClassification.progression, 1, 1), - #"Key of Guidance F01": KHCOMItemData("Gold Map Cards", 266_3101, ItemClassification.progression, 1, 1), - #"Key of Guidance F02": KHCOMItemData("Gold Map Cards", 266_3102, ItemClassification.progression, 1, 1), - #"Key of Guidance F03": KHCOMItemData("Gold Map Cards", 266_3103, ItemClassification.progression, 1, 1), - #"Key of Guidance F04": KHCOMItemData("Gold Map Cards", 266_3104, ItemClassification.progression, 1, 1), - #"Key of Guidance F05": KHCOMItemData("Gold Map Cards", 266_3105, ItemClassification.progression, 1, 1), - #"Key of Guidance F06": KHCOMItemData("Gold Map Cards", 266_3106, ItemClassification.progression, 1, 1), - #"Key of Guidance F07": KHCOMItemData("Gold Map Cards", 266_3107, ItemClassification.progression, 1, 1), - #"Key of Guidance F08": KHCOMItemData("Gold Map Cards", 266_3108, ItemClassification.progression, 1, 1), - #"Key of Guidance F09": KHCOMItemData("Gold Map Cards", 266_3109, ItemClassification.progression, 1, 1), - #"Key of Guidance F12": KHCOMItemData("Gold Map Cards", 266_3112, ItemClassification.progression, 1, 1), - #"Key to Truth F01": KHCOMItemData("Gold Map Cards", 266_3201, ItemClassification.progression, 1, 1), - #"Key to Truth F02": KHCOMItemData("Gold Map Cards", 266_3202, ItemClassification.progression, 1, 1), - #"Key to Truth F03": KHCOMItemData("Gold Map Cards", 266_3203, ItemClassification.progression, 1, 1), - #"Key to Truth F04": KHCOMItemData("Gold Map Cards", 266_3204, ItemClassification.progression, 1, 1), - #"Key to Truth F05": KHCOMItemData("Gold Map Cards", 266_3205, ItemClassification.progression, 1, 1), - #"Key to Truth F06": KHCOMItemData("Gold Map Cards", 266_3206, ItemClassification.progression, 1, 1), - #"Key to Truth F07": KHCOMItemData("Gold Map Cards", 266_3207, ItemClassification.progression, 1, 1), - #"Key to Truth F08": KHCOMItemData("Gold Map Cards", 266_3208, ItemClassification.progression, 1, 1), - #"Key to Truth F09": KHCOMItemData("Gold Map Cards", 266_3209, ItemClassification.progression, 1, 1), - "World Card Wonderland": KHCOMItemData("World Unlocks" , 266_3002, ItemClassification.progression, 1, 1), - "World Card Olympus Coliseum": KHCOMItemData("World Unlocks" , 266_3003, ItemClassification.progression, 1, 1), - "World Card Monstro": KHCOMItemData("World Unlocks" , 266_3004, ItemClassification.progression, 1, 1), - "World Card Agrabah": KHCOMItemData("World Unlocks" , 266_3005, ItemClassification.progression, 1, 1), - "World Card Halloween Town": KHCOMItemData("World Unlocks" , 266_3006, ItemClassification.progression, 1, 1), - "World Card Atlantica": KHCOMItemData("World Unlocks" , 266_3007, ItemClassification.progression, 1, 1), - "World Card Neverland": KHCOMItemData("World Unlocks" , 266_3008, ItemClassification.progression, 1, 1), - "World Card Hollow Bastion": KHCOMItemData("World Unlocks" , 266_3009, ItemClassification.progression, 1, 1), - "World Card 100 Acre Wood": KHCOMItemData("World Unlocks" , 266_3010, ItemClassification.progression, 1, 1), - "World Card Twilight Town": KHCOMItemData("World Unlocks" , 266_3011, ItemClassification.progression, 1, 1), - "World Card Destiny Islands": KHCOMItemData("World Unlocks" , 266_3012, ItemClassification.progression, 1, 1), - "World Card Castle Oblivion": KHCOMItemData("World Unlocks" , 266_3013, ItemClassification.progression, 1, 1), - "Key to Rewards Traverse Town": KHCOMItemData("Gold Map Cards", 266_3301, ItemClassification.progression, 1, 1), - "Key to Rewards Wonderland": KHCOMItemData("Gold Map Cards", 266_3302, ItemClassification.useful, 1, 1), - "Key to Rewards Olympus Coliseum": KHCOMItemData("Gold Map Cards", 266_3303, ItemClassification.progression, 1, 1), - "Key to Rewards Monstro": KHCOMItemData("Gold Map Cards", 266_3304, ItemClassification.useful, 1, 1), - "Key to Rewards Agrabah": KHCOMItemData("Gold Map Cards", 266_3305, ItemClassification.useful, 1, 1), - "Key to Rewards Halloween Town": KHCOMItemData("Gold Map Cards", 266_3306, ItemClassification.useful, 1, 1), - "Key to Rewards Atlantica": KHCOMItemData("Gold Map Cards", 266_3307, ItemClassification.useful, 1, 1), - "Key to Rewards Neverland": KHCOMItemData("Gold Map Cards", 266_3308, ItemClassification.useful, 1, 1), - "Key to Rewards Hollow Bastion": KHCOMItemData("Gold Map Cards", 266_3309, ItemClassification.progression, 1, 1), - "Key to Rewards Twilight Town": KHCOMItemData("Gold Map Cards", 266_3311, ItemClassification.useful, 1, 1), - "Key to Rewards Destiny Island": KHCOMItemData("Gold Map Cards", 266_3312, ItemClassification.progression, 1, 1), - "Key to Rewards Castle Oblivion": KHCOMItemData("Gold Map Cards", 266_3313, ItemClassification.useful, 1, 1), + "World Card Wonderland": KHCOMItemData("World Unlocks" , code = 266_3002, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Olympus Coliseum": KHCOMItemData("World Unlocks" , code = 266_3003, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Monstro": KHCOMItemData("World Unlocks" , code = 266_3004, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Agrabah": KHCOMItemData("World Unlocks" , code = 266_3005, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Halloween Town": KHCOMItemData("World Unlocks" , code = 266_3006, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Atlantica": KHCOMItemData("World Unlocks" , code = 266_3007, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Neverland": KHCOMItemData("World Unlocks" , code = 266_3008, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Hollow Bastion": KHCOMItemData("World Unlocks" , code = 266_3009, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card 100 Acre Wood": KHCOMItemData("World Unlocks" , code = 266_3010, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Twilight Town": KHCOMItemData("World Unlocks" , code = 266_3011, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Destiny Islands": KHCOMItemData("World Unlocks" , code = 266_3012, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "World Card Castle Oblivion": KHCOMItemData("World Unlocks" , code = 266_3013, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Key to Rewards Traverse Town": KHCOMItemData("Gold Map Cards", code = 266_3301, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Key to Rewards Wonderland": KHCOMItemData("Gold Map Cards", code = 266_3302, classification = ItemClassification.useful, max_quantity = 1, weight = 1), + "Key to Rewards Olympus Coliseum": KHCOMItemData("Gold Map Cards", code = 266_3303, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Key to Rewards Monstro": KHCOMItemData("Gold Map Cards", code = 266_3304, classification = ItemClassification.useful, max_quantity = 1, weight = 1), + "Key to Rewards Agrabah": KHCOMItemData("Gold Map Cards", code = 266_3305, classification = ItemClassification.useful, max_quantity = 1, weight = 1), + "Key to Rewards Halloween Town": KHCOMItemData("Gold Map Cards", code = 266_3306, classification = ItemClassification.useful, max_quantity = 1, weight = 1), + "Key to Rewards Atlantica": KHCOMItemData("Gold Map Cards", code = 266_3307, classification = ItemClassification.useful, max_quantity = 1, weight = 1), + "Key to Rewards Neverland": KHCOMItemData("Gold Map Cards", code = 266_3308, classification = ItemClassification.useful, max_quantity = 1, weight = 1), + "Key to Rewards Hollow Bastion": KHCOMItemData("Gold Map Cards", code = 266_3309, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Key to Rewards Twilight Town": KHCOMItemData("Gold Map Cards", code = 266_3311, classification = ItemClassification.useful, max_quantity = 1, weight = 1), + "Key to Rewards Destiny Island": KHCOMItemData("Gold Map Cards", code = 266_3312, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Key to Rewards Castle Oblivion": KHCOMItemData("Gold Map Cards", code = 266_3313, classification = ItemClassification.useful, max_quantity = 1, weight = 1), #Friend Cards - "Friend Card Donald": KHCOMItemData("Friend Cards", 266_5001, ItemClassification.progression, 1, 1), - "Friend Card Goofy": KHCOMItemData("Friend Cards", 266_5002, ItemClassification.progression, 1, 1), - "Friend Card Aladdin": KHCOMItemData("Friend Cards", 266_5003, ItemClassification.progression, 1, 1), - "Friend Card Ariel": KHCOMItemData("Friend Cards", 266_5004, ItemClassification.progression, 1, 1), - "Friend Card Beast": KHCOMItemData("Friend Cards", 266_5005, ItemClassification.progression, 1, 1), - "Friend Card Peter Pan": KHCOMItemData("Friend Cards", 266_5006, ItemClassification.progression, 1, 1), - "Friend Card Jack": KHCOMItemData("Friend Cards", 266_5007, ItemClassification.progression, 1, 1), + "Friend Card Donald": KHCOMItemData("Friend Cards", code = 266_5001, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Friend Card Goofy": KHCOMItemData("Friend Cards", code = 266_5002, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Friend Card Aladdin": KHCOMItemData("Friend Cards", code = 266_5003, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Friend Card Ariel": KHCOMItemData("Friend Cards", code = 266_5004, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Friend Card Beast": KHCOMItemData("Friend Cards", code = 266_5005, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Friend Card Peter Pan": KHCOMItemData("Friend Cards", code = 266_5006, classification = ItemClassification.progression, max_quantity = 1, weight = 1), + "Friend Card Jack": KHCOMItemData("Friend Cards", code = 266_5007, classification = ItemClassification.progression, max_quantity = 1, weight = 1), } event_item_table: Dict[str, KHCOMItemData] = { diff --git a/worlds/khcom/Options.py b/worlds/khcom/Options.py index 7a3494400b62..2de7f228e790 100644 --- a/worlds/khcom/Options.py +++ b/worlds/khcom/Options.py @@ -4,11 +4,49 @@ class PrioritizeBosses(Toggle): """ - Should boss location prioritize holding friend cards? + Should boss location prioritize holding progression items? """ - display_name = "Friend Cards Prioritized to Bosses" + display_name = "Progression Items Prioritized to Bosses" +class PacksOrSets(Choice): + """ + Packs contain cards that are randomized upon receipt at the lua script level + Sets are static card sets (i.e. You received Lady Luck 4-6) + """ + display_name = "Packs or Sets" + option_sets = 1 + option_packs = 2 + default = 1 + +class Zeroes(Toggle): + """ + Toggle whether 0's should be included. Does nothing if you are using card packs + """ + display_name = "Zeroes" + +class Cure(Toggle): + """ + Toggle whether Cure cards should be included. Does nothing if you are using card packs + """ + display_name = "Cure" + +class EarlyCure(Toggle): + """ + Should one of the starting checks contain Cure 4-6? + """ + display_name = "Early Cure" + +class EnemyCards(Toggle): + """ + Should enemy cards be shuffled into the pool? + """ + display_name = "Enemy Cards" khcom_options: Dict[str, type(Option)] = { "prioritize_bosses": PrioritizeBosses, + "packs_or_sets": PacksOrSets, + "zeroes": Zeroes, + "cure": Cure, + "early_cure": EarlyCure, + "enemy_cards": EnemyCards, } diff --git a/worlds/khcom/__init__.py b/worlds/khcom/__init__.py index 969642b7a219..2289f1fd111f 100644 --- a/worlds/khcom/__init__.py +++ b/worlds/khcom/__init__.py @@ -56,34 +56,52 @@ def fill_slot_data(self) -> dict: def create_items(self): item_pool: List[KHCOMItem] = [] starting_locations = get_locations_by_category("Starting") - starting_locations = random.sample(list(starting_locations.keys()),7) - starting_worlds = get_items_by_category("World Unlocks") + starting_locations = random.sample(list(starting_locations.keys()),8) + starting_worlds = get_items_by_category("World Unlocks", []) starting_worlds = random.sample(list(starting_worlds.keys()),3) i = 0 - while i < 7: + while i < 8: if i < 3: self.multiworld.get_location(starting_locations[i], self.player).place_locked_item(self.create_item(starting_worlds[i])) - else: - self.multiworld.get_location(starting_locations[i], self.player).place_locked_item(self.create_item("Bronze Card Pack")) + elif i < 7: + if self.get_setting("packs_or_sets") == "packs": + self.multiworld.get_location(starting_locations[i], self.player).place_locked_item(self.create_item("Bronze Card Pack")) + elif self.get_setting("early_cure"): + self.multiworld.get_location(starting_locations[i], self.player).place_locked_item(self.create_item("Cure 4-6")) i = i + 1 total_locations = len(self.multiworld.get_unfilled_locations(self.player)) for name, data in item_table.items(): quantity = data.max_quantity # Ignore filler, it will be added in a later stage. - if data.category == "Filler": + if data.category not in ["World Unlocks", "Gold Map Cards", "Friend Cards"]: continue if name not in starting_worlds: item_pool += [self.create_item(name) for _ in range(0, quantity)] # Fill any empty locations with filler items. + item_names = [] while len(item_pool) < total_locations: - item_pool.append(self.create_item(self.get_filler_item_name())) + item_name = self.get_filler_item_name() + if item_name not in item_names or "Pack" in item_name: + item_names.append(item_name) + item_pool.append(self.create_item(item_name)) self.multiworld.itempool += item_pool def get_filler_item_name(self) -> str: - fillers = get_items_by_category("Filler") + fillers = {} + disclude = [] + if not self.get_setting("zeroes"): + disclude.append("0") + if not self.get_setting("cure"): + disclude.append("Cure") + if self.get_setting("enemy_cards"): + fillers.update(get_items_by_category("Enemy Cards", disclude)) + if self.get_setting("packs_or_sets") == "packs": + fillers.update(get_items_by_category("Packs", disclude)) + elif self.get_setting("packs_or_sets") == "sets": + fillers.update(get_items_by_category("Sets", disclude)) weights = [data.weight for data in fillers.values()] return self.multiworld.random.choices([filler for filler in fillers.keys()], weights, k=1)[0] From 321824241b808d298a48cbb06eca9fb6f53642df Mon Sep 17 00:00:00 2001 From: gaithern Date: Mon, 20 Nov 2023 23:15:07 -0600 Subject: [PATCH 2/3] Fixing some options/web stuff --- worlds/khcom/Options.py | 10 +++++----- .../docs/en_Kingdom Hearts Chain of Memories.md | 16 +++++++--------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/worlds/khcom/Options.py b/worlds/khcom/Options.py index 2de7f228e790..8330d130aea5 100644 --- a/worlds/khcom/Options.py +++ b/worlds/khcom/Options.py @@ -2,7 +2,7 @@ from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionSet -class PrioritizeBosses(Toggle): +class PrioritizeBosses(DefaultOnToggle): """ Should boss location prioritize holding progression items? """ @@ -18,25 +18,25 @@ class PacksOrSets(Choice): option_packs = 2 default = 1 -class Zeroes(Toggle): +class Zeroes(DefaultOnToggle): """ Toggle whether 0's should be included. Does nothing if you are using card packs """ display_name = "Zeroes" -class Cure(Toggle): +class Cure(DefaultOnToggle): """ Toggle whether Cure cards should be included. Does nothing if you are using card packs """ display_name = "Cure" -class EarlyCure(Toggle): +class EarlyCure(DefaultOnToggle): """ Should one of the starting checks contain Cure 4-6? """ display_name = "Early Cure" -class EnemyCards(Toggle): +class EnemyCards(DefaultOnToggle): """ Should enemy cards be shuffled into the pool? """ diff --git a/worlds/khcom/docs/en_Kingdom Hearts Chain of Memories.md b/worlds/khcom/docs/en_Kingdom Hearts Chain of Memories.md index e4290d7f5a5b..f295aa6a4014 100644 --- a/worlds/khcom/docs/en_Kingdom Hearts Chain of Memories.md +++ b/worlds/khcom/docs/en_Kingdom Hearts Chain of Memories.md @@ -7,15 +7,11 @@ configure and export a config file. ## What does randomization do to this game? -The Kingdom Hearts Chain of Memories Randomizer will take removes cards you pick up in the overworld, moogle shops, and as rewards from boss battles and sends the event as a check. +The Kingdom Hearts Chain of Memories Randomizer will take removes cards you pick up in the overworld, moogle shops, and as rewards from boss battles. -The first time you acquire a card in any way listed above for the first time, you or another player will receive an item. +Journal entries are checks, including story, enemy, and battle card entries. -Locations where you receive a Key of Beginnings, Key of Guidance, or Key to Truth are also checks. - -Key of Beginnings, Key of Guidance, Key to Truth, and Key of Rewards are now all assigned floors, meaning you can have a Key of Beginnings for Floor 5 but not Floor 8 for example. - -The entire castle is open from the start after completing Traverse Town. Floors for which you do not have the Key of Beginnings for are assigned Traverse Town, otherwise they will be assigned normally. +The entire castle is open from the start after completing Traverse Town. Floors you haven't unlocked are assigned Traverse Town, otherwise they will be assigned normally. You start with Key of Beginnings, Key of Guidance, and Key to Truth for Floor 1 in your inventory. @@ -23,9 +19,11 @@ Your goal is find all 7 friend cards (Aladdin, Ariel, Beast, Donald, Goofy, Jack ## What items and locations get shuffled? -In addition to the Key of Beginnings, Key of Guidance, Key to Truth, and Key to Rewards for each floor, card packs are shuffled into the item pool. +In addition to the unlocks for each floor, card packs or card sets are shuffled into the item pool. + +Card sets are comprised of a card type and a value range. For example, you might receive Blizzard 4-6, which means you receive Blizzard 4, Blizzard 5, and Blizzard 6. -Card packs are the only way to receive cards in the randomizer and come in three varieties: +Card packs are the other way to receive cards in the randomizer and come in three varieties: Bronze From f2ecf87ee3d30bac72f64d01b16d84338b4b3ffc Mon Sep 17 00:00:00 2001 From: gaithern Date: Tue, 21 Nov 2023 22:56:00 -0600 Subject: [PATCH 3/3] Fixed a bug where generation would hang if there are not enough filler items --- worlds/khcom/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/worlds/khcom/__init__.py b/worlds/khcom/__init__.py index 2289f1fd111f..7ef7e57a6c76 100644 --- a/worlds/khcom/__init__.py +++ b/worlds/khcom/__init__.py @@ -81,11 +81,18 @@ def create_items(self): # Fill any empty locations with filler items. item_names = [] + attempts = 0 #If we ever try to add items 200 times, and all the items are used up, lets clear the item_names array, we probably don't have enough items while len(item_pool) < total_locations: item_name = self.get_filler_item_name() if item_name not in item_names or "Pack" in item_name: item_names.append(item_name) item_pool.append(self.create_item(item_name)) + attempts = 0 + elif attempts >= 200: + item_names = [] + attempts = 0 + else: + attempts = attempts + 1 self.multiworld.itempool += item_pool