From f7d3d204a668752fb8201ec348716d124542147a Mon Sep 17 00:00:00 2001 From: gaithern Date: Mon, 6 Nov 2023 12:29:31 -0600 Subject: [PATCH] Floor 13 can now be accessed like any other floor --- data/lua/connector_khcom.lua | 17 +++++------------ worlds/khcom/Rules.py | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/data/lua/connector_khcom.lua b/data/lua/connector_khcom.lua index 6b0bc8b52b87..940d037fb646 100644 --- a/data/lua/connector_khcom.lua +++ b/data/lua/connector_khcom.lua @@ -632,7 +632,7 @@ function can_complete_floor(floor_number) return get_stored_gold_cards("Key of Beginnings", floor_number) > 0 and get_stored_gold_cards("Key of Guidance", floor_number) > 0 and get_stored_gold_cards("Key to Truth", floor_number) > 0 elseif floor_number == 12 then return get_stored_gold_cards("Key of Beginnings", floor_number) > 0 and get_stored_gold_cards("Key of Guidance", floor_number) > 0 - elseif floor_number == 11 or floor_number == 10 then + elseif floor_number == 11 or floor_number == 10 or floor_number == 13 then return get_stored_gold_cards("Key of Beginnings", floor_number) > 0 else return false @@ -665,13 +665,7 @@ function update_world_cards(current_floor) end function update_highest_warp_floor() - if can_complete_floor(12) then - memory.writebyte(highest_warp_floor_address, (14-1)*2) - return - else - memory.writebyte(highest_warp_floor_address, (12-1)*2) - return - end + memory.writebyte(highest_warp_floor_address, (14-1)*2) end function update_current_floor() @@ -692,7 +686,6 @@ function update_world_assignments() end i = i + 1 end - memory.writebyte(floor_assignment_addresses[13], floor_assignment_values[13]) end function update_map_cards() @@ -1009,11 +1002,11 @@ end function update_floor_status() i = 2 - while i < 13 do + while i <= 13 do if get_stored_gold_cards("Key of Beginnings", i) < 1 then - if i == 12 then + if i == 13 then memory.writebyte(floor_progress_addresses[i], 0x17) - memory.writebyte(floor_doors_addresses[i], 0x00) + memory.writebyte(floor_doors_addresses[i], 0x02) else memory.writebyte(floor_progress_addresses[i], 0x77) memory.writebyte(floor_doors_addresses[i], 0x03) diff --git a/worlds/khcom/Rules.py b/worlds/khcom/Rules.py index 34b72a89ae8b..5dd74cad7b19 100644 --- a/worlds/khcom/Rules.py +++ b/worlds/khcom/Rules.py @@ -70,7 +70,7 @@ def set_rules(multiworld: MultiWorld, player: int): 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_guidance (state, player, "12") + multiworld.get_entrance("Floor 13" , player).access_rule = lambda state: has_room_of_beginnings(state, player, "13") # Options if not multiworld.enemy_cards[player]: