fix: minor fix for take_anys
fix: money balancing - initialization in a good case
This commit is contained in:
@@ -1555,6 +1555,9 @@ class Region(object):
|
||||
|
||||
return self.is_dark_world if self.world.mode[player] != 'inverted' else self.is_light_world
|
||||
|
||||
def is_outdoors(self):
|
||||
return self.type in {RegionType.LightWorld, RegionType.DarkWorld}
|
||||
|
||||
def __str__(self):
|
||||
return str(self.__unicode__())
|
||||
|
||||
|
||||
1
Fill.py
1
Fill.py
@@ -1007,6 +1007,7 @@ def balance_money_progression(world):
|
||||
logger.debug(f'Money balancing needed: Player {target_player} short {difference}')
|
||||
else:
|
||||
difference = 0
|
||||
target_player = next(p for p in solvent)
|
||||
while difference > 0:
|
||||
swap_targets = [x for x in unchecked_locations if x not in sphere_locations and x.item.name.startswith('Rupees') and x.item.player == target_player]
|
||||
if len(swap_targets) == 0:
|
||||
|
||||
@@ -558,7 +558,9 @@ def set_up_take_anys(world, player, skip_adjustments=False):
|
||||
world.dynamic_regions.append(take_any)
|
||||
target, room_id = random.choice([(0x58, 0x0112), (0x60, 0x010F), (0x46, 0x011F)])
|
||||
reg = regions.pop()
|
||||
entrance = world.get_region(reg, player).entrances[0]
|
||||
entrance = next((ent for ent in world.get_region(reg, player).entrances if ent.parent_region.is_outdoors()), None)
|
||||
if entrance is None:
|
||||
raise Exception(f'No outside entrance found for {reg}')
|
||||
connect_entrance(world, entrance, take_any, player)
|
||||
entrance.target = target
|
||||
take_any.shop = Shop(take_any, room_id, take_any_type, 0xE3, True, not world.shopsanity[player], 33 + num*2)
|
||||
|
||||
Reference in New Issue
Block a user