Various fixes:
Full boss shuffle samples without replacement Vanilla doors simply unmarks ugly smalls Money balance: handle multiworld solvent players better Perf for item pool adjustment Add loglevel to Mystery
This commit is contained in:
@@ -176,8 +176,8 @@ def place_bosses(world, player):
|
||||
|
||||
if world.boss_shuffle[player] == "simple": # vanilla bosses shuffled
|
||||
bosses = placeable_bosses + ['Armos Knights', 'Lanmolas', 'Moldorm']
|
||||
else: # all bosses present, the three duplicates chosen at random
|
||||
bosses = all_bosses + [random.choice(placeable_bosses) for _ in range(3)]
|
||||
else: # all bosses present, the three duplicates chosen at random
|
||||
bosses = all_bosses + random.sample(placeable_bosses, 3)
|
||||
|
||||
logging.getLogger('').debug('Bosses chosen %s', bosses)
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ def link_doors_main(world, player):
|
||||
connect_portal(portal, world, player)
|
||||
if not world.doorShuffle[player] == 'vanilla':
|
||||
fix_big_key_doors_with_ugly_smalls(world, player)
|
||||
else:
|
||||
unmark_ugly_smalls(world, player)
|
||||
if world.doorShuffle[player] == 'vanilla':
|
||||
for entrance, ext in open_edges:
|
||||
connect_two_way(world, entrance, ext, player)
|
||||
@@ -316,6 +318,13 @@ def connect_one_way(world, entrancename, exitname, player):
|
||||
y.dest = x
|
||||
|
||||
|
||||
def unmark_ugly_smalls(world, player):
|
||||
for d in ['Eastern Hint Tile Blocked Path SE', 'Eastern Darkness S', 'Thieves Hallway SE', 'Mire Left Bridge S',
|
||||
'TR Lava Escape SE', 'GT Hidden Spikes SE']:
|
||||
door = world.get_door(d, player)
|
||||
door.smallKey = False
|
||||
|
||||
|
||||
def fix_big_key_doors_with_ugly_smalls(world, player):
|
||||
remove_ugly_small_key_doors(world, player)
|
||||
unpair_big_key_doors(world, player)
|
||||
|
||||
2
Fill.py
2
Fill.py
@@ -736,7 +736,7 @@ def balance_money_progression(world):
|
||||
solvent.add(player)
|
||||
if sphere_costs[player] > 0 and sphere_costs[player] > wallet[player]:
|
||||
insolvent.add(player)
|
||||
if len(solvent) == 0:
|
||||
if len([p for p in solvent if len(locked_by_money[p]) > 0]) == 0:
|
||||
target_player = min(insolvent, key=lambda p: sphere_costs[p]-wallet[p])
|
||||
difference = sphere_costs[target_player]-wallet[target_player]
|
||||
logger.debug(f'Money balancing needed: Player {target_player} short {difference}')
|
||||
|
||||
@@ -347,11 +347,11 @@ def generate_itempool(world, player):
|
||||
# rather than making all hearts/heart pieces progression items (which slows down generation considerably)
|
||||
# We mark one random heart container as an advancement item (or 4 heart pieces in expert mode)
|
||||
if world.difficulty[player] in ['normal', 'hard'] and not (world.custom and world.customitemarray[player]["heartcontainer"] == 0):
|
||||
[item for item in items if item.name == 'Boss Heart Container'][0].advancement = True
|
||||
next(item for item in items if item.name == 'Boss Heart Container').advancement = True
|
||||
elif world.difficulty[player] in ['expert'] and not (world.custom and world.customitemarray[player]["heartpiece"] < 4):
|
||||
adv_heart_pieces = [item for item in items if item.name == 'Piece of Heart'][0:4]
|
||||
for hp in adv_heart_pieces:
|
||||
hp.advancement = True
|
||||
adv_heart_pieces = (item for item in items if item.name == 'Piece of Heart')
|
||||
for i in range(4):
|
||||
next(adv_heart_pieces).advancement = True
|
||||
|
||||
beeweights = {'0': {None: 100},
|
||||
'1': {None: 75, 'trap': 25},
|
||||
|
||||
@@ -31,6 +31,7 @@ def main():
|
||||
parser.add_argument('--rom')
|
||||
parser.add_argument('--enemizercli')
|
||||
parser.add_argument('--outputpath')
|
||||
parser.add_argument('--loglevel', default='info', choices=['debug', 'info', 'warning', 'error', 'critical'])
|
||||
for player in range(1, multiargs.multi + 1):
|
||||
parser.add_argument(f'--p{player}', help=argparse.SUPPRESS)
|
||||
args = parser.parse_args()
|
||||
@@ -63,6 +64,7 @@ def main():
|
||||
erargs.race = True
|
||||
erargs.outputname = seedname
|
||||
erargs.outputpath = args.outputpath
|
||||
erargs.loglevel = args.loglevel
|
||||
|
||||
if args.rom:
|
||||
erargs.rom = args.rom
|
||||
|
||||
Reference in New Issue
Block a user