Skip to content

Commit

Permalink
Floor 13 can now be accessed like any other floor
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Nov 6, 2023
1 parent af4b1d9 commit f7d3d20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions data/lua/connector_khcom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion worlds/khcom/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down

0 comments on commit f7d3d20

Please sign in to comment.