Fix documentation and example
Fix msu_resume issue Fix empty locations Throw error on unknown items
This commit is contained in:
2
Fill.py
2
Fill.py
@@ -451,6 +451,8 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
|
|||||||
|
|
||||||
def ensure_good_pots(world, write_skips=False):
|
def ensure_good_pots(world, write_skips=False):
|
||||||
for loc in world.get_locations():
|
for loc in world.get_locations():
|
||||||
|
if loc.item is None:
|
||||||
|
loc.item = ItemFactory('Nothing', loc.player)
|
||||||
# convert Arrows 5 and Nothing when necessary
|
# convert Arrows 5 and Nothing when necessary
|
||||||
if (loc.item.name in {'Arrows (5)', 'Nothing'}
|
if (loc.item.name in {'Arrows (5)', 'Nothing'}
|
||||||
and (loc.type != LocationType.Pot or loc.item.player != loc.player)):
|
and (loc.type != LocationType.Pot or loc.item.player != loc.player)):
|
||||||
|
|||||||
3
Items.py
3
Items.py
@@ -14,8 +14,7 @@ def ItemFactory(items, player):
|
|||||||
advancement, priority, type, code, price, pedestal_hint, pedestal_credit, sickkid_credit, zora_credit, witch_credit, fluteboy_credit, hint_text = item_table[item]
|
advancement, priority, type, code, price, pedestal_hint, pedestal_credit, sickkid_credit, zora_credit, witch_credit, fluteboy_credit, hint_text = item_table[item]
|
||||||
ret.append(Item(item, advancement, priority, type, code, price, pedestal_hint, pedestal_credit, sickkid_credit, zora_credit, witch_credit, fluteboy_credit, hint_text, player))
|
ret.append(Item(item, advancement, priority, type, code, price, pedestal_hint, pedestal_credit, sickkid_credit, zora_credit, witch_credit, fluteboy_credit, hint_text, player))
|
||||||
else:
|
else:
|
||||||
logging.getLogger('').warning('Unknown Item: %s', item)
|
raise RuntimeError(f'Unknown Item: {item}')
|
||||||
return None
|
|
||||||
|
|
||||||
if singleton:
|
if singleton:
|
||||||
return ret[0]
|
return ret[0]
|
||||||
|
|||||||
2
Main.py
2
Main.py
@@ -33,7 +33,7 @@ from source.overworld.EntranceShuffle2 import link_entrances_new
|
|||||||
from source.tools.BPS import create_bps_from_data
|
from source.tools.BPS import create_bps_from_data
|
||||||
from source.classes.CustomSettings import CustomSettings
|
from source.classes.CustomSettings import CustomSettings
|
||||||
|
|
||||||
__version__ = '1.0.1.12v'
|
__version__ = '1.0.1.12w'
|
||||||
|
|
||||||
from source.classes.BabelFish import BabelFish
|
from source.classes.BabelFish import BabelFish
|
||||||
|
|
||||||
|
|||||||
2
Rom.py
2
Rom.py
@@ -2268,7 +2268,7 @@ def write_strings(rom, world, player, team):
|
|||||||
random.shuffle(items_to_hint)
|
random.shuffle(items_to_hint)
|
||||||
hint_count = 5 if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull'] else 8
|
hint_count = 5 if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull'] else 8
|
||||||
hint_count += 2 if world.doorShuffle[player] == 'crossed' else 0
|
hint_count += 2 if world.doorShuffle[player] == 'crossed' else 0
|
||||||
while hint_count > 0:
|
while hint_count > 0 and len(items_to_hint) > 0:
|
||||||
this_item = items_to_hint.pop(0)
|
this_item = items_to_hint.pop(0)
|
||||||
this_location = world.find_items_not_key_only(this_item, player)
|
this_location = world.find_items_not_key_only(this_item, player)
|
||||||
random.shuffle(this_location)
|
random.shuffle(this_location)
|
||||||
|
|||||||
@@ -160,14 +160,14 @@ This is done as `<dungeon>: <boss>`
|
|||||||
|
|
||||||
E.g. `Skull Woods: Helmasaur King` for helmacopter. Be sure to turn on at least one enemizer setting for the bosses to actually be randomized.
|
E.g. `Skull Woods: Helmasaur King` for helmacopter. Be sure to turn on at least one enemizer setting for the bosses to actually be randomized.
|
||||||
|
|
||||||
### startinventory
|
### start_inventory
|
||||||
|
|
||||||
This must be defined by player. Each player number should be listed with a list of items to start with.
|
This must be defined by player. Each player number should be listed with a list of items to start with.
|
||||||
|
|
||||||
This is a yaml list (note the hyphens):
|
This is a yaml list (note the hyphens):
|
||||||
|
|
||||||
```
|
```
|
||||||
startinventory:
|
start_inventory:
|
||||||
1:
|
1:
|
||||||
- Pegasus Boots
|
- Pegasus Boots
|
||||||
- Progressive Sword
|
- Progressive Sword
|
||||||
|
|||||||
125
docs/SuperTrueIceRodHunt.yaml
Normal file
125
docs/SuperTrueIceRodHunt.yaml
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
meta:
|
||||||
|
algorithm: balanced
|
||||||
|
players: 1
|
||||||
|
settings:
|
||||||
|
1:
|
||||||
|
door_shuffle: vanilla
|
||||||
|
dropshuffle: true
|
||||||
|
experimental: true
|
||||||
|
goal: ganon
|
||||||
|
hints: false
|
||||||
|
intensity: 1
|
||||||
|
pseudoboots: false
|
||||||
|
pottery: lottery
|
||||||
|
shopsanity: false
|
||||||
|
shuffle: vanilla
|
||||||
|
shufflelinks: false
|
||||||
|
shufflebosses: false
|
||||||
|
item_pool:
|
||||||
|
1:
|
||||||
|
Ice Rod: 1
|
||||||
|
Progressive Sword: 1
|
||||||
|
placements:
|
||||||
|
1:
|
||||||
|
Turtle Rock - Boss: Triforce
|
||||||
|
start_inventory:
|
||||||
|
1:
|
||||||
|
- Progressive Bow
|
||||||
|
- Progressive Bow
|
||||||
|
- Blue Boomerang
|
||||||
|
- Red Boomerang
|
||||||
|
- Hookshot
|
||||||
|
- Mushroom
|
||||||
|
- Magic Powder
|
||||||
|
- Fire Rod
|
||||||
|
- Bombos
|
||||||
|
- Ether
|
||||||
|
- Quake
|
||||||
|
- Lamp
|
||||||
|
- Hammer
|
||||||
|
- Ocarina
|
||||||
|
- Bug Catching Net
|
||||||
|
- Book of Mudora
|
||||||
|
- Shovel
|
||||||
|
- Cane of Somaria
|
||||||
|
- Cane of Byrna
|
||||||
|
- Cape
|
||||||
|
- Magic Mirror
|
||||||
|
- Moon Pearl
|
||||||
|
- Titans Mitts
|
||||||
|
- Tempered Sword
|
||||||
|
- Pegasus Boots
|
||||||
|
- Flippers
|
||||||
|
- Red Mail
|
||||||
|
- Progressive Shield
|
||||||
|
- Progressive Shield
|
||||||
|
- Bottle (Red Potion)
|
||||||
|
- Bottle (Green Potion)
|
||||||
|
- Bottle (Blue Potion)
|
||||||
|
- Bottle (Fairy)
|
||||||
|
- Magic Upgrade (1/2)
|
||||||
|
- Magic Upgrade (1/2)
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Boss Heart Container
|
||||||
|
- Arrows (10)
|
||||||
|
- Arrows (10)
|
||||||
|
- Arrows (10)
|
||||||
|
- Bombs (10)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (300)
|
||||||
|
- Rupees (50)
|
||||||
|
- Rupees (20)
|
||||||
|
- Rupees (20)
|
||||||
|
- Rupees (5)
|
||||||
|
- Rupee (1)
|
||||||
|
- Rupee (1)
|
||||||
|
- Rupee (1)
|
||||||
|
- Rupee (1)
|
||||||
|
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ bosses:
|
|||||||
Palace of Darkness: Arrghus
|
Palace of Darkness: Arrghus
|
||||||
Thieves Town: Blind
|
Thieves Town: Blind
|
||||||
Ganons Tower (top): Vitreous
|
Ganons Tower (top): Vitreous
|
||||||
startinventory:
|
start_inventory:
|
||||||
1:
|
1:
|
||||||
- Pegasus Boots
|
- Pegasus Boots
|
||||||
|
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ def adjust_page(top, parent, settings):
|
|||||||
"nobgm": "disablemusic",
|
"nobgm": "disablemusic",
|
||||||
"reduce_flashing": "reduce_flashing",
|
"reduce_flashing": "reduce_flashing",
|
||||||
"shuffle_sfx": "shuffle_sfx",
|
"shuffle_sfx": "shuffle_sfx",
|
||||||
|
"msu_resume": "msu_resume",
|
||||||
}
|
}
|
||||||
guiargs = Namespace()
|
guiargs = Namespace()
|
||||||
for option in options:
|
for option in options:
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ class EntrancePool(object):
|
|||||||
self.links_on_mountain = False
|
self.links_on_mountain = False
|
||||||
self.decoupled_entrances = []
|
self.decoupled_entrances = []
|
||||||
self.decoupled_exits = []
|
self.decoupled_exits = []
|
||||||
|
self.original_entrances = set()
|
||||||
|
self.original_exits = set()
|
||||||
|
|
||||||
self.world = world
|
self.world = world
|
||||||
self.player = player
|
self.player = player
|
||||||
@@ -48,6 +50,8 @@ def link_entrances_new(world, player):
|
|||||||
avail_pool.exits.add('Inverted Dark Sanctuary Exit')
|
avail_pool.exits.add('Inverted Dark Sanctuary Exit')
|
||||||
inverted_substitution(avail_pool, avail_pool.entrances, True, True)
|
inverted_substitution(avail_pool, avail_pool.entrances, True, True)
|
||||||
inverted_substitution(avail_pool, avail_pool.exits, False, True)
|
inverted_substitution(avail_pool, avail_pool.exits, False, True)
|
||||||
|
avail_pool.original_entrances.update(avail_pool.entrances)
|
||||||
|
avail_pool.original_exits.update(avail_pool.exits)
|
||||||
default_map = {}
|
default_map = {}
|
||||||
default_map.update(entrance_map)
|
default_map.update(entrance_map)
|
||||||
one_way_map = {}
|
one_way_map = {}
|
||||||
@@ -378,7 +382,7 @@ def do_holes_and_linked_drops(entrances, exits, avail, cross_world, keep_togethe
|
|||||||
|
|
||||||
hole_entrances, hole_targets = [], []
|
hole_entrances, hole_targets = [], []
|
||||||
for hole in drop_map:
|
for hole in drop_map:
|
||||||
if hole in entrances and hole in linked_drop_map:
|
if hole in avail.original_entrances and hole in linked_drop_map:
|
||||||
linked_entrance = linked_drop_map[hole]
|
linked_entrance = linked_drop_map[hole]
|
||||||
if hole in entrances and linked_entrance in entrances:
|
if hole in entrances and linked_entrance in entrances:
|
||||||
hole_entrances.append((linked_entrance, hole))
|
hole_entrances.append((linked_entrance, hole))
|
||||||
|
|||||||
Reference in New Issue
Block a user