Couple of big key logic fixes - one with bk forced
Another with bk assumed to be found early in dungeon Catobat map check fix from rom
This commit is contained in:
@@ -142,6 +142,7 @@ class World(object):
|
|||||||
set_player_attr('force_fix', {'gt': False, 'sw': False, 'pod': False, 'tr': False})
|
set_player_attr('force_fix', {'gt': False, 'sw': False, 'pod': False, 'tr': False})
|
||||||
|
|
||||||
set_player_attr('exp_cache', defaultdict(dict))
|
set_player_attr('exp_cache', defaultdict(dict))
|
||||||
|
set_player_attr('enabled_entrances', {})
|
||||||
|
|
||||||
def get_name_string_for_object(self, obj):
|
def get_name_string_for_object(self, obj):
|
||||||
return obj.name if self.players == 1 else f'{obj.name} ({self.get_player_names(obj.player)})'
|
return obj.name if self.players == 1 else f'{obj.name} ({self.get_player_names(obj.player)})'
|
||||||
|
|||||||
@@ -282,6 +282,12 @@ def analyze_dungeon(key_layout, world, player):
|
|||||||
if not big_avail:
|
if not big_avail:
|
||||||
if chest_keys == non_big_locs and chest_keys > 0 and available <= possible_smalls and not avail_bigs:
|
if chest_keys == non_big_locs and chest_keys > 0 and available <= possible_smalls and not avail_bigs:
|
||||||
key_logic.bk_restricted.update(filter_big_chest(key_counter.free_locations))
|
key_logic.bk_restricted.update(filter_big_chest(key_counter.free_locations))
|
||||||
|
# note to self: this is due to the enough_small_locations function in validate_key_layout_sub_loop
|
||||||
|
# I don't like this exception here or there
|
||||||
|
elif available <= possible_smalls and avail_bigs and non_big_locs > 0:
|
||||||
|
max_ctr = find_max_counter(key_layout)
|
||||||
|
bk_lockdown = [x for x in max_ctr.free_locations if x not in key_counter.free_locations]
|
||||||
|
key_logic.bk_restricted.update(filter_big_chest(bk_lockdown))
|
||||||
# try to relax the rules here? - smallest requirement that doesn't force a softlock
|
# try to relax the rules here? - smallest requirement that doesn't force a softlock
|
||||||
child_queue = deque()
|
child_queue = deque()
|
||||||
for child in key_counter.child_doors.keys():
|
for child in key_counter.child_doors.keys():
|
||||||
@@ -1619,8 +1625,13 @@ def can_open_door_by_counter(door, counter: KeyCounter, layout, world, player):
|
|||||||
# ttl_small_key_only = len(counter.key_only_locations)
|
# ttl_small_key_only = len(counter.key_only_locations)
|
||||||
return cnt_avail_small_locations_by_ctr(ttl_locations, counter, layout, world, player) > 0
|
return cnt_avail_small_locations_by_ctr(ttl_locations, counter, layout, world, player) > 0
|
||||||
elif door.bigKey:
|
elif door.bigKey:
|
||||||
available_big_locations = cnt_avail_big_locations_by_ctr(ttl_locations, counter, layout, world, player)
|
if counter.big_key_opened:
|
||||||
return not counter.big_key_opened and available_big_locations > 0 and not layout.big_key_special
|
return False
|
||||||
|
if layout.big_key_special:
|
||||||
|
return any(x for x in counter.other_locations.keys() if x.forced_item and x.forced_item.bigkey)
|
||||||
|
else:
|
||||||
|
available_big_locations = cnt_avail_big_locations_by_ctr(ttl_locations, counter, layout, world, player)
|
||||||
|
return available_big_locations > 0
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
2
Main.py
2
Main.py
@@ -28,7 +28,7 @@ from Fill import sell_potions, sell_keys, balance_multiworld_progression, balanc
|
|||||||
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops
|
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops
|
||||||
from Utils import output_path, parse_player_names
|
from Utils import output_path, parse_player_names
|
||||||
|
|
||||||
__version__ = '0.5.1.0-u'
|
__version__ = '0.5.1.1-u'
|
||||||
|
|
||||||
from source.classes.BabelFish import BabelFish
|
from source.classes.BabelFish import BabelFish
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,17 @@ CLI: ```--bombbag```
|
|||||||
|
|
||||||
# Bug Fixes and Notes.
|
# Bug Fixes and Notes.
|
||||||
|
|
||||||
|
* 0.5.1.1
|
||||||
|
* Shop hints in ER are now more generic instead of using "near X" because they aren't near that anymore
|
||||||
|
* Added memory location for mutliworld scripts to read what item was just obtain (longer than one frame)
|
||||||
|
* Fix for bias in boss shuffle "full"
|
||||||
|
* Fix for certain lone big chests in keysanity (allowed you to get contents without big key)
|
||||||
|
* Fix for pinball checking
|
||||||
|
* Fix for multi-entrance dungeons
|
||||||
|
* 2 fixes for big key placement logic
|
||||||
|
* ensure big key is placed early if the validator assumes it)
|
||||||
|
* Open big key doors appropriately when generating rules and big key is forced somewhere
|
||||||
|
* Updated cutoff entrances for intensity 3
|
||||||
* 0.5.1.0
|
* 0.5.1.0
|
||||||
* Large logic refactor introducing a new method of key logic
|
* Large logic refactor introducing a new method of key logic
|
||||||
* Some performance optimization
|
* Some performance optimization
|
||||||
|
|||||||
Reference in New Issue
Block a user