Add aga_randomness to exposed settings

This commit is contained in:
Cody Bailey
2023-11-19 17:32:45 -05:00
parent 94d05df72b
commit a2c4be4c4c
7 changed files with 12 additions and 3 deletions

View File

@@ -54,7 +54,6 @@ class World(object):
self.shuffle_bonk_prizes = False self.shuffle_bonk_prizes = False
self.clock_mode = 'none' self.clock_mode = 'none'
self.rupoor_cost = 10 self.rupoor_cost = 10
self.aga_randomness = True
self.lock_aga_door_in_escape = False self.lock_aga_door_in_escape = False
self.save_and_quit_from_boss = True self.save_and_quit_from_boss = True
self.accessibility = accessibility.copy() self.accessibility = accessibility.copy()
@@ -150,6 +149,7 @@ class World(object):
set_player_attr('door_type_mode', 'original') set_player_attr('door_type_mode', 'original')
set_player_attr('trap_door_mode', 'optional') set_player_attr('trap_door_mode', 'optional')
set_player_attr('key_logic_algorithm', 'default') set_player_attr('key_logic_algorithm', 'default')
set_player_attr('aga_randomness', True)
set_player_attr('shopsanity', False) set_player_attr('shopsanity', False)
set_player_attr('mixed_travel', 'prevent') set_player_attr('mixed_travel', 'prevent')

3
CLI.py
View File

@@ -141,7 +141,7 @@ def parse_cli(argv, no_defaults=False):
'heartbeep', 'remote_items', 'shopsanity', 'dropshuffle', 'pottery', 'keydropshuffle', 'heartbeep', 'remote_items', 'shopsanity', 'dropshuffle', 'pottery', 'keydropshuffle',
'mixed_travel', 'standardize_palettes', 'code', 'reduce_flashing', 'shuffle_sfx', 'mixed_travel', 'standardize_palettes', 'code', 'reduce_flashing', 'shuffle_sfx',
'msu_resume', 'collection_rate', 'colorizepots', 'decoupledoors', 'door_type_mode', 'msu_resume', 'collection_rate', 'colorizepots', 'decoupledoors', 'door_type_mode',
'trap_door_mode', 'key_logic_algorithm', 'door_self_loops', 'any_enemy_logic']: 'trap_door_mode', 'key_logic_algorithm', 'door_self_loops', 'any_enemy_logic', 'aga_randomness']:
value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name) value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name)
if player == 1: if player == 1:
setattr(ret, name, {1: value}) setattr(ret, name, {1: value})
@@ -223,6 +223,7 @@ def parse_settings():
'dungeon_counters': 'default', 'dungeon_counters': 'default',
'mixed_travel': 'prevent', 'mixed_travel': 'prevent',
'standardize_palettes': 'standardize', 'standardize_palettes': 'standardize',
'aga_randomness': True,
"triforce_pool": 0, "triforce_pool": 0,
"triforce_goal": 0, "triforce_goal": 0,

View File

@@ -137,6 +137,7 @@ def main(args, seed=None, fish=None):
world.restrict_boss_items = args.restrict_boss_items.copy() world.restrict_boss_items = args.restrict_boss_items.copy()
world.collection_rate = args.collection_rate.copy() world.collection_rate = args.collection_rate.copy()
world.colorizepots = args.colorizepots.copy() world.colorizepots = args.colorizepots.copy()
world.aga_randomness = args.aga_randomness.copy()
world.treasure_hunt_count = {} world.treasure_hunt_count = {}
world.treasure_hunt_total = {} world.treasure_hunt_total = {}

2
Rom.py
View File

@@ -1118,7 +1118,7 @@ def patch_rom(world, rom, player, team, is_mystery=False):
rom.initial_sram.pre_open_ganons_tower() rom.initial_sram.pre_open_ganons_tower()
rom.write_byte(0xF5D73, 0xF0) # bees are catchable rom.write_byte(0xF5D73, 0xF0) # bees are catchable
rom.write_byte(0xF5F10, 0xF0) # bees are catchable rom.write_byte(0xF5F10, 0xF0) # bees are catchable
rom.write_byte(0x180086, 0x00 if world.aga_randomness else 0x01) # set blue ball and ganon warp randomness rom.write_byte(0x180086, 0x00 if world.aga_randomness[player] else 0x01) # set blue ball and ganon warp randomness
rom.write_byte(0x1800A0, 0x01) # return to light world on s+q without mirror rom.write_byte(0x1800A0, 0x01) # return to light world on s+q without mirror
rom.write_byte(0x1800A1, 0x01) # enable overworld screen transition draining for water level inside swamp rom.write_byte(0x1800A1, 0x01) # enable overworld screen transition draining for water level inside swamp
rom.write_byte(0x180174, 0x01 if world.fix_fake_world[player] else 0x00) rom.write_byte(0x180174, 0x01 if world.fix_fake_world[player] else 0x00)

View File

@@ -514,6 +514,10 @@
"action": "store_true", "action": "store_true",
"type": "bool" "type": "bool"
}, },
"aga_randomness": {
"action": "store_false",
"type": "bool"
},
"saveonexit": { "saveonexit": {
"choices": [ "choices": [
"ask", "ask",

View File

@@ -155,6 +155,7 @@ class CustomSettings(object):
args.triforce_min_difference[p] = get_setting(settings['triforce_min_difference'], args.triforce_min_difference[p]) args.triforce_min_difference[p] = get_setting(settings['triforce_min_difference'], args.triforce_min_difference[p])
args.triforce_max_difference[p] = get_setting(settings['triforce_max_difference'], args.triforce_max_difference[p]) args.triforce_max_difference[p] = get_setting(settings['triforce_max_difference'], args.triforce_max_difference[p])
args.beemizer[p] = get_setting(settings['beemizer'], args.beemizer[p]) args.beemizer[p] = get_setting(settings['beemizer'], args.beemizer[p])
args.aga_randomness[p] = get_setting(settings['aga_randomness'], args.aga_randomness[p])
# mystery usage # mystery usage
args.usestartinventory[p] = get_setting(settings['usestartinventory'], args.usestartinventory[p]) args.usestartinventory[p] = get_setting(settings['usestartinventory'], args.usestartinventory[p])
@@ -283,6 +284,7 @@ class CustomSettings(object):
settings_dict[p]['triforce_goal'] = world.treasure_hunt_count[p] settings_dict[p]['triforce_goal'] = world.treasure_hunt_count[p]
settings_dict[p]['triforce_pool'] = world.treasure_hunt_total[p] settings_dict[p]['triforce_pool'] = world.treasure_hunt_total[p]
settings_dict[p]['beemizer'] = world.beemizer[p] settings_dict[p]['beemizer'] = world.beemizer[p]
settings_dict[p]['aga_randomness'] = world.aga_randomness[p]
# rom adjust stuff # rom adjust stuff
# settings_dict[p]['sprite'] = world.sprite[p] # settings_dict[p]['sprite'] = world.sprite[p]

View File

@@ -122,6 +122,7 @@ def roll_settings(weights):
ret.pottery = 'keys' if ret.pottery == 'none' and keydropshuffle else ret.pottery ret.pottery = 'keys' if ret.pottery == 'none' and keydropshuffle else ret.pottery
ret.colorizepots = get_choice_bool_default('colorizepots', default=True) ret.colorizepots = get_choice_bool_default('colorizepots', default=True)
ret.shufflepots = get_choice_bool('pot_shuffle') ret.shufflepots = get_choice_bool('pot_shuffle')
ret.aga_randomness = get_choice_bool('aga_randomness')
ret.mixed_travel = get_choice('mixed_travel') if 'mixed_travel' in weights else 'prevent' 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 ret.standardize_palettes = (get_choice('standardize_palettes') if 'standardize_palettes' in weights
else 'standardize') else 'standardize')