diff --git a/data/lua/connector_khcom.lua b/data/lua/connector_khcom.lua index 751702610021..9b932d35610c 100644 --- a/data/lua/connector_khcom.lua +++ b/data/lua/connector_khcom.lua @@ -2,181 +2,110 @@ console.clear() math.randomseed(os.time()) client_communication_path = os.getenv('LOCALAPPDATA') .. "\\KHCOM\\" -function define_location_ids() - location_ids = {} - location_ids["Kingdom Key"] = 2670106 - location_ids["Three Wishes"] = 2670505 - location_ids["Crabclaw"] = 2670703 - location_ids["Pumpkinhead"] = 2670603 - location_ids["Fairy Harp"] = 2670803 - location_ids["Wishing Star"] = 2670406 - location_ids["Spellbinder"] = 2671002 - location_ids["Metal Chocobo"] = 2670309 - location_ids["Olympia"] = 2670304 - location_ids["Lionheart"] = 2670116 - location_ids["Lady Luck"] = 2670207 - location_ids["Divine Rose"] = 2670903 - location_ids["Oathkeeper"] = 2671203 - location_ids["Oblivion"] = 2671204 - location_ids["Diamond Dust"] = 2671304 - location_ids["One Winged Angel"] = 2671305 - location_ids["Fire"] = 2670112 - location_ids["Blizzard"] = 2670103 - location_ids["Thunder"] = 2670605 - location_ids["Cure"] = 2670105 - location_ids["Gravity"] = 2670501 - location_ids["Stop"] = 2670201 - location_ids["Aero"] = 2670707 - location_ids["Simba"] = 2670114 - location_ids["Genie"] = 2670509 - location_ids["Bambi"] = 2671001 - location_ids["Dumbo"] = 2670411 - location_ids["Tinker Bell"] = 2670808 - location_ids["Mushu"] = 2670908 - location_ids["Cloud"] = 2670310 - location_ids["Potion"] = 2670107 - location_ids["Hi-Potion"] = 2670308 - location_ids["Mega-Potion"] = 2671102 - location_ids["Ether"] = 2670508 - location_ids["Mega-Ether"] = 2671003 - location_ids["Elixir"] = 2671004 - location_ids["Megalixir"] = 2671208 - location_ids["Guard Armor"] = 2670117 - location_ids["Parasite Cage"] = 2670410 - location_ids["Trickmaster"] = 2670211 - location_ids["Darkside"] = 2671207 - location_ids["Card Soldier (Red)"] = 2670209 - location_ids["Hades"] = 2670311 - location_ids["Jafar"] = 2670510 - location_ids["Oogie Boogie"] = 2670608 - location_ids["Ursula"] = 2670710 - location_ids["Hook"] = 2670807 - location_ids["Dragon Maleficent"] = 2670909 - location_ids["Riku"] = 2671205 - location_ids["Axel"] = 2671306 - location_ids["Larxene"] = 2671202 - location_ids["Vexen"] = 2671103 - location_ids["Marluxia"] = 2671303 - location_ids["Shadow"] = 2670109 - location_ids["Soldier"] = 2670110 - location_ids["Large Body"] = 2670206 - location_ids["Red Nocturne"] = 2670108 - location_ids["Blue Rhapsody"] = 2670104 - location_ids["Yellow Opera"] = 2670407 - location_ids["Green Requiem"] = 2670403 - location_ids["Powerwild"] = 2670305 - location_ids["Bouncywild"] = 2670303 - location_ids["Air Soldier"] = 2670402 - location_ids["Bandit"] = 2670503 - location_ids["Fat Bandit"] = 2670504 - location_ids["Barrel Spider"] = 2670302 - location_ids["Search Ghost"] = 2670404 - location_ids["Sea Neon"] = 2670706 - location_ids["Screwdriver"] = 2670705 - location_ids["Aquatank"] = 2670702 - location_ids["Wight Knight"] = 2670604 - location_ids["Gargoyle"] = 2670602 - location_ids["Pirate"] = 2670804 - location_ids["Air Pirate"] = 2670802 - location_ids["Darkball"] = 2670704 - location_ids["Defender"] = 2670902 - location_ids["Wyvern"] = 2670905 - location_ids["Neoshadow"] = 2671302 - location_ids["White Mushroom"] = 2670111 - location_ids["Black Fungus"] = 2670102 - location_ids["Creeper Plant"] = 2670204 - location_ids["Tornado Step"] = 2670405 - location_ids["Crescendo"] = 2670205 - location_ids["Wizard"] = 2670904 - location_ids["Card Soldier (Black)"] = 2670203 - location_ids["Key of Beginnings F01"] = 2670101 - location_ids["Key of Beginnings F02"] = 2670202 - location_ids["Key of Beginnings F03"] = 2670301 - location_ids["Key of Beginnings F04"] = 2670401 - location_ids["Key of Beginnings F05"] = 2670502 - location_ids["Key of Beginnings F06"] = 2670601 - location_ids["Key of Beginnings F07"] = 2670701 - location_ids["Key of Beginnings F08"] = 2670801 - location_ids["Key of Beginnings F09"] = 2670901 - location_ids["Key of Beginnings F11"] = 2671101 - location_ids["Key of Beginnings F12"] = 2671201 - location_ids["Key of Beginnings F13"] = 2671301 - location_ids["Key of Guidance F01"] = 2670113 - location_ids["Key of Guidance F02"] = 2670208 - location_ids["Key of Guidance F03"] = 2670306 - location_ids["Key of Guidance F04"] = 2670408 - location_ids["Key of Guidance F05"] = 2670506 - location_ids["Key of Guidance F06"] = 2670606 - location_ids["Key of Guidance F07"] = 2670708 - location_ids["Key of Guidance F08"] = 2670805 - location_ids["Key of Guidance F09"] = 2670906 - location_ids["Key of Guidance F12"] = 2671206 - location_ids["Key to Truth F01"] = 2670115 - location_ids["Key to Truth F02"] = 2670210 - location_ids["Key to Truth F03"] = 2670307 - location_ids["Key to Truth F04"] = 2670409 - location_ids["Key to Truth F05"] = 2670507 - location_ids["Key to Truth F06"] = 2670607 - location_ids["Key to Truth F07"] = 2670709 - location_ids["Key to Truth F08"] = 2670806 - location_ids["Key to Truth F09"] = 2670907 - return location_ids -end - function define_item_ids() item_ids = {} - item_ids["Bronze Card Pack"] = 2661001 - item_ids["Silver Card Pack"] = 2661002 - item_ids["Gold Card Pack"] = 2661003 - item_ids["Key of Beginnings F02"] = 2663002 - item_ids["Key of Beginnings F03"] = 2663003 - item_ids["Key of Beginnings F04"] = 2663004 - item_ids["Key of Beginnings F05"] = 2663005 - item_ids["Key of Beginnings F06"] = 2663006 - item_ids["Key of Beginnings F07"] = 2663007 - item_ids["Key of Beginnings F08"] = 2663008 - item_ids["Key of Beginnings F09"] = 2663009 - item_ids["Key of Beginnings F10"] = 2663010 - item_ids["Key of Beginnings F11"] = 2663011 - item_ids["Key of Beginnings F12"] = 2663012 - item_ids["Key of Beginnings F13"] = 2663013 - item_ids["Key of Guidance F02"] = 2663102 - item_ids["Key of Guidance F03"] = 2663103 - item_ids["Key of Guidance F04"] = 2663104 - item_ids["Key of Guidance F05"] = 2663105 - item_ids["Key of Guidance F06"] = 2663106 - item_ids["Key of Guidance F07"] = 2663107 - item_ids["Key of Guidance F08"] = 2663108 - item_ids["Key of Guidance F09"] = 2663109 - item_ids["Key of Guidance F12"] = 2663112 - item_ids["Key to Truth F02"] = 2663202 - item_ids["Key to Truth F03"] = 2663203 - item_ids["Key to Truth F04"] = 2663204 - item_ids["Key to Truth F05"] = 2663205 - item_ids["Key to Truth F06"] = 2663206 - item_ids["Key to Truth F07"] = 2663207 - item_ids["Key to Truth F08"] = 2663208 - item_ids["Key to Truth F09"] = 2663209 - item_ids["Key to Rewards F01"] = 2663301 - item_ids["Key to Rewards F02"] = 2663302 - item_ids["Key to Rewards F03"] = 2663303 - item_ids["Key to Rewards F04"] = 2663304 - item_ids["Key to Rewards F05"] = 2663305 - item_ids["Key to Rewards F06"] = 2663306 - item_ids["Key to Rewards F07"] = 2663307 - item_ids["Key to Rewards F08"] = 2663308 - item_ids["Key to Rewards F09"] = 2663309 - item_ids["Key to Rewards F11"] = 2663311 - item_ids["Key to Rewards F12"] = 2663312 - item_ids["Key to Rewards F13"] = 2663313 - item_ids["Donald"] = 2665001 - item_ids["Goofy"] = 2665002 - item_ids["Aladdin"] = 2665003 - item_ids["Ariel"] = 2665004 - item_ids["Beast"] = 2665005 - item_ids["Peter Pan"] = 2665006 - item_ids["Jack"] = 2665007 - item_ids["Progressive Warp"] = 2666001 + item_ids["Bronze Card Pack"] = 2661001 + item_ids["Silver Card Pack"] = 2661002 + item_ids["Gold Card Pack"] = 2661003 + + item_ids["Enemy Card Shadow"] = 2662001 + item_ids["Enemy Card Soldier"] = 2662002 + item_ids["Enemy Card Large Body"] = 2662003 + item_ids["Enemy Card Red Nocturne"] = 2662004 + item_ids["Enemy Card Blue Rhapsody"] = 2662005 + item_ids["Enemy Card Yellow Opera"] = 2662006 + item_ids["Enemy Card Green Requiem"] = 2662007 + item_ids["Enemy Card Powerwild"] = 2662008 + item_ids["Enemy Card Bouncywild"] = 2662009 + item_ids["Enemy Card Air Soldier"] = 2662010 + item_ids["Enemy Card Bandit"] = 2662011 + item_ids["Enemy Card Fat Bandit"] = 2662012 + item_ids["Enemy Card Barrel Spider"] = 2662013 + item_ids["Enemy Card Search Ghost"] = 2662014 + item_ids["Enemy Card Sea Neon"] = 2662015 + item_ids["Enemy Card Screwdriver"] = 2662016 + item_ids["Enemy Card Aquatank"] = 2662017 + item_ids["Enemy Card Wight Knight"] = 2662018 + item_ids["Enemy Card Gargoyle"] = 2662019 + item_ids["Enemy Card Pirate"] = 2662020 + item_ids["Enemy Card Air Pirate"] = 2662021 + item_ids["Enemy Card Darkball"] = 2662022 + item_ids["Enemy Card Defender"] = 2662023 + item_ids["Enemy Card Wyvern"] = 2662024 + item_ids["Enemy Card Neoshadow"] = 2662025 + item_ids["Enemy Card White Mushroom"] = 2662026 + item_ids["Enemy Card Black Fungus"] = 2662027 + item_ids["Enemy Card Creeper Plant"] = 2662028 + item_ids["Enemy Card Tornado Step"] = 2662029 + item_ids["Enemy Card Crescendo"] = 2662030 + item_ids["Enemy Card Guard Armor"] = 2662031 + item_ids["Enemy Card Parasite Cage"] = 2662032 + item_ids["Enemy Card Trickmaster"] = 2662033 + item_ids["Enemy Card Darkside"] = 2662034 + item_ids["Enemy Card Card Soldier (Red)"] = 2662035 + item_ids["Enemy Card Card Soldier (Black)"] = 2662036 + item_ids["Enemy Card Hades"] = 2662037 + item_ids["Enemy Card Jafar"] = 2662039 + item_ids["Enemy Card Oogie Boogie"] = 2662040 + item_ids["Enemy Card Ursula"] = 2662041 + item_ids["Enemy Card Hook"] = 2662042 + item_ids["Enemy Card Dragon Maleficent"] = 2662043 + item_ids["Enemy Card Riku"] = 2662044 + item_ids["Enemy Card Larxene"] = 2662045 + item_ids["Enemy Card Vexen"] = 2662046 + item_ids["Enemy Card Marluxia"] = 2662047 + item_ids["Enemy Card Lexaeus"] = 2662048 + item_ids["Enemy Card Ansem"] = 2662049 + item_ids["Enemy Card Axel"] = 2662050 + + item_ids["Key of Beginnings F02"] = 2663002 + item_ids["Key of Beginnings F03"] = 2663003 + item_ids["Key of Beginnings F04"] = 2663004 + item_ids["Key of Beginnings F05"] = 2663005 + item_ids["Key of Beginnings F06"] = 2663006 + item_ids["Key of Beginnings F07"] = 2663007 + item_ids["Key of Beginnings F08"] = 2663008 + item_ids["Key of Beginnings F09"] = 2663009 + item_ids["Key of Beginnings F10"] = 2663010 + item_ids["Key of Beginnings F11"] = 2663011 + item_ids["Key of Beginnings F12"] = 2663012 + item_ids["Key of Beginnings F13"] = 2663013 + item_ids["Key of Guidance F02"] = 2663102 + item_ids["Key of Guidance F03"] = 2663103 + item_ids["Key of Guidance F04"] = 2663104 + item_ids["Key of Guidance F05"] = 2663105 + item_ids["Key of Guidance F06"] = 2663106 + item_ids["Key of Guidance F07"] = 2663107 + item_ids["Key of Guidance F08"] = 2663108 + item_ids["Key of Guidance F09"] = 2663109 + item_ids["Key of Guidance F12"] = 2663112 + item_ids["Key to Truth F02"] = 2663202 + item_ids["Key to Truth F03"] = 2663203 + item_ids["Key to Truth F04"] = 2663204 + item_ids["Key to Truth F05"] = 2663205 + item_ids["Key to Truth F06"] = 2663206 + item_ids["Key to Truth F07"] = 2663207 + item_ids["Key to Truth F08"] = 2663208 + item_ids["Key to Truth F09"] = 2663209 + item_ids["Key to Rewards F01"] = 2663301 + item_ids["Key to Rewards F02"] = 2663302 + item_ids["Key to Rewards F03"] = 2663303 + item_ids["Key to Rewards F04"] = 2663304 + item_ids["Key to Rewards F05"] = 2663305 + item_ids["Key to Rewards F06"] = 2663306 + item_ids["Key to Rewards F07"] = 2663307 + item_ids["Key to Rewards F08"] = 2663308 + item_ids["Key to Rewards F09"] = 2663309 + item_ids["Key to Rewards F11"] = 2663311 + item_ids["Key to Rewards F12"] = 2663312 + item_ids["Key to Rewards F13"] = 2663313 + item_ids["Donald"] = 2665001 + item_ids["Goofy"] = 2665002 + item_ids["Aladdin"] = 2665003 + item_ids["Ariel"] = 2665004 + item_ids["Beast"] = 2665005 + item_ids["Peter Pan"] = 2665006 + item_ids["Jack"] = 2665007 return item_ids end @@ -386,6 +315,31 @@ function define_exceptions() return exceptions end +function define_journal_bit_location_ids() + journal_bit_location_ids = {} + journal_bit_location_ids[0x02039CE4] = {2670107, 2670608, 2670907, 2671208, 2670108, 2670211, 2670306, 2670509} + journal_bit_location_ids[0x02039CE5] = {2670607, 2670404, 2670706, 2670806, 2670906, 2671013, 2671102, 2671207} + journal_bit_location_ids[0x02039CE6] = {2671302, 2670007, 2670002, 2670003, 2670004, 2670006, 2670005, 2670109} + journal_bit_location_ids[0x02039CE7] = {2670406, 2671001, 2670908, nil , 2670104, 2670105, 2670101, 2670103} + journal_bit_location_ids[0x02039CE8] = {2670302, 2671203, 2671204, 2671202, 2671206, 2671205, 2670102, nil } + journal_bit_location_ids[0x02039CE9] = {2671010, 2671301, 2670203, 2670207, 2670208, 2670204, 2670205, 2670206} + journal_bit_location_ids[0x02039CEA] = {2670305, 2670304, 2670303, 2670503, 2670504, nil , 2670508, 2670505} + journal_bit_location_ids[0x02039CEB] = {2670506, 2670507, 2670603, 2670605, 2670602, 2670604, 2670403, 2670402} + journal_bit_location_ids[0x02039CEC] = {2670702, 2670705, 2670703, 2670704, nil , 2670803, 2670804, 2670805} + journal_bit_location_ids[0x02039CED] = {2670802, 2670905, 2670902, 2670904, 2670903, 2671011, 2671006, 2671005} + journal_bit_location_ids[0x02039CEE] = {2671008, 2671004, 2671009, 2671007, 2671424, 2671425, 2671416, 2671420} + journal_bit_location_ids[0x02039CEF] = {2671407, 2671431, 2671415, 2671419, 2671408, 2671402, 2671404, 2671413} + journal_bit_location_ids[0x02039CF0] = {2671405, 2671423, 2671422, 2671421, 2671403, 2671428, 2671414, 2671418} + journal_bit_location_ids[0x02039CF1] = {2671401, 2671411, 2671412, 2671430, 2671429, 2671417, 2671427, 2671406} + journal_bit_location_ids[0x02039CF2] = {2671409, 2671426, 2671410, 2670112, 2670405, 2670210, 2671209, 2670001} + journal_bit_location_ids[0x02039CF3] = {2670502, 2670701, 2670601, 2670801, 2670401, 2671003, 2670308, 2670301} + journal_bit_location_ids[0x02039CF4] = {2670111, 2670202, 2670901, 2671201, 2671210, nil , 2671303, 2671304} + journal_bit_location_ids[0x02039CF5] = {2670106, 2670009, 2670606, 2670010, 2670501, 2670201, 2670707, 2670110} + journal_bit_location_ids[0x02039CF6] = {2670511, 2671002, 2670407, 2670807, 2670909, 2670309, 2670008, 2670307} + journal_bit_location_ids[0x02039CF7] = {2671101, 2670510, 2671012, 2671014, 2671211, nil , nil , nil } + return journal_bit_location_ids +end + local function has_value (tab, val) for index, value in ipairs(tab) do if value == val then @@ -396,14 +350,25 @@ local function has_value (tab, val) return false end -location_ids = define_location_ids() +function toBits(num) + -- returns a table of bits, least significant first. + local t={} -- will contain the bits + while num>0 do + rest=math.fmod(num,2) + t[#t+1]=rest + num=(num-rest)/2 + end + return t +end + item_ids = define_item_ids() battle_cards = define_battle_cards() win_conditions = define_win_conditions() char_to_hex_map = define_char_to_hex_map() exceptions = define_exceptions() +journal_bit_location_ids = define_journal_bit_location_ids() -pack_size = 3 +pack_size = 2 --Addresses current_gold_map_cards_addresses = {} @@ -563,18 +528,14 @@ function set_deck_pointer(deck_number, offset, value) end function set_starting_deck() - memory.write_u16_le(deck_cp_cost_address, 0x0053) - memory.write_u16_le(deck_card_count_address, 0x04) + memory.write_u16_le(deck_cp_cost_address, 0x0034) + memory.write_u16_le(deck_card_count_address, 0x02) 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, 0x1007) --Kingdom Key 7 + memory.write_u16_le(battle_cards_address + 2, 0x10CE) --Cure 6 set_deck_pointer(1, 1, 0x0001) - memory.write_u16_le(battle_cards_address + 4, 0x1006) --Kingdom Key 6 - set_deck_pointer(1, 2, 0x0002) - memory.write_u16_le(battle_cards_address + 6, 0x10CE) --Cure 6 - set_deck_pointer(1, 3, 0x0003) - local i = 5 + local i = 3 while i <= 15 do memory.write_u16_le(battle_cards_address + 2*(i-1), 0x0FFF) set_deck_pointer(1, i-1, 0xFFFF) @@ -708,7 +669,11 @@ end function update_map_cards() address = 0x0203A8C0 while address <= 0x0203A99B do - memory.writebyte(address, 9) + if address < 0x0203A992 or address > 0x0203A99B then --skip Moogle Rooms + memory.writebyte(address, 9) + else + memory.writebyte(address, 0) + end address = address + 1 end end @@ -733,20 +698,7 @@ function reassign_deck_pointers(old_deck_pointers) end end -function find_new_keys(old_keys, current_keys, gold_card_type, floor_number) - local new_keys = {} - if current_keys > old_keys then - if floor_number < 10 then - new_key = gold_card_type .. " F0" .. floor_number - else - new_key = gold_card_type .. " F" .. floor_number - end - set_current_gold_card_qty(gold_card_type, get_current_gold_card_qty(gold_card_type) - 1, floor_number) - check_location(new_key) - end -end - -function find_new_battle_cards(old_battle_cards, current_battle_cards) +function remove_new_battle_cards(old_battle_cards, current_battle_cards) new_battle_card_types = {} old_battle_card_counts = {} current_battle_card_counts = {} @@ -767,11 +719,10 @@ function find_new_battle_cards(old_battle_cards, current_battle_cards) for card_value, cnt in pairs(current_battle_card_counts) do if cnt > old_battle_card_counts[card_value] then i = 0 - while i < cnt - old_battle_card_counts[card_value] and (card_value % 0x1000) < 0x01C2 do --don't remove enemy cards + while i < cnt - old_battle_card_counts[card_value] do remove_battle_card(card_value) i = i + 1 end - check_location(get_battle_card_type(card_value)) end end end @@ -804,18 +755,12 @@ function file_exists(name) if f~=nil then io.close(f) return true else return false end end -function check_location(location_name) - location_id = location_ids[location_name] - file = io.open(client_communication_path .. "send" .. tostring(location_id), "w") - io.output(file) - io.write("") - io.close(file) -end - function add_gold_card(gold_card_name) floor_number = tonumber(string.sub(gold_card_name, -2)) if string.sub(gold_card_name,1,17) == "Key of Beginnings" then set_stored_gold_cards("Key of Beginnings", floor_number, 1) + set_stored_gold_cards("Key of Guidance", floor_number, 1) + set_stored_gold_cards("Key to Truth", floor_number, 1) end if string.sub(gold_card_name,1,15) == "Key of Guidance" then set_stored_gold_cards("Key of Guidance", floor_number, 1) @@ -874,6 +819,19 @@ function open_card_pack(card_pack) end end +function check_journal() + for k,v in pairs(journal_bit_location_ids) do + for ik, iv in pairs(journal_bit_location_ids[k]) do + if toBits(memory.readbyte(k))[ik] == 1 and iv ~= nil then + file = io.open(client_communication_path .. "send" .. tostring(iv), "w") + io.output(file) + io.write("") + io.close(file) + end + end + end +end + function receive_items() number_of_items_received = 0 while file_exists(client_communication_path .. "AP_" .. get_moogle_points() + 1 .. ".item") do @@ -895,6 +853,10 @@ function receive_items() open_card_pack(received_item_name) item_found = true end + if string.sub(received_item_name, 1, 10) == "Enemy Card" and not item_found then + add_battle_card(received_item_name:sub(12)) + item_found = true + end for k,v in pairs(win_conditions) do if not item_found then if k == received_item_name then @@ -1081,40 +1043,25 @@ function main_loop(last_variables) if current_floor ~= last_variables["Last Floor"] then update_world_cards(get_floor_number()) update_highest_warp_floor() - last_variables["Last Key of Beginnings"] = get_current_gold_card_qty("Key of Beginnings") - last_variables["Last Key of Guidance"] = get_current_gold_card_qty("Key of Guidance") - last_variables["Last Key to Truth"] = get_current_gold_card_qty("Key to Truth") - last_variables["Last Key to Rewards"] = get_current_gold_card_qty("Key to Rewards") last_variables["Last Moogle Points"] = get_moogle_points() end - local current_key_of_beginnings = get_current_gold_card_qty("Key of Beginnings") - local current_key_of_guidance = get_current_gold_card_qty("Key of Guidance") - local current_key_to_truth = get_current_gold_card_qty("Key to Truth") - local current_key_to_rewards = get_current_gold_card_qty("Key to Rewards") - local new_key_of_beginnings = find_new_keys(last_variables["Last Key of Beginnings"], current_key_of_beginnings, "Key of Beginnings", current_floor) - find_new_keys(last_variables["Last Key of Guidance"], current_key_of_guidance, "Key of Guidance", current_floor) - find_new_keys(last_variables["Last Key to Truth"], current_key_to_truth, "Key to Truth", current_floor) - find_new_keys(last_variables["Last Key to Rewards"], current_key_to_rewards, "Key to Rewards", current_floor) local current_battle_cards = get_battle_cards() last_deck_pointers = get_deck_pointers() - find_new_battle_cards(last_variables["Last Battle Cards"], current_battle_cards) + remove_new_battle_cards(last_variables["Last Battle Cards"], current_battle_cards) reassign_deck_pointers(last_deck_pointers) set_moogle_points(last_variables["Last Moogle Points"]) end - if frame % 300 and current_playtime > 3 then + if frame % 180 and current_playtime > 3 then + check_journal() last_deck_pointers = get_deck_pointers() receive_items() reassign_deck_pointers(last_deck_pointers) - update_current_gold_card_qty(get_floor_number()) set_key_description_text() check_if_victorious() remove_premium_cards() end + update_current_gold_card_qty(get_floor_number()) last_variables["Last Floor"] = get_floor_number() - last_variables["Last Key of Beginnings"] = get_current_gold_card_qty("Key of Beginnings") - last_variables["Last Key of Guidance"] = get_current_gold_card_qty("Key of Guidance") - last_variables["Last Key to Truth"] = get_current_gold_card_qty("Key to Truth") - last_variables["Last Key to Rewards"] = get_current_gold_card_qty("Key to Rewards") last_variables["Last Battle Cards"] = get_battle_cards() last_variables["Last Playtime"] = get_playtime() last_variables["Last Highest Warp Floor"] = get_highest_warp_floor() diff --git a/worlds/khcom/Client.py b/worlds/khcom/Client.py index 106c40cb52aa..08547d9a2b90 100644 --- a/worlds/khcom/Client.py +++ b/worlds/khcom/Client.py @@ -156,7 +156,8 @@ async def game_watcher(ctx: KHCOMContext): for file in files: if file.find("send") > -1: st = file.split("send", -1)[1] - sending = sending+[(int(st))] + if st != "nil": + sending = sending+[(int(st))] if file.find("victory") > -1: victory = True ctx.locations_checked = sending diff --git a/worlds/khcom/Items.py b/worlds/khcom/Items.py index f1152a428090..f64fbfb50956 100644 --- a/worlds/khcom/Items.py +++ b/worlds/khcom/Items.py @@ -26,129 +26,127 @@ 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=5), - "Silver Card Pack": KHCOMItemData("Filler", 266_1002, ItemClassification.filler, weight=3), - "Gold Card Pack": KHCOMItemData("Filler", 266_1003, ItemClassification.filler, weight=1), - - #Enemy Battle Cards - #"Shadow": KHCOMItemData("Enemy Battle Cards", 266_2001, ItemClassification.useful, 1, 1), - #"Soldier": KHCOMItemData("Enemy Battle Cards", 266_2002, ItemClassification.useful, 1, 1), - #"Large Body": KHCOMItemData("Enemy Battle Cards", 266_2003, ItemClassification.useful, 1, 1), - #"Red Nocturne": KHCOMItemData("Enemy Battle Cards", 266_2004, ItemClassification.useful, 1, 1), - #"Blue Rhapsody": KHCOMItemData("Enemy Battle Cards", 266_2005, ItemClassification.useful, 1, 1), - #"Yellow Opera": KHCOMItemData("Enemy Battle Cards", 266_2006, ItemClassification.useful, 1, 1), - #"Green Requiem": KHCOMItemData("Enemy Battle Cards", 266_2007, ItemClassification.useful, 1, 1), - #"Powerwild": KHCOMItemData("Enemy Battle Cards", 266_2008, ItemClassification.useful, 1, 1), - #"Bouncywild": KHCOMItemData("Enemy Battle Cards", 266_2009, ItemClassification.useful, 1, 1), - #"Air Soldier": KHCOMItemData("Enemy Battle Cards", 266_2010, ItemClassification.useful, 1, 1), - #"Bandit": KHCOMItemData("Enemy Battle Cards", 266_2011, ItemClassification.useful, 1, 1), - #"Fat Bandit": KHCOMItemData("Enemy Battle Cards", 266_2012, ItemClassification.useful, 1, 1), - #"Barrel Spider": KHCOMItemData("Enemy Battle Cards", 266_2013, ItemClassification.useful, 1, 1), - #"Search Ghost": KHCOMItemData("Enemy Battle Cards", 266_2014, ItemClassification.useful, 1, 1), - #"Sea Neon": KHCOMItemData("Enemy Battle Cards", 266_2015, ItemClassification.useful, 1, 1), - #"Screwdriver": KHCOMItemData("Enemy Battle Cards", 266_2016, ItemClassification.useful, 1, 1), - #"Aquatank": KHCOMItemData("Enemy Battle Cards", 266_2017, ItemClassification.useful, 1, 1), - #"Wight Knight": KHCOMItemData("Enemy Battle Cards", 266_2018, ItemClassification.useful, 1, 1), - #"Gargoyle": KHCOMItemData("Enemy Battle Cards", 266_2019, ItemClassification.useful, 1, 1), - #"Pirate": KHCOMItemData("Enemy Battle Cards", 266_2020, ItemClassification.useful, 1, 1), - #"Air Pirate": KHCOMItemData("Enemy Battle Cards", 266_2021, ItemClassification.useful, 1, 1), - #"Darkball": KHCOMItemData("Enemy Battle Cards", 266_2022, ItemClassification.useful, 1, 1), - #"Defender": KHCOMItemData("Enemy Battle Cards", 266_2023, ItemClassification.useful, 1, 1), - #"Wyvern": KHCOMItemData("Enemy Battle Cards", 266_2024, ItemClassification.useful, 1, 1), - #"Neoshadow": KHCOMItemData("Enemy Battle Cards", 266_2025, ItemClassification.useful, 1, 1), - #"White Mushroom": KHCOMItemData("Enemy Battle Cards", 266_2026, ItemClassification.useful, 1, 1), - #"Black Fungus": KHCOMItemData("Enemy Battle Cards", 266_2027, ItemClassification.useful, 1, 1), - #"Creeper Plant": KHCOMItemData("Enemy Battle Cards", 266_2028, ItemClassification.useful, 1, 1), - #"Tornado Step": KHCOMItemData("Enemy Battle Cards", 266_2029, ItemClassification.useful, 1, 1), - #"Crescendo": KHCOMItemData("Enemy Battle Cards", 266_2030, ItemClassification.useful, 1, 1), - #"Guard Armor": KHCOMItemData("Enemy Battle Cards", 266_2031, ItemClassification.useful, 1, 1), - #"Parasite Cage": KHCOMItemData("Enemy Battle Cards", 266_2032, ItemClassification.useful, 1, 1), - #"Trickmaster": KHCOMItemData("Enemy Battle Cards", 266_2033, ItemClassification.useful, 1, 1), - #"Darkside": KHCOMItemData("Enemy Battle Cards", 266_2034, ItemClassification.useful, 1, 1), - #"Card Soldier (Red)": KHCOMItemData("Enemy Battle Cards", 266_2035, ItemClassification.useful, 1, 1), - #"Card Soldier (Black)": KHCOMItemData("Enemy Battle Cards", 266_2036, ItemClassification.useful, 1, 1), - #"Hades": KHCOMItemData("Enemy Battle Cards", 266_2037, ItemClassification.useful, 1, 1), - #"Jafar": KHCOMItemData("Enemy Battle Cards", 266_2039, ItemClassification.useful, 1, 1), - #"Oogie Boogie": KHCOMItemData("Enemy Battle Cards", 266_2040, ItemClassification.useful, 1, 1), - #"Ursula": KHCOMItemData("Enemy Battle Cards", 266_2041, ItemClassification.useful, 1, 1), - #"Hook": KHCOMItemData("Enemy Battle Cards", 266_2042, ItemClassification.useful, 1, 1), - #"Dragon Maleficent": KHCOMItemData("Enemy Battle Cards", 266_2043, ItemClassification.useful, 1, 1), - #"Riku": KHCOMItemData("Enemy Battle Cards", 266_2044, ItemClassification.useful, 1, 1), - #"Axel": KHCOMItemData("Enemy Battle Cards", 266_2044, ItemClassification.useful, 1, 1), - #"Larxene": KHCOMItemData("Enemy Battle Cards", 266_2045, ItemClassification.useful, 1, 1), - #"Vexen": KHCOMItemData("Enemy Battle Cards", 266_2046, ItemClassification.useful, 1, 1), - #"Marluxia": KHCOMItemData("Enemy Battle Cards", 266_2047, ItemClassification.progression, 1, 1), - #"Lexaeus": KHCOMItemData("Enemy Battle Cards", 266_2048, ItemClassification.useful, 1, 1), - #"Ansem": KHCOMItemData("Enemy Battle Cards", 266_2049, ItemClassification.useful, 1, 1), - - #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), - "Key to Rewards F01": KHCOMItemData("Gold Map Cards", 266_3301, ItemClassification.progression, 1, 1), - "Key to Rewards F02": KHCOMItemData("Gold Map Cards", 266_3302, ItemClassification.useful, 1, 1), - "Key to Rewards F03": KHCOMItemData("Gold Map Cards", 266_3303, ItemClassification.progression, 1, 1), - "Key to Rewards F04": KHCOMItemData("Gold Map Cards", 266_3304, ItemClassification.useful, 1, 1), - "Key to Rewards F05": KHCOMItemData("Gold Map Cards", 266_3305, ItemClassification.useful, 1, 1), - "Key to Rewards F06": KHCOMItemData("Gold Map Cards", 266_3306, ItemClassification.useful, 1, 1), - "Key to Rewards F07": KHCOMItemData("Gold Map Cards", 266_3307, ItemClassification.useful, 1, 1), - "Key to Rewards F08": KHCOMItemData("Gold Map Cards", 266_3308, ItemClassification.useful, 1, 1), - "Key to Rewards F09": KHCOMItemData("Gold Map Cards", 266_3309, ItemClassification.progression, 1, 1), - "Key to Rewards F11": KHCOMItemData("Gold Map Cards", 266_3311, ItemClassification.useful, 1, 1), - "Key to Rewards F12": KHCOMItemData("Gold Map Cards", 266_3312, ItemClassification.progression, 1, 1), - "Key to Rewards F13": KHCOMItemData("Gold Map Cards", 266_3313, ItemClassification.useful, 1, 1), - - #World Unlocks - #"Wonderland": KHCOMItemData("World Cards", 266_4001, ItemClassification.progression, 1, 1), - #"Olympus Coliseum": KHCOMItemData("World Cards", 266_4002, ItemClassification.progression, 1, 1), - #"Monstro": KHCOMItemData("World Cards", 266_4003, ItemClassification.progression, 1, 1), - #"Agrabah": KHCOMItemData("World Cards", 266_4004, ItemClassification.progression, 1, 1), - #"Halloween Town": KHCOMItemData("World Cards", 266_4005, ItemClassification.progression, 1, 1), - #"Atlantica": KHCOMItemData("World Cards", 266_4006, ItemClassification.progression, 1, 1), - #"Neverland": KHCOMItemData("World Cards", 266_4007, ItemClassification.progression, 1, 1), - #"Hollow Bastion": KHCOMItemData("World Cards", 266_4008, ItemClassification.progression, 1, 1), - #"100 Acre Wood": KHCOMItemData("World Cards", 266_4009, ItemClassification.progression, 1, 1), - #"Twilight Town": KHCOMItemData("World Cards", 266_4010, ItemClassification.progression, 1, 1), - #"Destiny Islands": KHCOMItemData("World Cards", 266_4011, ItemClassification.progression, 1, 1), - #"Castle Oblivion": KHCOMItemData("World Cards", 266_4012, ItemClassification.progression, 1, 1), + "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), + + #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 Screwdriver": 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), #Friend Cards - "Donald": KHCOMItemData("Friend Cards", 266_5001, ItemClassification.progression, 1, 1), - "Goofy": KHCOMItemData("Friend Cards", 266_5002, ItemClassification.progression, 1, 1), - "Aladdin": KHCOMItemData("Friend Cards", 266_5003, ItemClassification.progression, 1, 1), - "Ariel": KHCOMItemData("Friend Cards", 266_5004, ItemClassification.progression, 1, 1), - "Beast": KHCOMItemData("Friend Cards", 266_5005, ItemClassification.progression, 1, 1), - "Peter Pan": KHCOMItemData("Friend Cards", 266_5006, ItemClassification.progression, 1, 1), - "Jack": KHCOMItemData("Friend Cards", 266_5007, ItemClassification.progression, 1, 1), + "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), } event_item_table: Dict[str, KHCOMItemData] = { diff --git a/worlds/khcom/Locations.py b/worlds/khcom/Locations.py index 58b2aafaa974..44ce24b415b1 100644 --- a/worlds/khcom/Locations.py +++ b/worlds/khcom/Locations.py @@ -25,134 +25,172 @@ def get_locations_by_category(category: str) -> Dict[str, KHCOMLocationData]: location_table: Dict[str, KHCOMLocationData] = { - "F01 Traverse Town Entrance": KHCOMLocationData("Progression", 267_0101), - "F01 Traverse Town Field (Black Fungus)": KHCOMLocationData("Enemy Unlock", 267_0102), - "F01 Traverse Town Field (Blizzard)": KHCOMLocationData("Progression", 267_0103), - "F01 Traverse Town Field (Blue Rhapsody)": KHCOMLocationData("Enemy Unlock", 267_0104), - "F01 Traverse Town Field (Cure)": KHCOMLocationData("Progression", 267_0105), - "F01 Traverse Town Field (Kingdom Key)": KHCOMLocationData("Progression", 267_0106), - "F01 Traverse Town Field (Potion)": KHCOMLocationData("Progression", 267_0107), - "F01 Traverse Town Field (Red Nocturne)": KHCOMLocationData("Enemy Unlock", 267_0108), - "F01 Traverse Town Field (Shadow)": KHCOMLocationData("Enemy Unlock", 267_0109), - "F01 Traverse Town Field (Soldier)": KHCOMLocationData("Enemy Unlock", 267_0110), - "F01 Traverse Town Field (White Mushroom)": KHCOMLocationData("Enemy Unlock", 267_0111), - "F01 Traverse Town Post Floor (Fire)": KHCOMLocationData("Boss", 267_0112), - "F01 Traverse Town Room of Beginnings": KHCOMLocationData("Progression", 267_0113), - "F01 Traverse Town Room of Beginnings (Simba)": KHCOMLocationData("Boss", 267_0114), - "F01 Traverse Town Room of Guidance": KHCOMLocationData("Progression", 267_0115), - "F01 Traverse Town Room of Rewards (Lionheart)": KHCOMLocationData("Progression", 267_0116), - "F01 Traverse Town Room of Truth (Guard Armor)": KHCOMLocationData("Boss", 267_0117), + "Starting Checks (Attack Cards Kingdom Key)": KHCOMLocationData("Starting", 267_0001), + "Starting Checks (Characters I Donald)": KHCOMLocationData("Starting", 267_0002), + "Starting Checks (Characters I Goofy)": KHCOMLocationData("Starting", 267_0003), + "Starting Checks (Characters I Jiminy Cricket)": KHCOMLocationData("Starting", 267_0004), + "Starting Checks (Characters I Kairi)": KHCOMLocationData("Starting", 267_0005), + "Starting Checks (Characters I Riku)": KHCOMLocationData("Starting", 267_0006), + "Starting Checks (Characters I Sora)": KHCOMLocationData("Starting", 267_0007), + "Starting Checks (Item Cards Potion)": KHCOMLocationData("Starting", 267_0008), + "Starting Checks (Magic Cards Blizzard)": KHCOMLocationData("Starting", 267_0009), + "Starting Checks (Magic Cards Cure)": KHCOMLocationData("Starting", 267_0010), - "F02 Wonderland Bounty (Stop)": KHCOMLocationData("Progression", 267_0201), - "F02 Wonderland Entrance": KHCOMLocationData("Progression", 267_0202), - "F02 Wonderland Field (Card Soldier Black)": KHCOMLocationData("Enemy Unlock", 267_0203), - "F02 Wonderland Field (Creeper Plant)": KHCOMLocationData("Enemy Unlock", 267_0204), - "F02 Wonderland Field (Crescendo)": KHCOMLocationData("Enemy Unlock", 267_0205), - "F02 Wonderland Field (Large Body)": KHCOMLocationData("Enemy Unlock", 267_0206), - "F02 Wonderland Field (Lady Luck)": KHCOMLocationData("Progression", 267_0207), - "F02 Wonderland Room of Beginnings": KHCOMLocationData("Progression", 267_0208), - "F02 Wonderland Room of Beginnings (Card Soldier Red)": KHCOMLocationData("Boss", 267_0209), - "F02 Wonderland Room of Guidance": KHCOMLocationData("Progression", 267_0210), - "F02 Wonderland Room of Truth (Trickmaster)": KHCOMLocationData("Boss", 267_0211), + "F01 Traverse Town Post Floor (Characters I Aerith)": KHCOMLocationData("Boss", 267_0101), + "F01 Traverse Town Post Floor (Characters I Axel)": KHCOMLocationData("Boss", 267_0102), + "F01 Traverse Town Post Floor (Characters I Cid)": KHCOMLocationData("Boss", 267_0103), + "F01 Traverse Town Post Floor (Characters I Leon)": KHCOMLocationData("Boss", 267_0104), + "F01 Traverse Town Post Floor (Characters I Yuffie)": KHCOMLocationData("Boss", 267_0105), + "F01 Traverse Town Post Floor (Magic Cards Fire)": KHCOMLocationData("Boss", 267_0106), + "F01 Traverse Town Post Floor (Story Sora's Tale I)": KHCOMLocationData("Boss", 267_0107), + "F01 Traverse Town Post Floor (Story Traverse Town)": KHCOMLocationData("Boss", 267_0108), + "F01 Traverse Town Room of Beginnings (Characters I Simba)": KHCOMLocationData("Progression", 267_0109), + "F01 Traverse Town Room of Beginnings (Magic Cards Simba)": KHCOMLocationData("Progression", 267_0110), + "F01 Traverse Town Room of Rewards (Attack Cards Lionheart)": KHCOMLocationData("Progression", 267_0111), + "F01 Traverse Town Room of Truth (The Heartless Guard Armor)": KHCOMLocationData("Boss", 267_0112), - "F03 Olympus Coliseum Entrance": KHCOMLocationData("Progression", 267_0301), - "F03 Olympus Coliseum Field (Barrel Spider)": KHCOMLocationData("Enemy Unlock", 267_0302), - "F03 Olympus Coliseum Field (Bouncywild)": KHCOMLocationData("Enemy Unlock", 267_0303), - "F03 Olympus Coliseum Field (Olympia)": KHCOMLocationData("Progression", 267_0304), - "F03 Olympus Coliseum Field (Powerwild)": KHCOMLocationData("Enemy Unlock", 267_0305), - "F03 Olympus Coliseum Room of Beginnings": KHCOMLocationData("Progression", 267_0306), - "F03 Olympus Coliseum Room of Guidance": KHCOMLocationData("Progression", 267_0307), - "F03 Olympus Coliseum Room of Guidance (Hi-Potion)": KHCOMLocationData("Boss", 267_0308), - "F03 Olympus Coliseum Room of Rewards (Metal Chocobo)": KHCOMLocationData("Progression", 267_0309), - "F03 Olympus Coliseum Room of Truth (Cloud)": KHCOMLocationData("Boss", 267_0310), - "F03 Olympus Coliseum Room of Truth (Hades)": KHCOMLocationData("Boss", 267_0311), + "F02 Wonderland Bounty (Magic Cards Stop)": KHCOMLocationData("Progression", 267_0201), + "F02 Wonderland Field (Attack Cards Lady Luck)": KHCOMLocationData("Progression", 267_0202), + "F02 Wonderland Post Floor (Characters II Alice)": KHCOMLocationData("Boss", 267_0203), + "F02 Wonderland Post Floor (Characters II Card of Hearts)": KHCOMLocationData("Boss", 267_0204), + "F02 Wonderland Post Floor (Characters II Card of Spades)": KHCOMLocationData("Boss", 267_0205), + "F02 Wonderland Post Floor (Characters II The Cheshire Cat)": KHCOMLocationData("Boss", 267_0206), + "F02 Wonderland Post Floor (Characters II The Queen of Hearts)": KHCOMLocationData("Boss", 267_0207), + "F02 Wonderland Post Floor (Characters II The White Rabbit)": KHCOMLocationData("Boss", 267_0208), + "F02 Wonderland Post Floor (Story Wonderland)": KHCOMLocationData("Boss", 267_0209), + "F02 Wonderland Room of Truth (The Heartless Trickmaster)": KHCOMLocationData("Boss", 267_0210), - "F04 Monstro Entrance": KHCOMLocationData("Progression", 267_0401), - "F04 Monstro Field (Air Soldier)": KHCOMLocationData("Enemy Unlock", 267_0402), - "F04 Monstro Field (Green Requiem)": KHCOMLocationData("Enemy Unlock", 267_0403), - "F04 Monstro Field (Search Ghost)": KHCOMLocationData("Enemy Unlock", 267_0404), - "F04 Monstro Field (Tornado Step)": KHCOMLocationData("Enemy Unlock", 267_0405), - "F04 Monstro Field (Wishing Star)": KHCOMLocationData("Progression", 267_0406), - "F04 Monstro Field (Yellow Opera)": KHCOMLocationData("Enemy Unlock", 267_0407), - "F04 Monstro Room of Beginnings": KHCOMLocationData("Progression", 267_0408), - "F04 Monstro Room of Guidance": KHCOMLocationData("Progression", 267_0409), - "F04 Monstro Room of Guidance (Parasite Cage)": KHCOMLocationData("Boss", 267_0410), - "F04 Monstro Room of Truth (Dumbo)": KHCOMLocationData("Boss", 267_0411), + "F03 Olympus Coliseum Field (Attack Cards Olympia)": KHCOMLocationData("Progression", 267_0301), + "F03 Olympus Coliseum Post Floor (Characters I Cloud)": KHCOMLocationData("Boss", 267_0302), + "F03 Olympus Coliseum Post Floor (Characters II Hades)": KHCOMLocationData("Boss", 267_0303), + "F03 Olympus Coliseum Post Floor (Characters II Philoctetes)": KHCOMLocationData("Boss", 267_0304), + "F03 Olympus Coliseum Post Floor (Characters II Hercules)": KHCOMLocationData("Boss", 267_0305), + "F03 Olympus Coliseum Post Floor (Story Olympus Coliseum)": KHCOMLocationData("Boss", 267_0306), + "F03 Olympus Coliseum Room of Guidance (Item Cards Hi-Potion)": KHCOMLocationData("Boss", 267_0307), + "F03 Olympus Coliseum Room of Rewards (Attack Card Metal Chocobo)": KHCOMLocationData("Progression", 267_0308), + "F03 Olympus Coliseum Room of Truth (Magic Cards Cloud)": KHCOMLocationData("Boss", 267_0309), - "F05 Agrabah Bounty (Gravity)": KHCOMLocationData("Progression", 267_0501), - "F05 Agrabah Entrance": KHCOMLocationData("Progression", 267_0502), - "F05 Agrabah Field (Bandit)": KHCOMLocationData("Enemy Unlock", 267_0503), - "F05 Agrabah Field (Fat Bandit)": KHCOMLocationData("Enemy Unlock", 267_0504), - "F05 Agrabah Field (Three Wishes)": KHCOMLocationData("Progression", 267_0505), - "F05 Agrabah Room of Beginnings": KHCOMLocationData("Progression", 267_0506), - "F05 Agrabah Room of Guidance": KHCOMLocationData("Progression", 267_0507), - "F05 Agrabah Room of Guidance (Ether)": KHCOMLocationData("Boss", 267_0508), - "F05 Agrabah Room of Truth (Genie)": KHCOMLocationData("Boss", 267_0509), - "F05 Agrabah Room of Truth (Jafar)": KHCOMLocationData("Boss", 267_0510), + "F04 Monstro Field (Wishing Star)": KHCOMLocationData("Progression", 267_0401), + "F04 Monstro Post Floor (Characters II Geppetto)": KHCOMLocationData("Boss", 267_0402), + "F04 Monstro Post Floor (Characters II Pinocchio)": KHCOMLocationData("Boss", 267_0403), + "F04 Monstro Post Floor (Story Monstro)": KHCOMLocationData("Boss", 267_0404), + "F04 Monstro Room of Guidance (The Heartless Parasite Cage)": KHCOMLocationData("Boss", 267_0405), + "F04 Monstro Room of Truth (Characters I Dumbo)": KHCOMLocationData("Boss", 267_0406), + "F04 Monstro Room of Truth (Magic Cards Dumbo)": KHCOMLocationData("Boss", 267_0407), - "F06 Halloween Town Entrance": KHCOMLocationData("Progression", 267_0601), - "F06 Halloween Town Field (Gargoyle)": KHCOMLocationData("Enemy Unlock", 267_0602), - "F06 Halloween Town Field (Pumpkinhead)": KHCOMLocationData("Progression", 267_0603), - "F06 Halloween Town Field (Wight Knight)": KHCOMLocationData("Enemy Unlock", 267_0604), - "F06 Halloween Town Post Floor (Thunder)": KHCOMLocationData("Boss", 267_0605), - "F06 Halloween Town Room of Beginnings": KHCOMLocationData("Progression", 267_0606), - "F06 Halloween Town Room of Guidance": KHCOMLocationData("Progression", 267_0607), - "F06 Halloween Town Room of Truth (Oogie Boogie)": KHCOMLocationData("Boss", 267_0608), + "F05 Agrabah Bounty (Magic Cards Gravity)": KHCOMLocationData("Progression", 267_0501), + "F05 Agrabah Field (Attack Cards Three Wishes)": KHCOMLocationData("Progression", 267_0502), + "F05 Agrabah Post Floor (Characters II Aladdin)": KHCOMLocationData("Boss", 267_0503), + "F05 Agrabah Post Floor (Characters II Genie)": KHCOMLocationData("Boss", 267_0504), + "F05 Agrabah Post Floor (Characters II Iago)": KHCOMLocationData("Boss", 267_0505), + "F05 Agrabah Post Floor (Characters II Jafar)": KHCOMLocationData("Boss", 267_0506), + "F05 Agrabah Post Floor (Characters II Jafar-Genie)": KHCOMLocationData("Boss", 267_0507), + "F05 Agrabah Post Floor (Characters II Jasmine)": KHCOMLocationData("Boss", 267_0508), + "F05 Agrabah Post Floor (Story Agrabah)": KHCOMLocationData("Boss", 267_0509), + "F05 Agrabah Room of Guidance (Item Cards Ether)": KHCOMLocationData("Boss", 267_0510), + "F05 Agrabah Room of Truth (Magic Cards Genie)": KHCOMLocationData("Boss", 267_0511), - "F07 Atlantica Entrance": KHCOMLocationData("Progression", 267_0701), - "F07 Atlantica Field (Aquatank)": KHCOMLocationData("Enemy Unlock", 267_0702), - "F07 Atlantica Field (Crabclaw)": KHCOMLocationData("Progression", 267_0703), - "F07 Atlantica Field (Darkball)": KHCOMLocationData("Enemy Unlock", 267_0704), - "F07 Atlantica Field (Screwdriver)": KHCOMLocationData("Enemy Unlock", 267_0705), - "F07 Atlantica Field (Sea Neon)": KHCOMLocationData("Enemy Unlock", 267_0706), - "F07 Atlantica Post Floor (Aero)": KHCOMLocationData("Progression", 267_0707), - "F07 Atlantica Room of Beginnings": KHCOMLocationData("Progression", 267_0708), - "F07 Atlantica Room of Guidance": KHCOMLocationData("Progression", 267_0709), - "F07 Atlantica Room of Truth (Ursula)": KHCOMLocationData("Boss", 267_0710), + "F06 Halloween Town Field (Attack Cards Pumpkinhead)": KHCOMLocationData("Progression", 267_0601), + "F06 Halloween Town Post Floor (Characters II Dr. Finkelstein)": KHCOMLocationData("Boss", 267_0602), + "F06 Halloween Town Post Floor (Characters II Jack)": KHCOMLocationData("Boss", 267_0603), + "F06 Halloween Town Post Floor (Characters II Oogie Boogie)": KHCOMLocationData("Boss", 267_0604), + "F06 Halloween Town Post Floor (Characters II Sally)": KHCOMLocationData("Boss", 267_0605), + "F06 Halloween Town Post Floor (Magic Cards Thunder)": KHCOMLocationData("Boss", 267_0606), + "F06 Halloween Town Post Floor (Story Halloween Town)": KHCOMLocationData("Boss", 267_0607), + "F06 Halloween Town Post Floor (Story Sora's Tale II)": KHCOMLocationData("Boss", 267_0608), - "F08 Neverland Entrance": KHCOMLocationData("Progression", 267_0801), - "F08 Neverland Field (Air Pirate)": KHCOMLocationData("Enemy Unlock", 267_0802), - "F08 Neverland Field (Fairy Harp)": KHCOMLocationData("Progression", 267_0803), - "F08 Neverland Field (Pirate)": KHCOMLocationData("Enemy Unlock", 267_0804), - "F08 Neverland Room of Beginnings": KHCOMLocationData("Progression", 267_0805), - "F08 Neverland Room of Guidance": KHCOMLocationData("Progression", 267_0806), - "F08 Neverland Room of Truth (Hook)": KHCOMLocationData("Boss", 267_0807), - "F08 Neverland Room of Truth (Tinker Bell)": KHCOMLocationData("Boss", 267_0808), + "F07 Atlantica Field (Crabclaw)": KHCOMLocationData("Progression", 267_0701), + "F07 Atlantica Post Floor (Characters II Ariel)": KHCOMLocationData("Boss", 267_0702), + "F07 Atlantica Post Floor (Characters II Flounder)": KHCOMLocationData("Boss", 267_0703), + "F07 Atlantica Post Floor (Characters II Ursula)": KHCOMLocationData("Boss", 267_0704), + "F07 Atlantica Post Floor (Characters II Sebastion)": KHCOMLocationData("Boss", 267_0705), + "F07 Atlantica Post Floor (Story Atlantica)": KHCOMLocationData("Boss", 267_0706), + "F07 Atlantica Post Floor (Magic Cards Aero)": KHCOMLocationData("Boss", 267_0707), - "F09 Hollow Bastion Entrance": KHCOMLocationData("Progression", 267_0901), - "F09 Hollow Bastion Field (Defender)": KHCOMLocationData("Enemy Unlock", 267_0902), - "F09 Hollow Bastion Field (Divine Rose)": KHCOMLocationData("Progression", 267_0903), - "F09 Hollow Bastion Field (Wizard)": KHCOMLocationData("Enemy Unlock", 267_0904), - "F09 Hollow Bastion Field (Wyvern)": KHCOMLocationData("Enemy Unlock", 267_0905), - "F09 Hollow Bastion Room of Beginnings": KHCOMLocationData("Progression", 267_0906), - "F09 Hollow Bastion Room of Guidance": KHCOMLocationData("Progression", 267_0907), - "F09 Hollow Bastion Room of Rewards (Mushu)": KHCOMLocationData("Progression", 267_0908), - "F09 Hollow Bastion Room of Truth (Dragon Maleficent)": KHCOMLocationData("Boss", 267_0909), + "F08 Neverland Field (Attack Cards Fairy Harp)": KHCOMLocationData("Progression", 267_0801), + "F08 Neverland Post Floor (Characters II Hook)": KHCOMLocationData("Boss", 267_0802), + "F08 Neverland Post Floor (Characters II Peter Pan)": KHCOMLocationData("Boss", 267_0803), + "F08 Neverland Post Floor (Characters II Tinker Bell)": KHCOMLocationData("Boss", 267_0804), + "F08 Neverland Post Floor (Characters II Wendy)": KHCOMLocationData("Boss", 267_0805), + "F08 Neverland Post Floor (Story Neverland)": KHCOMLocationData("Boss", 267_0806), + "F08 Neverland Room of Truth (Magic Cards Tinker Bell)": KHCOMLocationData("Boss", 267_0807), - "F10 100 Acre Wood Complete (Bambi)": KHCOMLocationData("Progression", 267_1001), - "F10 100 Acre Wood Owl (Spellbinder)": KHCOMLocationData("Progression", 267_1002), - "F10 100 Acre Wood Post Floor (Mega-Ether)": KHCOMLocationData("Boss", 267_1003), - "F10 100 Acre Wood Roo (Elixir)": KHCOMLocationData("Boss", 267_1004), + "F09 Hollow Bastion Field (Attack Cards Divine Rose)": KHCOMLocationData("Progression", 267_0901), + "F09 Hollow Bastion Post Floor (Characters II Belle)": KHCOMLocationData("Boss", 267_0902), + "F09 Hollow Bastion Post Floor (Characters II Dragon Maleficent)": KHCOMLocationData("Boss", 267_0903), + "F09 Hollow Bastion Post Floor (Characters II Maleficent)": KHCOMLocationData("Boss", 267_0904), + "F09 Hollow Bastion Post Floor (Characters II The Beast)": KHCOMLocationData("Boss", 267_0905), + "F09 Hollow Bastion Post Floor (Story Hollow Bastion)": KHCOMLocationData("Boss", 267_0906), + "F09 Hollow Bastion Post Floor (Story Sora's Tale III)": KHCOMLocationData("Boss", 267_0907), + "F09 Hollow Bastion Room of Rewards (Characters I Mushu)": KHCOMLocationData("Progression", 267_0908), + "F09 Hollow Bastion Room of Rewards (Magic Cards Mushu)": KHCOMLocationData("Progression", 267_0909), - "F11 Twilight Town Entrance": KHCOMLocationData("Progression", 267_1101), - "F11 Twilight Town Post Floor (Mega-Potion)": KHCOMLocationData("Boss", 267_1102), - "F11 Twilight Town Room of Beginnings (Vexen)": KHCOMLocationData("Boss", 267_1103), + "F10 100 Acre Wood Complete (Characters I Bambi)": KHCOMLocationData("Progression", 267_1001), + "F10 100 Acre Wood Complete (Magic Cards Bambi)": KHCOMLocationData("Progression", 267_1002), + "F10 100 Acre Wood Field Scene Owl (Attack Cards Spellbinder)": KHCOMLocationData("Progression", 267_1003), + "F10 100 Acre Wood Field Scene Eeyore (Characters II Eeyore)": KHCOMLocationData("Progression", 267_1004), + "F10 100 Acre Wood Field Scene Owl (Characters II Owl)": KHCOMLocationData("Progression", 267_1005), + "F10 100 Acre Wood Field Scene Piglet (Characters II Piglet)": KHCOMLocationData("Progression", 267_1006), + "F10 100 Acre Wood Field Scene Rabbit (Characters II Rabbit)": KHCOMLocationData("Progression", 267_1007), + "F10 100 Acre Wood Field Scene Roo (Characters II Roo)": KHCOMLocationData("Progression", 267_1008), + "F10 100 Acre Wood Field Scene Tigger (Characters II Tigger)": KHCOMLocationData("Progression", 267_1009), + "F10 100 Acre Wood Post Floor (Characters II Vexen)": KHCOMLocationData("Boss", 267_1010), + "F10 100 Acre Wood Post Floor (Characters II Winnie the Pooh)": KHCOMLocationData("Progression", 267_1011), + "F10 100 Acre Wood Post Floor (Item Cards Mega-Ether)": KHCOMLocationData("Boss", 267_1012), + "F10 100 Acre Wood Post Floor (Story 100 Acre Wood)": KHCOMLocationData("Progression", 267_1013), + "F10 100 Acre Wood Field Scene Roo (Item Cards Elixir)": KHCOMLocationData("Progression", 267_1014), - "F12 Destiny Islands Entrance": KHCOMLocationData("Progression", 267_1201), - #"F12 Destiny Islands Post Floor (Larxene)": KHCOMLocationData("Boss", 267_1202), - "F12 Destiny Islands Post Floor (Oathkeeper)": KHCOMLocationData("Progression", 267_1203), - #"F12 Destiny Islands Post Floor (Oblivion)": KHCOMLocationData("Progression", 267_1204), - "F12 Destiny Islands Post Floor (Riku)": KHCOMLocationData("Boss", 267_1205), - "F12 Destiny Islands Room of Beginnings": KHCOMLocationData("Progression", 267_1206), - "F12 Destiny Islands Room of Guidance (Darkside)": KHCOMLocationData("Boss", 267_1207), - "F12 Destiny Islands Room of Rewards (Megalixir)": KHCOMLocationData("Progression", 267_1208), + "F11 Twilight Town Post Floor (Item Cards Mega-Potion)": KHCOMLocationData("Boss", 267_1101), + "F11 Twilight Town Post Floor (Story Twilight Town)": KHCOMLocationData("Boss", 267_1102), - "F13 Castle Oblivion Entrance": KHCOMLocationData("Progression", 267_1301), - "F13 Castle Oblivion Field (Neoshadow)": KHCOMLocationData("Enemy Unlock", 267_1302), - "F13 Castle Oblivion Post Floor (Marluxia)": KHCOMLocationData("Boss", 267_1303), - "F13 Castle Oblivion Post Marluxia (Diamond Dust)": KHCOMLocationData("Progression", 267_1304), - "F13 Castle Oblivion Post Marluxia (One-Winged Angel)": KHCOMLocationData("Progression", 267_1305), - "F13 Castle Oblivion Room of Beginnings (Axel)": KHCOMLocationData("Boss", 267_1306), + "F12 Destiny Islands Post Floor (Attack Cards Oathkeeper)": KHCOMLocationData("Boss", 267_1201), + "F12 Destiny Islands Post Floor (Characters I Selphie)": KHCOMLocationData("Boss", 267_1202), + "F12 Destiny Islands Post Floor (Characters I Tidus)": KHCOMLocationData("Boss", 267_1203), + "F12 Destiny Islands Post Floor (Characters I Wakka)": KHCOMLocationData("Boss", 267_1204), + "F12 Destiny Islands Post Floor (Characters I Riku Replica)": KHCOMLocationData("Boss", 267_1205), + "F12 Destiny Islands Post Floor (Characters I Namine)": KHCOMLocationData("Boss", 267_1206), + "F12 Destiny Islands Post Floor (Story Destiny Islands)": KHCOMLocationData("Boss", 267_1207), + "F12 Destiny Islands Post Floor (Story Sora's Tale IV)": KHCOMLocationData("Boss", 267_1208), + "F12 Destiny Islands Room of Truth (The Heartless Darkside)": KHCOMLocationData("Boss", 267_1209), + #"F12 Destiny Islands Post Floor (Attack Cards Oblivion)": KHCOMLocationData("Boss", 267_1210), + "F12 Destiny Islands Room of Rewards (Item Cards Megalixir)": KHCOMLocationData("Progression", 267_1211), + + "F13 Castle Oblivion Post Floor (Characters I Marluxia)": KHCOMLocationData("Boss", 267_1301), + "F13 Castle Oblivion Post Floor (Story Castle Oblivion)": KHCOMLocationData("Boss", 267_1302), + "F13 Castle Oblivion Post Marluxia (Attack Cards Diamond Dust)": KHCOMLocationData("Progression", 267_1303), + "F13 Castle Oblivion Post Marluxia (Attack Cards One-Winged Angel)": KHCOMLocationData("Progression", 267_1304), + + "Heartless Air Pirate": KHCOMLocationData("Progression", 267_1401), + "Heartless Air Soldier": KHCOMLocationData("Progression", 267_1402), + "Heartless Aquatank": KHCOMLocationData("Progression", 267_1403), + "Heartless Bandit": KHCOMLocationData("Progression", 267_1404), + "Heartless Barrel Spider": KHCOMLocationData("Progression", 267_1405), + "Heartless Black Fungus": KHCOMLocationData("Progression", 267_1406), + "Heartless Blue Rhapsody": KHCOMLocationData("Progression", 267_1407), + "Heartless Bouncywild": KHCOMLocationData("Progression", 267_1408), + "Heartless Creeper Plant": KHCOMLocationData("Progression", 267_1409), + "Heartless Crescendo": KHCOMLocationData("Progression", 267_1410), + "Heartless Darkball": KHCOMLocationData("Progression", 267_1411), + "Heartless Defender": KHCOMLocationData("Progression", 267_1412), + "Heartless Fat Bandit": KHCOMLocationData("Progression", 267_1413), + "Heartless Gargoyle": KHCOMLocationData("Progression", 267_1414), + "Heartless Green Requiem": KHCOMLocationData("Progression", 267_1415), + "Heartless Large Body": KHCOMLocationData("Progression", 267_1416), + "Heartless Neoshadow": KHCOMLocationData("Progression", 267_1417), + "Heartless Pirate": KHCOMLocationData("Progression", 267_1418), + "Heartless Powerwild": KHCOMLocationData("Progression", 267_1419), + "Heartless Red Nocturne": KHCOMLocationData("Progression", 267_1420), + "Heartless Screwdiver": KHCOMLocationData("Progression", 267_1421), + "Heartless Sea Neon": KHCOMLocationData("Progression", 267_1422), + "Heartless Search Ghost": KHCOMLocationData("Progression", 267_1423), + "Heartless Shadow": KHCOMLocationData("Progression", 267_1424), + "Heartless Soldier": KHCOMLocationData("Progression", 267_1425), + "Heartless Tornado Step": KHCOMLocationData("Progression", 267_1426), + "Heartless White Mushroom": KHCOMLocationData("Progression", 267_1427), + "Heartless Wight Knight": KHCOMLocationData("Progression", 267_1428), + "Heartless Wizard": KHCOMLocationData("Progression", 267_1429), + "Heartless Wyvern": KHCOMLocationData("Progression", 267_1430), + "Heartless Yellow Opera": KHCOMLocationData("Progression", 267_1431), } event_location_table: Dict[str, KHCOMLocationData] = { diff --git a/worlds/khcom/Options.py b/worlds/khcom/Options.py index 7d191ad85844..7a3494400b62 100644 --- a/worlds/khcom/Options.py +++ b/worlds/khcom/Options.py @@ -2,12 +2,6 @@ from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionSet -class EnemyCards(Toggle): - """ - Should progression checks be included for enemy cards? - """ - display_name = "Enemy Cards Checks Hold Progression" - class PrioritizeBosses(Toggle): """ Should boss location prioritize holding friend cards? @@ -16,6 +10,5 @@ class PrioritizeBosses(Toggle): khcom_options: Dict[str, type(Option)] = { - "enemy_cards": EnemyCards, "prioritize_bosses": PrioritizeBosses, } diff --git a/worlds/khcom/Regions.py b/worlds/khcom/Regions.py index 7fdf05785e30..2f3fdcdcbfda 100644 --- a/worlds/khcom/Regions.py +++ b/worlds/khcom/Regions.py @@ -25,199 +25,181 @@ def create_regions(multiworld: MultiWorld, player: int): "Floor 11": KHCOMRegionData([], []), "Floor 12": KHCOMRegionData([], []), "Floor 13": KHCOMRegionData([], []), + "Heartless":KHCOMRegionData([], []), "Warp": KHCOMRegionData([], ["Floor 2", "Floor 3", "Floor 4", "Floor 5", "Floor 6", "Floor 7", "Floor 8", "Floor 9", "Floor 10", - "Floor 11", "Floor 12", "Floor 13"]) + "Floor 11", "Floor 12", "Floor 13", "Heartless"]) } # Set up locations - # Floor 1 Traverse Town - # Standard Cards - regions["Floor 1"].locations.append("F01 Traverse Town Field (Kingdom Key)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (Blizzard)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (Cure)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (Potion)") - # KOB, KOG, KTT Rewards - regions["Floor 1"].locations.append("F01 Traverse Town Room of Beginnings (Simba)") - regions["Floor 1"].locations.append("F01 Traverse Town Room of Truth (Guard Armor)") - regions["Floor 1"].locations.append("F01 Traverse Town Entrance") - regions["Floor 1"].locations.append("F01 Traverse Town Room of Beginnings") - regions["Floor 1"].locations.append("F01 Traverse Town Room of Guidance") - #Room of Rewards - regions["Floor 1"].locations.append("F01 Traverse Town Room of Rewards (Lionheart)") - #Post Floor Boss - regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Fire)") - #Enemy Cards - regions["Floor 1"].locations.append("F01 Traverse Town Field (Shadow)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (Soldier)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (Blue Rhapsody)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (Red Nocturne)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (White Mushroom)") - regions["Floor 1"].locations.append("F01 Traverse Town Field (Black Fungus)") + regions["Floor 1"].locations.append("Starting Checks (Attack Cards Kingdom Key)") + regions["Floor 1"].locations.append("Starting Checks (Characters I Donald)") + regions["Floor 1"].locations.append("Starting Checks (Characters I Goofy)") + regions["Floor 1"].locations.append("Starting Checks (Characters I Jiminy Cricket)") + regions["Floor 1"].locations.append("Starting Checks (Characters I Kairi)") + regions["Floor 1"].locations.append("Starting Checks (Characters I Riku)") + regions["Floor 1"].locations.append("Starting Checks (Characters I Sora)") + regions["Floor 1"].locations.append("Starting Checks (Item Cards Potion)") + regions["Floor 1"].locations.append("Starting Checks (Magic Cards Blizzard)") + regions["Floor 1"].locations.append("Starting Checks (Magic Cards Cure)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Characters I Aerith)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Characters I Axel)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Characters I Cid)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Characters I Leon)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Characters I Yuffie)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Magic Cards Fire)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Story Sora's Tale I)") + regions["Floor 1"].locations.append("F01 Traverse Town Post Floor (Story Traverse Town)") + regions["Floor 1"].locations.append("F01 Traverse Town Room of Beginnings (Characters I Simba)") + regions["Floor 1"].locations.append("F01 Traverse Town Room of Beginnings (Magic Cards Simba)") + regions["Floor 1"].locations.append("F01 Traverse Town Room of Rewards (Attack Cards Lionheart)") + regions["Floor 1"].locations.append("F01 Traverse Town Room of Truth (The Heartless Guard Armor)") + regions["Floor 2"].locations.append("F02 Wonderland Bounty (Magic Cards Stop)") + regions["Floor 2"].locations.append("F02 Wonderland Field (Attack Cards Lady Luck)") + regions["Floor 2"].locations.append("F02 Wonderland Post Floor (Characters II Alice)") + regions["Floor 2"].locations.append("F02 Wonderland Post Floor (Characters II Card of Hearts)") + regions["Floor 2"].locations.append("F02 Wonderland Post Floor (Characters II Card of Spades)") + regions["Floor 2"].locations.append("F02 Wonderland Post Floor (Characters II The Cheshire Cat)") + regions["Floor 2"].locations.append("F02 Wonderland Post Floor (Characters II The Queen of Hearts)") + regions["Floor 2"].locations.append("F02 Wonderland Post Floor (Characters II The White Rabbit)") + regions["Floor 2"].locations.append("F02 Wonderland Post Floor (Story Wonderland)") + regions["Floor 2"].locations.append("F02 Wonderland Room of Truth (The Heartless Trickmaster)") - # Floor 2 Wonderland - # Standard Cards - regions["Floor 2"].locations.append("F02 Wonderland Field (Lady Luck)") - regions["Floor 2"].locations.append("F02 Wonderland Bounty (Stop)") - # KOB, KOG, KTT Rewards - regions["Floor 2"].locations.append("F02 Wonderland Room of Beginnings (Card Soldier Red)") - regions["Floor 2"].locations.append("F02 Wonderland Room of Truth (Trickmaster)") - regions["Floor 2"].locations.append("F02 Wonderland Entrance") - regions["Floor 2"].locations.append("F02 Wonderland Room of Beginnings") - regions["Floor 2"].locations.append("F02 Wonderland Room of Guidance") - #Enemy Cards - regions["Floor 2"].locations.append("F02 Wonderland Field (Card Soldier Black)") - regions["Floor 2"].locations.append("F02 Wonderland Field (Creeper Plant)") - regions["Floor 2"].locations.append("F02 Wonderland Field (Crescendo)") - regions["Floor 2"].locations.append("F02 Wonderland Field (Large Body)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Field (Attack Cards Olympia)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Post Floor (Characters I Cloud)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Post Floor (Characters II Hades)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Post Floor (Characters II Philoctetes)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Post Floor (Characters II Hercules)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Post Floor (Story Olympus Coliseum)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Guidance (Item Cards Hi-Potion)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Rewards (Attack Card Metal Chocobo)") + regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Truth (Magic Cards Cloud)") - # Floor 3 Olympus Coliseum - # Standard Cards - regions["Floor 3"].locations.append("F03 Olympus Coliseum Field (Olympia)") - # KOB, KOG, KTT Rewards - regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Truth (Cloud)") - regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Truth (Hades)") - regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Guidance (Hi-Potion)") - regions["Floor 3"].locations.append("F03 Olympus Coliseum Entrance") - regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Beginnings") - regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Guidance") - #Room of Rewards - regions["Floor 3"].locations.append("F03 Olympus Coliseum Room of Rewards (Metal Chocobo)") - #Enemy Cards - regions["Floor 3"].locations.append("F03 Olympus Coliseum Field (Barrel Spider)") - regions["Floor 3"].locations.append("F03 Olympus Coliseum Field (Bouncywild)") - regions["Floor 3"].locations.append("F03 Olympus Coliseum Field (Powerwild)") + regions["Floor 4"].locations.append("F04 Monstro Field (Wishing Star)") + regions["Floor 4"].locations.append("F04 Monstro Post Floor (Characters II Geppetto)") + regions["Floor 4"].locations.append("F04 Monstro Post Floor (Characters II Pinocchio)") + regions["Floor 4"].locations.append("F04 Monstro Post Floor (Story Monstro)") + regions["Floor 4"].locations.append("F04 Monstro Room of Guidance (The Heartless Parasite Cage)") + regions["Floor 4"].locations.append("F04 Monstro Room of Truth (Characters I Dumbo)") + regions["Floor 4"].locations.append("F04 Monstro Room of Truth (Magic Cards Dumbo)") - # Floor 4 Monstro - # Standard Cards - regions["Floor 4"].locations.append("F04 Monstro Field (Wishing Star)") - # KOB, KOG, KTT Rewards - regions["Floor 4"].locations.append("F04 Monstro Room of Guidance (Parasite Cage)") - regions["Floor 4"].locations.append("F04 Monstro Room of Truth (Dumbo)") - regions["Floor 4"].locations.append("F04 Monstro Entrance") - regions["Floor 4"].locations.append("F04 Monstro Room of Beginnings") - regions["Floor 4"].locations.append("F04 Monstro Room of Guidance") - #Enemy Cards - regions["Floor 4"].locations.append("F04 Monstro Field (Green Requiem)") - regions["Floor 4"].locations.append("F04 Monstro Field (Search Ghost)") - regions["Floor 4"].locations.append("F04 Monstro Field (Tornado Step)") - regions["Floor 4"].locations.append("F04 Monstro Field (Yellow Opera)") - regions["Floor 4"].locations.append("F04 Monstro Field (Air Soldier)") + regions["Floor 5"].locations.append("F05 Agrabah Bounty (Magic Cards Gravity)") + regions["Floor 5"].locations.append("F05 Agrabah Field (Attack Cards Three Wishes)") + regions["Floor 5"].locations.append("F05 Agrabah Post Floor (Characters II Aladdin)") + regions["Floor 5"].locations.append("F05 Agrabah Post Floor (Characters II Genie)") + regions["Floor 5"].locations.append("F05 Agrabah Post Floor (Characters II Iago)") + regions["Floor 5"].locations.append("F05 Agrabah Post Floor (Characters II Jafar)") + regions["Floor 5"].locations.append("F05 Agrabah Post Floor (Characters II Jafar-Genie)") + regions["Floor 5"].locations.append("F05 Agrabah Post Floor (Characters II Jasmine)") + regions["Floor 5"].locations.append("F05 Agrabah Post Floor (Story Agrabah)") + regions["Floor 5"].locations.append("F05 Agrabah Room of Guidance (Item Cards Ether)") + regions["Floor 5"].locations.append("F05 Agrabah Room of Truth (Magic Cards Genie)") - # Floor 5 Agrabah - # Standard Cards - regions["Floor 5"].locations.append("F05 Agrabah Field (Three Wishes)") - regions["Floor 5"].locations.append("F05 Agrabah Bounty (Gravity)") - # KOB, KOG, KTT Rewards - regions["Floor 5"].locations.append("F05 Agrabah Room of Truth (Genie)") - regions["Floor 5"].locations.append("F05 Agrabah Room of Truth (Jafar)") - regions["Floor 5"].locations.append("F05 Agrabah Room of Guidance (Ether)") - regions["Floor 5"].locations.append("F05 Agrabah Entrance") - regions["Floor 5"].locations.append("F05 Agrabah Room of Beginnings") - regions["Floor 5"].locations.append("F05 Agrabah Room of Guidance") - #Enemy Cards - regions["Floor 5"].locations.append("F05 Agrabah Field (Bandit)") - regions["Floor 5"].locations.append("F05 Agrabah Field (Fat Bandit)") + regions["Floor 6"].locations.append("F06 Halloween Town Field (Attack Cards Pumpkinhead)") + regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Characters II Dr. Finkelstein)") + regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Characters II Jack)") + regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Characters II Oogie Boogie)") + regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Characters II Sally)") + regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Magic Cards Thunder)") + regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Story Halloween Town)") + regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Story Sora's Tale II)") - # Floor 6 Halloween Town - # Standard Cards - regions["Floor 6"].locations.append("F06 Halloween Town Field (Pumpkinhead)") - # KOB, KOG, KTT Rewards - regions["Floor 6"].locations.append("F06 Halloween Town Room of Truth (Oogie Boogie)") - regions["Floor 6"].locations.append("F06 Halloween Town Entrance") - regions["Floor 6"].locations.append("F06 Halloween Town Room of Beginnings") - regions["Floor 6"].locations.append("F06 Halloween Town Room of Guidance") - #Post Floor Boss - regions["Floor 6"].locations.append("F06 Halloween Town Post Floor (Thunder)") - #Enemy Cards - regions["Floor 6"].locations.append("F06 Halloween Town Field (Gargoyle)") - regions["Floor 6"].locations.append("F06 Halloween Town Field (Wight Knight)") + regions["Floor 7"].locations.append("F07 Atlantica Field (Crabclaw)") + regions["Floor 7"].locations.append("F07 Atlantica Post Floor (Characters II Ariel)") + regions["Floor 7"].locations.append("F07 Atlantica Post Floor (Characters II Flounder)") + regions["Floor 7"].locations.append("F07 Atlantica Post Floor (Characters II Ursula)") + regions["Floor 7"].locations.append("F07 Atlantica Post Floor (Characters II Sebastion)") + regions["Floor 7"].locations.append("F07 Atlantica Post Floor (Story Atlantica)") + regions["Floor 7"].locations.append("F07 Atlantica Post Floor (Magic Cards Aero)") - # Floor 7 Atlantica - # Standard Cards - regions["Floor 7"].locations.append("F07 Atlantica Field (Crabclaw)") - # KOB, KOG, KTT Rewards - regions["Floor 7"].locations.append("F07 Atlantica Room of Truth (Ursula)") - regions["Floor 7"].locations.append("F07 Atlantica Entrance") - regions["Floor 7"].locations.append("F07 Atlantica Room of Beginnings") - regions["Floor 7"].locations.append("F07 Atlantica Room of Guidance") - #Post Floor Boss - regions["Floor 7"].locations.append("F07 Atlantica Post Floor (Aero)") - #Enemy Cards - regions["Floor 7"].locations.append("F07 Atlantica Field (Aquatank)") - regions["Floor 7"].locations.append("F07 Atlantica Field (Darkball)") - regions["Floor 7"].locations.append("F07 Atlantica Field (Sea Neon)") - regions["Floor 7"].locations.append("F07 Atlantica Field (Screwdriver)") + regions["Floor 8"].locations.append("F08 Neverland Field (Attack Cards Fairy Harp)") + regions["Floor 8"].locations.append("F08 Neverland Post Floor (Characters II Hook)") + regions["Floor 8"].locations.append("F08 Neverland Post Floor (Characters II Peter Pan)") + regions["Floor 8"].locations.append("F08 Neverland Post Floor (Characters II Tinker Bell)") + regions["Floor 8"].locations.append("F08 Neverland Post Floor (Characters II Wendy)") + regions["Floor 8"].locations.append("F08 Neverland Post Floor (Story Neverland)") + regions["Floor 8"].locations.append("F08 Neverland Room of Truth (Magic Cards Tinker Bell)") - # Floor 8 Never Land - # Standard Cards - regions["Floor 8"].locations.append("F08 Neverland Field (Fairy Harp)") - # KOB, KOG, KTT Rewards - regions["Floor 8"].locations.append("F08 Neverland Room of Truth (Hook)") - regions["Floor 8"].locations.append("F08 Neverland Room of Truth (Tinker Bell)") - regions["Floor 8"].locations.append("F08 Neverland Entrance") - regions["Floor 8"].locations.append("F08 Neverland Room of Beginnings") - regions["Floor 8"].locations.append("F08 Neverland Room of Guidance") - #Enemy Cards - regions["Floor 8"].locations.append("F08 Neverland Field (Air Pirate)") - regions["Floor 8"].locations.append("F08 Neverland Field (Pirate)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Field (Attack Cards Divine Rose)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Post Floor (Characters II Belle)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Post Floor (Characters II Dragon Maleficent)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Post Floor (Characters II Maleficent)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Post Floor (Characters II The Beast)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Post Floor (Story Hollow Bastion)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Post Floor (Story Sora's Tale III)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Room of Rewards (Characters I Mushu)") + regions["Floor 9"].locations.append("F09 Hollow Bastion Room of Rewards (Magic Cards Mushu)") - # Floor 9 Holloow Bastion - # Standard Cards - regions["Floor 9"].locations.append("F09 Hollow Bastion Field (Divine Rose)") - # KOB, KOG, KTT Rewards - regions["Floor 9"].locations.append("F09 Hollow Bastion Room of Truth (Dragon Maleficent)") - regions["Floor 9"].locations.append("F09 Hollow Bastion Entrance") - regions["Floor 9"].locations.append("F09 Hollow Bastion Room of Beginnings") - regions["Floor 9"].locations.append("F09 Hollow Bastion Room of Guidance") - #Room of Rewards - regions["Floor 9"].locations.append("F09 Hollow Bastion Room of Rewards (Mushu)") - #Enemy Cards - regions["Floor 9"].locations.append("F09 Hollow Bastion Field (Defender)") - regions["Floor 9"].locations.append("F09 Hollow Bastion Field (Wizard)") - regions["Floor 9"].locations.append("F09 Hollow Bastion Field (Wyvern)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Complete (Characters I Bambi)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Complete (Magic Cards Bambi)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Owl (Attack Cards Spellbinder)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Field Scene Eeyore (Characters II Eeyore)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Field Scene Owl (Characters II Owl)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Field Scene Piglet (Characters II Piglet)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Field Scene Rabbit (Characters II Rabbit)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Field Scene Roo (Characters II Roo)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Field Scene Tigger (Characters II Tigger)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Post Floor (Characters II Vexen)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Post Floor (Characters II Winnie the Pooh)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Post Floor (Item Cards Mega-Ether)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Post Floor (Story 100 Acre Wood)") + regions["Floor 10"].locations.append("F10 100 Acre Wood Field Scene Roo (Item Cards Elixir)") - # Floor 10 100 Acre Wood - # Rewards - regions["Floor 10"].locations.append("F10 100 Acre Wood Complete (Bambi)") - regions["Floor 10"].locations.append("F10 100 Acre Wood Roo (Elixir)") - regions["Floor 10"].locations.append("F10 100 Acre Wood Owl (Spellbinder)") - #Post Floor Boss - regions["Floor 10"].locations.append("F10 100 Acre Wood Post Floor (Mega-Ether)") + regions["Floor 11"].locations.append("F11 Twilight Town Post Floor (Item Cards Mega-Potion)") + regions["Floor 11"].locations.append("F11 Twilight Town Post Floor (Story Twilight Town)") - # Floor 11 Twilight Town - # KOB, KOG, KTT Rewards - regions["Floor 11"].locations.append("F11 Twilight Town Room of Beginnings (Vexen)") - regions["Floor 11"].locations.append("F11 Twilight Town Entrance") - #Post Floor Boss - regions["Floor 11"].locations.append("F11 Twilight Town Post Floor (Mega-Potion)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Attack Cards Oathkeeper)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Characters I Selphie)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Characters I Tidus)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Characters I Wakka)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Characters I Riku Replica)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Characters I Namine)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Story Destiny Islands)") + regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Story Sora's Tale IV)") + regions["Floor 12"].locations.append("F12 Destiny Islands Room of Truth (The Heartless Darkside)") + #regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Attack Cards Oblivion)") + regions["Floor 12"].locations.append("F12 Destiny Islands Room of Rewards (Item Cards Megalixir)") + + regions["Floor 13"].locations.append("F13 Castle Oblivion Post Floor (Characters I Marluxia)") + regions["Floor 13"].locations.append("F13 Castle Oblivion Post Floor (Story Castle Oblivion)") + regions["Floor 13"].locations.append("F13 Castle Oblivion Post Marluxia (Attack Cards Diamond Dust)") + regions["Floor 13"].locations.append("F13 Castle Oblivion Post Marluxia (Attack Cards One-Winged Angel)") - # Floor 12 Destiny Islands - # KOB, KOG, KTT Rewards - regions["Floor 12"].locations.append("F12 Destiny Islands Room of Guidance (Darkside)") - regions["Floor 12"].locations.append("F12 Destiny Islands Entrance") - regions["Floor 12"].locations.append("F12 Destiny Islands Room of Beginnings") - #Post Floor Boss - regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Riku)") - #regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Larxene)") - regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Oathkeeper)") - #regions["Floor 12"].locations.append("F12 Destiny Islands Post Floor (Oblivion)") - #Room of Rewards - regions["Floor 12"].locations.append("F12 Destiny Islands Room of Rewards (Megalixir)") + regions["Heartless"].locations.append("Heartless Air Pirate") + regions["Heartless"].locations.append("Heartless Air Soldier") + regions["Heartless"].locations.append("Heartless Aquatank") + regions["Heartless"].locations.append("Heartless Bandit") + regions["Heartless"].locations.append("Heartless Barrel Spider") + regions["Heartless"].locations.append("Heartless Black Fungus") + regions["Heartless"].locations.append("Heartless Blue Rhapsody") + regions["Heartless"].locations.append("Heartless Bouncywild") + regions["Heartless"].locations.append("Heartless Creeper Plant") + regions["Heartless"].locations.append("Heartless Crescendo") + regions["Heartless"].locations.append("Heartless Darkball") + regions["Heartless"].locations.append("Heartless Defender") + regions["Heartless"].locations.append("Heartless Fat Bandit") + regions["Heartless"].locations.append("Heartless Gargoyle") + regions["Heartless"].locations.append("Heartless Green Requiem") + regions["Heartless"].locations.append("Heartless Large Body") + regions["Heartless"].locations.append("Heartless Neoshadow") + regions["Heartless"].locations.append("Heartless Pirate") + regions["Heartless"].locations.append("Heartless Powerwild") + regions["Heartless"].locations.append("Heartless Red Nocturne") + regions["Heartless"].locations.append("Heartless Screwdiver") + regions["Heartless"].locations.append("Heartless Sea Neon") + regions["Heartless"].locations.append("Heartless Search Ghost") + regions["Heartless"].locations.append("Heartless Shadow") + regions["Heartless"].locations.append("Heartless Soldier") + regions["Heartless"].locations.append("Heartless Tornado Step") + regions["Heartless"].locations.append("Heartless White Mushroom") + regions["Heartless"].locations.append("Heartless Wight Knight") + regions["Heartless"].locations.append("Heartless Wizard") + regions["Heartless"].locations.append("Heartless Wyvern") + regions["Heartless"].locations.append("Heartless Yellow Opera") - # Floor 13 Castle Oblivion - # KOB, KOG, KTT Rewards - regions["Floor 13"].locations.append("F13 Castle Oblivion Room of Beginnings (Axel)") - regions["Floor 13"].locations.append("F13 Castle Oblivion Post Floor (Marluxia)") - regions["Floor 13"].locations.append("F13 Castle Oblivion Post Marluxia (Diamond Dust)") - regions["Floor 13"].locations.append("F13 Castle Oblivion Post Marluxia (One-Winged Angel)") - regions["Floor 13"].locations.append("F13 Castle Oblivion Entrance") - #Enemy Cards - regions["Floor 13"].locations.append("F13 Castle Oblivion Field (Neoshadow)") - # Set up the regions correctly. for name, data in regions.items(): multiworld.regions.append(create_region(multiworld, player, name, data)) @@ -235,6 +217,7 @@ def create_regions(multiworld: MultiWorld, player: int): multiworld.get_entrance("Floor 11", player).connect(multiworld.get_region("Floor 11", player)) multiworld.get_entrance("Floor 12", player).connect(multiworld.get_region("Floor 12", player)) multiworld.get_entrance("Floor 13", player).connect(multiworld.get_region("Floor 13", player)) + multiworld.get_entrance("Heartless", player).connect(multiworld.get_region("Heartless", player)) multiworld.get_entrance("Warp", player).connect(multiworld.get_region("Warp", player)) diff --git a/worlds/khcom/Rules.py b/worlds/khcom/Rules.py index 8f0bff8a8b6a..11dc649aa353 100644 --- a/worlds/khcom/Rules.py +++ b/worlds/khcom/Rules.py @@ -1,89 +1,73 @@ from BaseClasses import CollectionState, MultiWorld, LocationProgressType from .Locations import get_locations_by_category -def has_room_of_beginnings(state: CollectionState, player: int, floor_num) -> bool: - return state.has("Key of Beginnings F" + floor_num, player) - -def has_room_of_guidance(state: CollectionState, player: int, floor_num) -> bool: - return state.has_all({"Key of Beginnings F" + floor_num, "Key of Guidance F" + floor_num}, player) - -def has_room_of_truth(state: CollectionState, player: int, floor_num) -> bool: - return state.has_all({"Key of Beginnings F" + floor_num, "Key of Guidance F" + floor_num, "Key to Truth F" + floor_num}, player) - -def has_room_of_rewards(state: CollectionState, player: int, floor_num) -> bool: - return state.has("Key to Rewards F" + floor_num, player) +#def has_room_of_beginnings(state: CollectionState, player: int, floor_num) -> bool: +# return state.has("Key of Beginnings F" + floor_num, player) +# +#def has_room_of_guidance(state: CollectionState, player: int, floor_num) -> bool: +# return state.has_all({"Key of Beginnings F" + floor_num, "Key of Guidance F" + floor_num}, player) +# +#def has_room_of_truth(state: CollectionState, player: int, floor_num) -> bool: +# return state.has_all({"Key of Beginnings F" + floor_num, "Key of Guidance F" + floor_num, "Key to Truth F" + floor_num}, player) +def has_item(state: CollectionState, player: int, item) -> bool: + return state.has(item, player) def set_rules(multiworld: MultiWorld, player: int): #Location rules. #Keys - multiworld.get_location("F02 Wonderland Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "02") - multiworld.get_location("F03 Olympus Coliseum Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "03") - multiworld.get_location("F04 Monstro Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "04") - multiworld.get_location("F05 Agrabah Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "05") - multiworld.get_location("F06 Halloween Town Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "06") - multiworld.get_location("F07 Atlantica Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "07") - multiworld.get_location("F08 Neverland Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "08") - multiworld.get_location("F09 Hollow Bastion Room of Guidance" , player).access_rule = lambda state: has_room_of_guidance (state, player, "09") - #Progression - multiworld.get_location("F02 Wonderland Room of Beginnings (Card Soldier Red)" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "02") - multiworld.get_location("F02 Wonderland Room of Truth (Trickmaster)" , player).access_rule = lambda state: has_room_of_truth (state, player, "02") - multiworld.get_location("F03 Olympus Coliseum Room of Guidance (Hi-Potion)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "03") - multiworld.get_location("F03 Olympus Coliseum Room of Truth (Hades)" , player).access_rule = lambda state: has_room_of_truth (state, player, "03") - multiworld.get_location("F03 Olympus Coliseum Room of Truth (Cloud)" , player).access_rule = lambda state: has_room_of_truth (state, player, "03") - multiworld.get_location("F04 Monstro Room of Guidance (Parasite Cage)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "04") - multiworld.get_location("F04 Monstro Room of Truth (Dumbo)" , player).access_rule = lambda state: has_room_of_truth (state, player, "04") - multiworld.get_location("F05 Agrabah Room of Guidance (Ether)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "05") - multiworld.get_location("F05 Agrabah Room of Truth (Jafar)" , player).access_rule = lambda state: has_room_of_truth (state, player, "05") - multiworld.get_location("F05 Agrabah Room of Truth (Genie)" , player).access_rule = lambda state: has_room_of_truth (state, player, "05") - multiworld.get_location("F06 Halloween Town Room of Truth (Oogie Boogie)" , player).access_rule = lambda state: has_room_of_truth (state, player, "06") - multiworld.get_location("F06 Halloween Town Post Floor (Thunder)" , player).access_rule = lambda state: has_room_of_truth (state, player, "06") - multiworld.get_location("F07 Atlantica Room of Truth (Ursula)" , player).access_rule = lambda state: has_room_of_truth (state, player, "07") - multiworld.get_location("F07 Atlantica Post Floor (Aero)" , player).access_rule = lambda state: has_room_of_truth (state, player, "07") - multiworld.get_location("F08 Neverland Room of Truth (Hook)" , player).access_rule = lambda state: has_room_of_truth (state, player, "08") - multiworld.get_location("F08 Neverland Room of Truth (Tinker Bell)" , player).access_rule = lambda state: has_room_of_truth (state, player, "08") - multiworld.get_location("F09 Hollow Bastion Room of Truth (Dragon Maleficent)" , player).access_rule = lambda state: has_room_of_truth (state, player, "09") - multiworld.get_location("F11 Twilight Town Room of Beginnings (Vexen)" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "11") - multiworld.get_location("F11 Twilight Town Post Floor (Mega-Potion)" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "11") - multiworld.get_location("F12 Destiny Islands Room of Guidance (Darkside)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "12") - multiworld.get_location("F12 Destiny Islands Post Floor (Riku)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "12") - #multiworld.get_location("F12 Destiny Islands Post Floor (Larxene)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "12") - multiworld.get_location("F12 Destiny Islands Post Floor (Oathkeeper)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "12") - #multiworld.get_location("F12 Destiny Islands Post Floor (Oblivion)" , player).access_rule = lambda state: has_room_of_guidance (state, player, "12") - multiworld.get_location("F13 Castle Oblivion Room of Beginnings (Axel)" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "13") - multiworld.get_location("F13 Castle Oblivion Post Floor (Marluxia)" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "13") - multiworld.get_location("F13 Castle Oblivion Post Marluxia (One-Winged Angel)" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "13") - multiworld.get_location("F13 Castle Oblivion Post Marluxia (Diamond Dust)" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "13") - #Room of Rewards - multiworld.get_location("F01 Traverse Town Room of Rewards (Lionheart)" , player).access_rule = lambda state: has_room_of_rewards (state, player, "01") - multiworld.get_location("F03 Olympus Coliseum Room of Rewards (Metal Chocobo)" , player).access_rule = lambda state: has_room_of_rewards (state, player, "03") - multiworld.get_location("F09 Hollow Bastion Room of Rewards (Mushu)" , player).access_rule = lambda state: has_room_of_rewards (state, player, "09") - multiworld.get_location("F12 Destiny Islands Room of Rewards (Megalixir)" , player).access_rule = lambda state: has_room_of_rewards (state, player, "12") - + multiworld.get_location("F01 Traverse Town Room of Rewards (Attack Cards Lionheart)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Traverse Town") + multiworld.get_location("F03 Olympus Coliseum Room of Rewards (Attack Card Metal Chocobo)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Olympus Coliseum") + multiworld.get_location("F09 Hollow Bastion Room of Rewards (Characters I Mushu)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Hollow Bastion") + multiworld.get_location("F09 Hollow Bastion Room of Rewards (Magic Cards Mushu)" , player).access_rule = lambda state: has_item(state, player,"Key to Rewards Hollow Bastion") + + multiworld.get_location("Heartless Air Pirate" , player).access_rule = lambda state: has_item(state, player,"World Card Neverland") + multiworld.get_location("Heartless Air Soldier" , player).access_rule = lambda state: has_item(state, player,"World Card Monstro") or has_item(state, player,"World Card Agrabah") or has_item(state, player,"World Card Halloween Town") or has_item(state, player,"World Card Destiny Islands") + multiworld.get_location("Heartless Aquatank" , player).access_rule = lambda state: has_item(state, player,"World Card Atlantica") + multiworld.get_location("Heartless Bandit" , player).access_rule = lambda state: has_item(state, player,"World Card Agrabah") + multiworld.get_location("Heartless Barrel Spider" , player).access_rule = lambda state: has_item(state, player,"World Card Monstro") or has_item(state, player,"World Card Agrabah") or has_item(state, player,"World Card Neverland") or has_item(state, player,"World Card Destiny Islands") + multiworld.get_location("Heartless Bouncywild" , player).access_rule = lambda state: has_item(state, player,"World Card Olympus Coliseum") + multiworld.get_location("Heartless Creeper Plant" , player).access_rule = lambda state: has_item(state, player,"World Card Wonderland") or has_item(state, player,"World Card Halloween Town") or has_item(state, player,"World Card Destiny Islands") + multiworld.get_location("Heartless Crescendo" , player).access_rule = lambda state: has_item(state, player,"World Card Wonderland") or has_item(state, player,"World Card Neverland") or has_item(state, player,"World Card Destiny Islands") + multiworld.get_location("Heartless Darkball" , player).access_rule = lambda state: has_item(state, player,"World Card Atlantica") or has_item(state, player,"World Card Neverland") or has_item(state, player,"World Card Destiny Islands") or has_item(state, player,"World Card Castle Oblivion") + multiworld.get_location("Heartless Defender" , player).access_rule = lambda state: has_item(state, player,"World Card Hollow Bastion") or has_item(state, player,"World Card Castle Oblivion") + multiworld.get_location("Heartless Fat Bandit" , player).access_rule = lambda state: has_item(state, player,"World Card Agrabah") + multiworld.get_location("Heartless Gargoyle" , player).access_rule = lambda state: has_item(state, player,"World Card Halloween Town") + multiworld.get_location("Heartless Green Requiem" , player).access_rule = lambda state: has_item(state, player,"World Card Monstro") or has_item(state, player,"World Card Agrabah") or has_item(state, player,"World Card Castle Oblivion") + multiworld.get_location("Heartless Large Body" , player).access_rule = lambda state: has_item(state, player,"World Card Wonderland") or has_item(state, player,"World Card Olympus Coliseum") + multiworld.get_location("Heartless Neoshadow" , player).access_rule = lambda state: has_item(state, player,"World Card Castle Oblivion") + multiworld.get_location("Heartless Pirate" , player).access_rule = lambda state: has_item(state, player,"World Card Neverland") + multiworld.get_location("Heartless Powerwild" , player).access_rule = lambda state: has_item(state, player,"World Card Olympus Coliseum") + multiworld.get_location("Heartless Screwdiver" , player).access_rule = lambda state: has_item(state, player,"World Card Atlantica") + multiworld.get_location("Heartless Sea Neon" , player).access_rule = lambda state: has_item(state, player,"World Card Atlantica") + multiworld.get_location("Heartless Search Ghost" , player).access_rule = lambda state: has_item(state, player,"World Card Monstro") or has_item(state, player,"World Card Atlantica") + multiworld.get_location("Heartless Tornado Step" , player).access_rule = lambda state: has_item(state, player,"World Card Monstro") or has_item(state, player,"World Card Hollow Bastion") or has_item(state, player,"World Card Destiny Islands") + multiworld.get_location("Heartless Wight Knight" , player).access_rule = lambda state: has_item(state, player,"World Card Halloween Town") + multiworld.get_location("Heartless Wizard" , player).access_rule = lambda state: has_item(state, player,"World Card Hollow Bastion") or has_item(state, player,"World Card Castle Oblivion") + multiworld.get_location("Heartless Wyvern" , player).access_rule = lambda state: has_item(state, player,"World Card Hollow Bastion") or has_item(state, player,"World Card Castle Oblivion") + multiworld.get_location("Heartless Yellow Opera" , player).access_rule = lambda state: has_item(state, player,"World Card Monstro") or has_item(state, player,"World Card Agrabah") or has_item(state, player,"World Card Neverland") or has_item(state, player,"World Card Castle Oblivion") + # Region rules. - multiworld.get_entrance("Floor 2" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "02") - multiworld.get_entrance("Floor 3" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "03") - multiworld.get_entrance("Floor 4" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "04") - multiworld.get_entrance("Floor 5" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "05") - multiworld.get_entrance("Floor 6" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "06") - multiworld.get_entrance("Floor 7" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "07") - multiworld.get_entrance("Floor 8" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "08") - multiworld.get_entrance("Floor 9" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "09") - multiworld.get_entrance("Floor 10" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "10") - multiworld.get_entrance("Floor 11" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "11") - multiworld.get_entrance("Floor 12" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "12") - multiworld.get_entrance("Floor 13" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "13") + multiworld.get_entrance("Floor 2" , player).access_rule = lambda state: has_item(state, player,"World Card Wonderland") + multiworld.get_entrance("Floor 3" , player).access_rule = lambda state: has_item(state, player,"World Card Olympus Coliseum") + multiworld.get_entrance("Floor 4" , player).access_rule = lambda state: has_item(state, player,"World Card Monstro") + multiworld.get_entrance("Floor 5" , player).access_rule = lambda state: has_item(state, player,"World Card Agrabah") + multiworld.get_entrance("Floor 6" , player).access_rule = lambda state: has_item(state, player,"World Card Halloween Town") + multiworld.get_entrance("Floor 7" , player).access_rule = lambda state: has_item(state, player,"World Card Atlantica") + multiworld.get_entrance("Floor 8" , player).access_rule = lambda state: has_item(state, player,"World Card Neverland") + multiworld.get_entrance("Floor 9" , player).access_rule = lambda state: has_item(state, player,"World Card Hollow Bastion") + multiworld.get_entrance("Floor 10" , player).access_rule = lambda state: has_item(state, player,"World Card 100 Acre Wood") + multiworld.get_entrance("Floor 11" , player).access_rule = lambda state: has_item(state, player,"World Card Twilight Town") + multiworld.get_entrance("Floor 12" , player).access_rule = lambda state: has_item(state, player,"World Card Destiny Islands") + multiworld.get_entrance("Floor 13" , player).access_rule = lambda state: has_item(state, player,"World Card Castle Oblivion") # Options - if not multiworld.enemy_cards[player]: - for location in multiworld.get_locations(player): - if location.name in get_locations_by_category("Enemy Unlock").keys(): - location.progress_type = LocationProgressType.EXCLUDED if multiworld.prioritize_bosses[player]: for location in multiworld.get_locations(player): if location.name in get_locations_by_category("Boss").keys(): location.progress_type = LocationProgressType.PRIORITY + # Win condition. - multiworld.completion_condition[player] = lambda state: state.has_all({"Donald", "Goofy", "Aladdin", "Ariel", "Beast", "Jack", "Peter Pan"}, player) + multiworld.completion_condition[player] = lambda state: state.has_all({"Friend Card Donald", "Friend Card Goofy", "Friend Card Aladdin", "Friend Card Ariel", "Friend Card Beast", "Friend Card Jack", "Friend Card Peter Pan"}, player) diff --git a/worlds/khcom/__init__.py b/worlds/khcom/__init__.py index f67fc318fd0e..e6c3688e385f 100644 --- a/worlds/khcom/__init__.py +++ b/worlds/khcom/__init__.py @@ -3,11 +3,12 @@ from BaseClasses import Tutorial from worlds.AutoWorld import WebWorld, World from .Items import KHCOMItem, KHCOMItemData, event_item_table, get_items_by_category, item_table -from .Locations import KHCOMLocation, location_table +from .Locations import KHCOMLocation, location_table, get_locations_by_category from .Options import khcom_options from .Regions import create_regions from .Rules import set_rules from worlds.LauncherComponents import Component, components, Type, launch_subprocess +import random @@ -54,6 +55,14 @@ 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()),3) + starting_worlds = get_items_by_category("World Unlocks") + starting_worlds = random.sample(list(starting_worlds.keys()),3) + i = 0 + while i < 3: + self.multiworld.get_location(starting_locations[i], self.player).place_locked_item(self.create_item(starting_worlds[i])) + i = i + 1 total_locations = len(self.multiworld.get_unfilled_locations(self.player)) for name, data in item_table.items(): quantity = data.max_quantity @@ -61,8 +70,8 @@ def create_items(self): # Ignore filler, it will be added in a later stage. if data.category == "Filler": continue - - item_pool += [self.create_item(name) for _ in range(0, quantity)] + if name not in starting_worlds: + item_pool += [self.create_item(name) for _ in range(0, quantity)] # Fill any empty locations with filler items. while len(item_pool) < total_locations: @@ -74,7 +83,7 @@ def get_filler_item_name(self) -> str: fillers = get_items_by_category("Filler") weights = [data.weight for data in fillers.values()] return self.multiworld.random.choices([filler for filler in fillers.keys()], weights, k=1)[0] - + def create_item(self, name: str) -> KHCOMItem: data = item_table[name] return KHCOMItem(name, data.classification, data.code, self.player)