Freeze fairy abyss/beam dash enemies
Fix original key drops on split supertiles (pokey 1) Fix mystery/customizer boolean issue Enemy bans
This commit is contained in:
@@ -13,6 +13,7 @@ import RaceRandom as random
|
||||
from BaseClasses import Location, LocationType, RegionType
|
||||
from EntranceShuffle import door_addresses
|
||||
from Items import ItemFactory
|
||||
from PotShuffle import key_drop_special
|
||||
from Utils import snes_to_pc, pc_to_snes, int16_as_bytes
|
||||
|
||||
|
||||
@@ -750,10 +751,10 @@ def init_vanilla_sprites():
|
||||
create_sprite(0x001c, EnemySprite.ArmosKnight, 0x00, 0, 0x07, 0x08)
|
||||
create_sprite(0x001c, EnemySprite.ArmosKnight, 0x00, 0, 0x04, 0x08)
|
||||
create_sprite(0x001c, 0x19, SpriteType.Overlord, 0, 0x07, 0x08)
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x07, 0x07, 'GT Fairy Abyss')
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x08, 0x07, 'GT Fairy Abyss')
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x07, 0x08, 'GT Fairy Abyss')
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x08, 0x08, 'GT Fairy Abyss')
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x07, 0x07, 'GT Fairy Abyss', fix=True)
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x08, 0x07, 'GT Fairy Abyss', fix=True)
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x07, 0x08, 'GT Fairy Abyss', fix=True)
|
||||
create_sprite(0x001c, EnemySprite.Faerie, 0x00, 0, 0x08, 0x08, 'GT Fairy Abyss', fix=True)
|
||||
create_sprite(0x001e, EnemySprite.CrystalSwitch, 0x00, 0, 0x1a, 0x09)
|
||||
create_sprite(0x001e, EnemySprite.RedBari, 0x00, 0, 0x16, 0x05, 'Ice Bomb Drop - Top')
|
||||
create_sprite(0x001e, EnemySprite.RedBari, 0x00, 0, 0x19, 0x05, 'Ice Bomb Drop - Top')
|
||||
@@ -2199,7 +2200,10 @@ def setup_enemy_dungeon_tables(world, player):
|
||||
if super_tile in splittable_supertiles:
|
||||
idx_adj = 0
|
||||
for index, sprite in enumerate(enemy_list):
|
||||
loc_name = f'{sprite.region} Enemy #{index+1}'
|
||||
if (super_tile, index) in key_drop_special:
|
||||
loc_name = key_drop_special[(super_tile, index)]
|
||||
else:
|
||||
loc_name = f'{sprite.region} Enemy #{index+1}'
|
||||
loc = world.get_location_unsafe(loc_name, player)
|
||||
if sprite.sub_type == 0x07: # overlord
|
||||
idx_adj += 1
|
||||
|
||||
@@ -110,7 +110,8 @@ def add_kholdstare_to_list(sprite_list, room_id):
|
||||
|
||||
|
||||
def add_vitreous_to_list(sprite_list, room_id):
|
||||
sprite_list.insert(0, create_sprite(room_id, EnemySprite.Vitreous, 0x00, 0, 0x07, 0x05))
|
||||
sprite_list.clear() # vitreous does not play nice which other sprites on the tile, just kill them
|
||||
sprite_list.append(create_sprite(room_id, EnemySprite.Vitreous, 0x00, 0, 0x07, 0x05))
|
||||
|
||||
|
||||
def add_trinexx_to_list(sprite_list, room_id):
|
||||
@@ -119,14 +120,8 @@ def add_trinexx_to_list(sprite_list, room_id):
|
||||
sprite_list.insert(2, create_sprite(room_id, EnemySprite.TrinexxIceHead, 0x00, 0, 0x07, 0x05))
|
||||
|
||||
|
||||
def boss_writes(world, player, rom):
|
||||
rom.write_byte(snes_to_pc(0x368107), 1) # centralize drops
|
||||
eye_number = random.randint(0, 8) # randomize moldorm eyes (var + 1)
|
||||
rom.write_byte(snes_to_pc(0x368102), eye_number) # enemizer flag
|
||||
rom.write_byte(snes_to_pc(0x1DDBB3), eye_number) # loop variable
|
||||
def boss_adjust(world, player):
|
||||
data_tables = world.data_tables[player]
|
||||
arrghus_can_swim = True
|
||||
water_tiles_on = True
|
||||
for dungeon in world.get_dungeons(player):
|
||||
for level, boss in dungeon.bosses.items():
|
||||
if not boss or boss.name in ['Agahnim', 'Agahnim2']:
|
||||
@@ -143,6 +138,22 @@ def boss_writes(world, player, rom):
|
||||
if len(sprite_list) > 16:
|
||||
del sprite_list[16:]
|
||||
data_tables.room_headers[room_id].sprite_sheet = required_boss_sheets[sprite_type]
|
||||
|
||||
|
||||
def boss_writes(world, player, rom):
|
||||
rom.write_byte(snes_to_pc(0x368107), 1) # centralize drops
|
||||
eye_number = random.randint(0, 8) # randomize moldorm eyes (var + 1)
|
||||
rom.write_byte(snes_to_pc(0x368102), eye_number) # enemizer flag
|
||||
rom.write_byte(snes_to_pc(0x1DDBB3), eye_number) # loop variable
|
||||
data_tables = world.data_tables[player]
|
||||
arrghus_can_swim = True
|
||||
water_tiles_on = True
|
||||
for dungeon in world.get_dungeons(player):
|
||||
for level, boss in dungeon.bosses.items():
|
||||
if not boss or boss.name in ['Agahnim', 'Agahnim2']:
|
||||
continue
|
||||
room_data = get_dungeon_boss_room(dungeon.name, level)
|
||||
room_id = room_data[0]
|
||||
# room changes
|
||||
if boss.name == 'Arrghus' and (dungeon.name != 'Swamp Palace' or level is not None):
|
||||
rom.write_byte(snes_to_pc(0x0DB6BE), 0) # arrghus can stand on ground
|
||||
|
||||
@@ -142,6 +142,7 @@ UwGeneralDeny:
|
||||
- [ 0x0065, 2, [ "Beamos", "AntiFairyCircle", "Bumper" ] ] #"Thieves' Town - Attic Window - Rat 3"
|
||||
- [ 0x0066, 0, [ "Beamos", "AntiFairyCircle", "BigSpike", "Bumper" ] ] #"Swamp Palace - Waterfall Room - Hover 1"
|
||||
- [ 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, 5, [ "RollerVerticalDown" ] ] #"Skull Woods - Firebar Pits - Hardhat Beetle 3"
|
||||
- [ 0x0067, 6, [ "RollerVerticalDown" ] ] #"Skull Woods - Firebar Pits - Hardhat Beetle 4"
|
||||
@@ -293,10 +294,13 @@ UwGeneralDeny:
|
||||
- [ 0x00ce, 4, [ "RollerVerticalDown", "RollerVerticalUp", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Beamos", "Bumper", "FirebarCW", "FirebarCCW"]]
|
||||
- [ 0x00ce, 5, [ "RollerVerticalDown", "RollerVerticalUp", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Beamos", "Bumper", "FirebarCW", "FirebarCCW"]]
|
||||
- [ 0x00ce, 6, [ "RollerVerticalDown", "RollerVerticalUp", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Beamos", "Bumper", "FirebarCW", "FirebarCCW"]]
|
||||
- [ 0x00ce, 7, [ "RollerVerticalDown", "RollerVerticalUp", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Beamos", "Bumper", "FirebarCW", "FirebarCCW"]]
|
||||
- [ 0x00d0, 0, [ "Statue", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper"]]
|
||||
- [ 0x00d0, 1, [ "AntiFairyCircle", "BigSpike", "Bumper"]]
|
||||
- [ 0x00d0, 4, [ "Statue", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper"]]
|
||||
- [ 0x00d0, 5, [ "Statue", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper"]]
|
||||
- [ 0x00ce, 7, [ "RollerVerticalDown", "RollerVerticalUp", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Beamos", "Bumper", "FirebarCW", "FirebarCCW"]]
|
||||
- [ 0x00d0, 6, [ "Statue", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper"]]
|
||||
- [ 0x00d0, 7, [ "Statue", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper"]]
|
||||
- [ 0x00d0, 9, [ "AntiFairyCircle", "BigSpike", "Bumper"]]
|
||||
- [ 0x00d0, 6, [ "Statue", "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] # Agahnims Tower - Dark Maze - Blue Guard 2
|
||||
- [ 0x00d2, 8, [ "RollerVerticalDown", "RollerHorizontalLeft", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Misery Mire - Mire 2 - Popo BL"
|
||||
@@ -347,14 +351,18 @@ UwGeneralDeny:
|
||||
- [ 0x0107, 2, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]]
|
||||
OwGeneralDeny:
|
||||
- [0x1e, 3, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]] # forbid a beamos here
|
||||
- [0x40, 0, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]]
|
||||
- [0x40, 7, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]]
|
||||
- [0x40, 13, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]]
|
||||
- [0x40, 14, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle"]]
|
||||
- [0x40, 0, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle", "Thief"]]
|
||||
- [0x40, 7, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle", "Thief"]]
|
||||
- [0x40, 13, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle", "Thief"]]
|
||||
- [0x40, 14, ["Beamos", "Bumper", "BigSpike", "AntiFairyCircle", "Thief"]]
|
||||
- [0x5e, 4, ["RollerVerticalUp", "Gibo"]] # forbid that one roller for kiki pod, and the kiki eating Gibo
|
||||
- [0x5e, 5, ["Gibo"]] # kiki eating Gibo
|
||||
UwEnemyDrop:
|
||||
- [0x0085, 9, ["Babasu"]] # ran off the edge and didn't return
|
||||
- [0x00cb, 3, ["Zoro"]] # layer issues
|
||||
- [0x00cb, 5, ["Zoro"]] # layer issues
|
||||
- [0x00cb, 9, ["Zoro"]] # layer issues
|
||||
- [0x00cb, 10, ["Zoro"]] # layer issues
|
||||
- [0x00cc, 5, ["Babasu"]] # little hard to see and kill appropriately
|
||||
# the following are behind rails or otherwise unactivate-able
|
||||
- [0x0077, 4, ["StalfosKnight", "Geldman", "Blob", "Stal", "Wizzrobe"]] # can't activate here
|
||||
|
||||
@@ -53,7 +53,7 @@ UW: # Total 94431
|
||||
Kyameron: 237 # 0.42147% raw:398 3.52212%
|
||||
Landmine: 19 # 5.40077% raw:5100 45.13274%
|
||||
Leever: 154 # 0.65127% raw:615 5.44248%
|
||||
Lynel: 500 # 0.17897% raw:169 1.49558%
|
||||
Lynel: 400 # 0.17897% raw:169 1.49558%
|
||||
MiniHelmasaur: 109 # 0.91495% raw:864 7.64602%
|
||||
MiniMoldorm: 109 # 0.91495% raw:864 7.64602%
|
||||
Moblin: 367 # 0.27216% raw:257 2.27434%
|
||||
|
||||
@@ -357,7 +357,7 @@ def determine_major_items(world, player):
|
||||
major_item_set.add('Single Arrow')
|
||||
if world.keyshuffle[player] == 'universal':
|
||||
major_item_set.add('Small Key (Universal)')
|
||||
if world.goal[player] in {'triforcehunt', 'ganonhunt'}:
|
||||
if world.goal[player] in {'triforcehunt', 'ganonhunt', 'trinity'}:
|
||||
major_item_set.add('Triforce Piece')
|
||||
if world.bombbag[player]:
|
||||
major_item_set.add('Bomb Upgrade (+10)')
|
||||
|
||||
@@ -33,6 +33,22 @@ def roll_settings(weights):
|
||||
return default
|
||||
return choice
|
||||
|
||||
def get_choice_bool(option, root=weights):
|
||||
choice = get_choice(option, root)
|
||||
if choice is True or choice == 'on':
|
||||
return True
|
||||
if choice is False or choice == 'off':
|
||||
return False
|
||||
if choice is None:
|
||||
return choice
|
||||
raise Exception("This fields needs to be true/false or off/on")
|
||||
|
||||
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:
|
||||
return default
|
||||
return choice
|
||||
|
||||
while True:
|
||||
subweights = weights.get('subweights', {})
|
||||
if len(subweights) == 0:
|
||||
@@ -62,8 +78,8 @@ def roll_settings(weights):
|
||||
dungeon_items = get_choice('dungeon_items')
|
||||
dungeon_items = '' if dungeon_items == 'standard' or dungeon_items is None else dungeon_items
|
||||
dungeon_items = 'mcsb' if dungeon_items == 'full' else dungeon_items
|
||||
ret.mapshuffle = get_choice('map_shuffle') == 'on' if 'map_shuffle' in weights else 'm' in dungeon_items
|
||||
ret.compassshuffle = get_choice('compass_shuffle') == 'on' if 'compass_shuffle' in weights else 'c' in dungeon_items
|
||||
ret.mapshuffle = get_choice_bool('map_shuffle') if 'map_shuffle' in weights else 'm' in dungeon_items
|
||||
ret.compassshuffle = get_choice_bool('compass_shuffle') if 'compass_shuffle' in weights else 'c' in dungeon_items
|
||||
if 'smallkey_shuffle' in weights:
|
||||
ret.keyshuffle = get_choice('smallkey_shuffle')
|
||||
else:
|
||||
@@ -71,7 +87,7 @@ def roll_settings(weights):
|
||||
ret.keyshuffle = 'wild'
|
||||
if 'u' in dungeon_items:
|
||||
ret.keyshuffle = 'universal'
|
||||
ret.bigkeyshuffle = get_choice('bigkey_shuffle') == 'on' if 'bigkey_shuffle' in weights else 'b' in dungeon_items
|
||||
ret.bigkeyshuffle = get_choice_bool('bigkey_shuffle') if 'bigkey_shuffle' in weights else 'b' in dungeon_items
|
||||
|
||||
ret.accessibility = get_choice('accessibility')
|
||||
ret.restrict_boss_items = get_choice('restrict_boss_items')
|
||||
@@ -86,26 +102,26 @@ def roll_settings(weights):
|
||||
ret.door_type_mode = get_choice('door_type_mode')
|
||||
ret.trap_door_mode = get_choice('trap_door_mode')
|
||||
ret.key_logic_algorithm = get_choice('key_logic_algorithm')
|
||||
ret.decoupledoors = get_choice('decoupledoors')
|
||||
ret.door_self_loops = get_choice('door_self_loops')
|
||||
ret.experimental = get_choice('experimental')
|
||||
ret.collection_rate = get_choice('collection_rate')
|
||||
ret.decoupledoors = get_choice_bool('decoupledoors')
|
||||
ret.door_self_loops = get_choice_bool('door_self_loops')
|
||||
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'
|
||||
if ret.dungeon_counters == 'default':
|
||||
ret.dungeon_counters = 'pickup' if ret.door_shuffle != 'vanilla' or ret.compassshuffle == 'on' else 'off'
|
||||
|
||||
ret.shufflelinks = get_choice('shufflelinks')
|
||||
ret.shuffletavern = get_choice('shuffletavern')
|
||||
ret.pseudoboots = get_choice('pseudoboots')
|
||||
ret.shopsanity = get_choice('shopsanity')
|
||||
keydropshuffle = get_choice('keydropshuffle')
|
||||
ret.shufflelinks = get_choice_bool('shufflelinks')
|
||||
ret.shuffletavern = get_choice_bool('shuffletavern')
|
||||
ret.pseudoboots = get_choice_bool('pseudoboots')
|
||||
ret.shopsanity = get_choice_bool('shopsanity')
|
||||
keydropshuffle = get_choice_bool('keydropshuffle')
|
||||
ret.dropshuffle = get_choice('dropshuffle') if 'dropshuffle' in weights else 'none'
|
||||
ret.dropshuffle = 'keys' if ret.dropshuffle == 'none' and keydropshuffle else ret.dropshuffle
|
||||
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_default('colorizepots', default=True)
|
||||
ret.shufflepots = get_choice('pot_shuffle')
|
||||
ret.colorizepots = get_choice_bool_default('colorizepots', default=True)
|
||||
ret.shufflepots = get_choice_bool('pot_shuffle')
|
||||
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
|
||||
else 'standardize')
|
||||
@@ -140,12 +156,12 @@ def roll_settings(weights):
|
||||
if ret.mode == 'retro':
|
||||
ret.mode = 'open'
|
||||
ret.retro = True
|
||||
ret.retro = get_choice('retro') # this overrides world_state if used
|
||||
ret.retro = get_choice_bool('retro') # this overrides world_state if used
|
||||
ret.take_any = get_choice_default('take_any', default='none')
|
||||
|
||||
ret.bombbag = get_choice('bombbag')
|
||||
ret.bombbag = get_choice_bool('bombbag')
|
||||
|
||||
ret.hints = get_choice('hints')
|
||||
ret.hints = get_choice_bool('hints')
|
||||
|
||||
swords = get_choice('weapons')
|
||||
if swords is not None:
|
||||
@@ -198,15 +214,15 @@ def roll_settings(weights):
|
||||
if 'rom' in weights:
|
||||
romweights = weights['rom']
|
||||
ret.sprite = get_choice('sprite', romweights)
|
||||
ret.disablemusic = get_choice('disablemusic', romweights)
|
||||
ret.quickswap = get_choice('quickswap', romweights)
|
||||
ret.reduce_flashing = get_choice('reduce_flashing', romweights)
|
||||
ret.disablemusic = get_choice_bool('disablemusic', romweights)
|
||||
ret.quickswap = get_choice_bool('quickswap', romweights)
|
||||
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.ow_palettes = get_choice('ow_palettes', romweights)
|
||||
ret.uw_palettes = get_choice('uw_palettes', romweights)
|
||||
ret.shuffle_sfx = get_choice('shuffle_sfx', romweights)
|
||||
ret.msu_resume = get_choice('msu_resume', romweights)
|
||||
ret.shuffle_sfx = get_choice_bool('shuffle_sfx', romweights)
|
||||
ret.msu_resume = get_choice_bool('msu_resume', romweights)
|
||||
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user