fix: customizer errors

fix: poor enemy placement
fix: insanity rng
This commit is contained in:
aerinon
2023-11-27 16:41:58 -07:00
parent f2a40b0941
commit 93211567c2
6 changed files with 45 additions and 26 deletions

View File

@@ -836,6 +836,7 @@ def link_entrances(world, player):
random.shuffle(hole_targets)
random.shuffle(exit_pool)
# fill up holes
for hole in hole_entrances:
connect_entrance(world, hole, hole_targets.pop(), player)
@@ -851,6 +852,7 @@ def link_entrances(world, player):
caves.append(('Hyrule Castle Exit (South)', 'Hyrule Castle Exit (West)', 'Hyrule Castle Exit (East)'))
if not invFlag:
exit_pool.append('Hyrule Castle Entrance (South)')
random.shuffle(doors)
# place links house
if world.mode[player] == 'standard' or not world.shufflelinks[player]:

View File

@@ -220,10 +220,11 @@ def main(args, seed=None, fish=None):
if world.customizer and world.customizer.get_start_inventory():
for p, inv_list in world.customizer.get_start_inventory().items():
for inv_item in inv_list:
item = ItemFactory(inv_item.strip(), p)
if item:
world.push_precollected(item)
if inv_list:
for inv_item in inv_list:
item = ItemFactory(inv_item.strip(), p)
if item:
world.push_precollected(item)
if args.print_custom_yaml:
world.settings.record_info(world)

View File

@@ -167,6 +167,7 @@ UwGeneralDeny:
- [ 0x0067, 1, [ "RollerVerticalUp", "RollerVerticalDown" ] ] #"Skull Woods - Firebar Pits - Blue Bari 1"
- [ 0x0067, 2, ["Bumper"]] #"Skull Woods - Firebar Pits - Blue Bari 2"
- [ 0x0067, 3, [ "RollerVerticalUp", "RollerVerticalDown" ] ] #"Skull Woods - Firebar Pits - Hardhat Beetle 1"
- [ 0x0067, 4, [ "AntiFairyCircle", "Bumper" ]]
- [ 0x0067, 5, [ "RollerVerticalDown" ] ] #"Skull Woods - Firebar Pits - Hardhat Beetle 3"
- [ 0x0067, 6, [ "RollerVerticalDown" ] ] #"Skull Woods - Firebar Pits - Hardhat Beetle 4"
- [ 0x0067, 7, [ "Beamos", "AntiFairyCircle", "Bumper", "BunnyBeam" ] ] #"Skull Woods - Firebar Pits - Fire Bar (Clockwise)"

View File

@@ -70,11 +70,11 @@ def bottom_frame(self, parent, args=None):
def generateRom():
guiargs = create_guiargs(parent)
# get default values for missing parameters
for k,v in vars(parse_cli(['--multi', str(guiargs.multi)])).items():
for k,v in vars(parse_cli(['--multi', str(guiargs.multi), '--customizer', str(guiargs.customizer)])).items():
if k not in vars(guiargs):
setattr(guiargs, k, v)
elif type(v) is dict: # use same settings for every player
setattr(guiargs, k, {player: getattr(guiargs, k) for player in range(1, guiargs.multi + 1)})
setattr(guiargs, k, {player: getattr(guiargs, k) for player in range(1, len(v) + 1)})
argsDump = vars(guiargs)
needEnemizer = False

View File

@@ -43,6 +43,23 @@ def roll_settings(weights):
return choice
raise Exception("This fields needs to be true/false or off/on")
def get_choice_non_bool(option, root=weights):
choice = get_choice(option, root)
if choice is True or choice == 'on':
return 'on'
if choice is False or choice == 'off':
return 'off'
return choice
def get_choice_yn(option, root=weights):
choice = get_choice(option, root)
if choice is True or choice == 'yes':
return 'yes'
if choice is False or choice == 'no':
return 'no'
return choice
def get_choice_bool_default(option, root=weights, default=None):
choice = get_choice_bool(option, root)
if choice is None and default is not None:
@@ -107,7 +124,7 @@ def roll_settings(weights):
ret.experimental = get_choice_bool('experimental')
ret.collection_rate = get_choice_bool('collection_rate')
ret.dungeon_counters = get_choice('dungeon_counters') if 'dungeon_counters' in weights else 'default'
ret.dungeon_counters = get_choice_non_bool('dungeon_counters') if 'dungeon_counters' in weights else 'default'
if ret.dungeon_counters == 'default':
ret.dungeon_counters = 'pickup' if ret.door_shuffle != 'vanilla' or ret.compassshuffle == 'on' else 'off'
@@ -138,7 +155,7 @@ def roll_settings(weights):
'ganonhunt': 'ganonhunt',
'completionist': 'completionist'
}[goal]
ret.openpyramid = get_choice('open_pyramid') if 'open_pyramid' in weights else 'auto'
ret.openpyramid = get_choice_yn('open_pyramid') if 'open_pyramid' in weights else 'auto'
ret.crystals_gt = get_choice('tower_open')
@@ -220,7 +237,7 @@ def roll_settings(weights):
ret.reduce_flashing = get_choice_bool('reduce_flashing', romweights)
ret.fastmenu = get_choice('menuspeed', romweights)
ret.heartcolor = get_choice('heartcolor', romweights)
ret.heartbeep = get_choice('heartbeep', romweights)
ret.heartbeep = get_choice_non_bool('heartbeep', romweights)
ret.ow_palettes = get_choice('ow_palettes', romweights)
ret.uw_palettes = get_choice('uw_palettes', romweights)
ret.shuffle_sfx = get_choice_bool('shuffle_sfx', romweights)

View File

@@ -1,6 +1,5 @@
meta:
players: 2
seed: 400
seed: 398
settings:
1:
# mode: standard
@@ -10,17 +9,16 @@ settings:
# enemy_shuffle: shuffled
# door_shuffle: crossed
# intensity: 3
shuffle: lean
shuffle: insanity
experimental: on
# dungeon_counters: 'on'
2: {}
entrances:
1:
entrances:
Hyrule Castle Secret Entrance Drop: Lumberjack Tree (top)
two-way:
Hyrule Castle Entrance (South): Links House Exit
2: {}
#entrances:
# 1:
# entrances:
# Hyrule Castle Secret Entrance Drop: Lumberjack Tree (top)
# two-way:
# Hyrule Castle Entrance (South): Links House Exit
#doors:
# 1:
# lobbies:
@@ -33,14 +31,14 @@ entrances:
#bosses:
# 1:
# Ganons Tower (middle): Trinexx
placements:
1:
Lumberjack Tree: Lamp#2
Link's House: Lamp
2: {}
# keyshuffle: wild
#placements:
# 1:
# Lumberjack Tree: Lamp#2
# Link's House: Lamp
#placements:
# 1:
# 'Hera Basement Cage Enemy #4': Small Key (Palace of Darkness)