Merged in DR v1.2.0.10

This commit is contained in:
codemann8
2023-03-02 19:07:04 -06:00
11 changed files with 45 additions and 15 deletions

View File

@@ -160,7 +160,7 @@ class World(object):
set_player_attr('pot_contents', None)
set_player_attr('pseudoboots', False)
set_player_attr('collection_rate', False)
set_player_attr('colorizepots', False)
set_player_attr('colorizepots', True)
set_player_attr('pot_pool', {})
set_player_attr('decoupledoors', False)
set_player_attr('door_type_mode', 'original')

2
CLI.py
View File

@@ -214,7 +214,7 @@ def parse_settings():
"keydropshuffle": False,
"dropshuffle": False,
"pottery": "none",
"colorizepots": False,
"colorizepots": True,
"shufflepots": False,
"mapshuffle": False,
"compassshuffle": False,

View File

@@ -1175,8 +1175,19 @@ item_alternates = {
def modify_pool_for_start_inventory(start_inventory, world, player):
# skips custom item pools - these shouldn't be adjusted
if (world.customizer and world.customizer.get_item_pool()) or world.custom:
# custom item pools only adjust in dungeon items
for item in start_inventory:
if item.dungeon:
d = world.get_dungeon(item.dungeon, item.player)
match = next((i for i in d.all_items if i.name == item.name), None)
if match:
if match.map or match.compass:
d.dungeon_items.remove(match)
elif match.smallkey:
d.small_keys.remove(match)
elif match.bigkey and d.big_key == match:
d.big_key = None
return
for item in start_inventory:
if item.player == player:
@@ -1202,8 +1213,8 @@ def modify_pool_for_start_inventory(start_inventory, world, player):
d.dungeon_items.remove(match)
elif match.smallkey:
d.small_keys.remove(match)
elif match.bigkey:
d.big_key.remove(match)
elif match.bigkey and d.big_key == match:
d.big_key = None
def make_custom_item_pool(world, player, progressive, shuffle, difficulty, timer, goal, mode, swords, bombbag, customitemarray):

View File

@@ -2094,6 +2094,12 @@ def validate_key_placement(key_layout, world, player):
if world.bigkeyshuffle[player]:
max_counter = find_max_counter(key_layout)
big_key_outside = bigkey_name not in (l.item.name for l in max_counter.free_locations if l.item)
for i in world.precollected_items:
if i.player == player and i.name == bigkey_name:
big_key_outside = True
break
if i.player == player and i.name == smallkey_name:
keys_outside += 1
for code, counter in key_layout.key_counters.items():
if len(counter.child_doors) == 0:

View File

@@ -36,7 +36,7 @@ from source.overworld.EntranceShuffle2 import link_entrances_new
from source.tools.BPS import create_bps_from_data
from source.classes.CustomSettings import CustomSettings
__version__ = '1.2.0.9-u'
__version__ = '1.2.0.10u'
from source.classes.BabelFish import BabelFish

View File

@@ -108,6 +108,14 @@ These are now independent of retro mode and have three options: None, Random, an
* Bonk Fairy (Dark)
# Bug Fixes and Notes
* 1.2.0.10u
* Fixed overrun issues with edge transitions
* Better support for customized start_inventory with dungeon items
* Colorized pots now available with lottery. Default is on.
* Dungeon_only support pottery
* Fix AllowAccidentalGlitches flag in OWG
* Potential fix for mirror portal and entering cave on same frame
* A few other minor issues, generation and graphical
* 1.2.0.9-u
* Disallowed standard exits (due to ER) are now graphically half blocked instead of missing
* Graphical issues with Sanctuary and Swamp Hub lobbies are fixed

9
Rom.py
View File

@@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '695fe1ac7794b8fc2383454eb15cbdd5'
RANDOMIZERBASEHASH = '7043e64e74b2452367de7cc146873524'
class JsonRom(object):
@@ -1586,7 +1586,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
rom.write_byte(0x1800A3, 0x01) # enable correct world setting behaviour after agahnim kills
rom.write_byte(0x1800A4, 0x01 if world.logic[player] != 'nologic' else 0x00) # enable POD EG fix
rom.write_byte(0x180042, 0x01 if world.save_and_quit_from_boss else 0x00) # Allow Save and Quit after boss kill
rom.write_byte(0x180358, 0x01 if world.logic[player] in ['owglitches', 'nologic'] else 0x00)
rom.write_byte(0x180358, 0x01 if (world.logic[player] in ['owglitches', 'nologic']) else 0x00)
# remove shield from uncle
rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
@@ -1689,9 +1689,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
Room0127.write_to_rom(snes_to_pc(0x2B8000), rom)
if world.pot_contents[player]:
colorize_pots = is_mystery or (world.pottery[player] not in ['vanilla', 'lottery']
and (world.colorizepots[player]
or world.pottery[player] in ['reduced', 'clustered']))
colorize_pots = (world.pottery[player] != 'vanilla'
and (world.colorizepots[player] or world.pottery[player] in ['reduced', 'clustered']))
if world.pot_contents[player].size() > 0x2800:
raise Exception('Pot table is too big for current area')
world.pot_contents[player].write_pot_data_to_rom(rom, colorize_pots)

View File

@@ -1851,6 +1851,8 @@ def eval_small_key_door_main(state, door_name, dungeon, player):
if state.is_door_open(door_name, player):
return True
key_logic = state.world.key_logic[player][dungeon]
if door_name not in key_logic.door_rules:
return False
door_rule = key_logic.door_rules[door_name]
door_openable = False
for ruleType, number in door_rule.new_rules.items():

Binary file not shown.

View File

@@ -3,7 +3,7 @@ import logging
from collections import defaultdict
from source.item.District import resolve_districts
from BaseClasses import PotItem, PotFlags
from BaseClasses import PotItem, PotFlags, LocationType
from DoorShuffle import validate_vanilla_reservation
from Dungeons import dungeon_table
from Items import item_table, ItemFactory
@@ -82,8 +82,8 @@ def create_item_pool_config(world):
if pot.item not in [PotItem.Key, PotItem.Hole, PotItem.Switch]:
item = pot_items[pot.item]
descriptor = 'Large Block' if pot.flags & PotFlags.Block else f'Pot #{pot_index+1}'
location = f'{pot.room} {descriptor}'
config.static_placement[player][item].append(location)
loc = f'{pot.room} {descriptor}'
config.static_placement[player][item].append(loc)
if world.shopsanity[player]:
for item, locs in shop_vanilla_mapping.items():
config.static_placement[player][item].extend(locs)
@@ -164,6 +164,10 @@ def create_item_pool_config(world):
mode_grouping['Heart Containers'] + mode_grouping['GT Trash'] + mode_grouping['Small Keys'] +
mode_grouping['Compasses'] + mode_grouping['Maps'] + mode_grouping['Key Drops'] +
mode_grouping['Pot Keys'] + mode_grouping['Big Key Drops'])
dungeon_set = set(dungeon_set)
for loc in world.get_locations():
if loc.parent_region.dungeon and loc.type in [LocationType.Pot, LocationType.Drop]:
dungeon_set.add(loc.name)
for player in range(1, world.players + 1):
config.item_pool[player] = determine_major_items(world, player)
config.location_groups[0].locations = set(dungeon_set)

View File

@@ -111,7 +111,7 @@ def roll_settings(weights):
ret.dropshuffle = get_choice('dropshuffle') == 'on' or keydropshuffle
ret.pottery = get_choice('pottery') if 'pottery' in weights else 'none'
ret.pottery = 'keys' if ret.pottery == 'none' and keydropshuffle else ret.pottery
ret.colorizepots = get_choice('colorizepots') == 'on'
ret.colorizepots = get_choice_default('colorizepots', default='on') == 'on'
ret.shufflepots = get_choice('pot_shuffle') == 'on'
ret.mixed_travel = get_choice('mixed_travel') if 'mixed_travel' in weights else 'prevent'
ret.standardize_palettes = (get_choice('standardize_palettes') if 'standardize_palettes' in weights