Individual settings: logic
This commit is contained in:
parent
b695d3573e
commit
79786c7c9e
|
@ -11,7 +11,7 @@ class World(object):
|
|||
def __init__(self, players, shuffle, logic, mode, swords, difficulty, difficulty_adjustments, timer, progressive, goal, algorithm, accessibility, shuffle_ganon, quickswap, fastmenu, disable_music, retro, custom, customitemarray, boss_shuffle, hints):
|
||||
self.players = players
|
||||
self.shuffle = shuffle
|
||||
self.logic = logic
|
||||
self.logic = logic.copy()
|
||||
self.mode = mode
|
||||
self.swords = swords
|
||||
self.difficulty = difficulty
|
||||
|
|
|
@ -285,6 +285,8 @@ def parse_arguments(argv, no_defaults=False):
|
|||
else:
|
||||
getattr(ret, name)[player] = value
|
||||
|
||||
set_player_arg("logic")
|
||||
|
||||
return ret
|
||||
|
||||
def start():
|
||||
|
|
2
Main.py
2
Main.py
|
@ -188,7 +188,7 @@ def main(args, seed=None):
|
|||
apply_rom_settings(rom, args.heartbeep, args.heartcolor, world.quickswap, world.fastmenu, world.disable_music, sprite, player_names)
|
||||
outfilesuffix = ('%s%s_%s_%s-%s-%s-%s%s_%s-%s%s%s%s%s' % (f'_P{player}' if world.players > 1 else '',
|
||||
f'_{player_names[player]}' if player in player_names else '',
|
||||
world.logic, world.difficulty, world.difficulty_adjustments,
|
||||
world.logic[player], world.difficulty, world.difficulty_adjustments,
|
||||
world.mode, world.goal,
|
||||
"" if world.timer in ['none', 'display'] else "-" + world.timer,
|
||||
world.shuffle, world.algorithm, mcsb_name,
|
||||
|
|
|
@ -119,7 +119,7 @@ def fill_world(world, plando, text_patches):
|
|||
world.mode = modestr.strip()
|
||||
elif line.startswith('!logic'):
|
||||
_, logicstr = line.split(':', 1)
|
||||
world.logic = logicstr.strip()
|
||||
world.logic = {1: logicstr.strip()}
|
||||
elif line.startswith('!goal'):
|
||||
_, goalstr = line.split(':', 1)
|
||||
world.goal = goalstr.strip()
|
||||
|
|
2
Rom.py
2
Rom.py
|
@ -1014,7 +1014,7 @@ def patch_rom(world, player, rom, enemized):
|
|||
rom.write_byte(0x180020, digging_game_rng)
|
||||
rom.write_byte(0xEFD95, digging_game_rng)
|
||||
rom.write_byte(0x1800A3, 0x01) # enable correct world setting behaviour after agahnim kills
|
||||
rom.write_byte(0x1800A4, 0x01 if world.logic != 'nologic' else 0x00) # enable POD EG fix
|
||||
rom.write_byte(0x1800A4, 0x01 if world.logic[player] != 'nologic' else 0x00) # enable POD EG fix
|
||||
rom.write_byte(0x180042, 0x01 if world.save_and_quit_from_boss else 0x00) # Allow Save and Quit after boss kill
|
||||
|
||||
# remove shield from uncle
|
||||
|
|
6
Rules.py
6
Rules.py
|
@ -5,7 +5,7 @@ from BaseClasses import CollectionState
|
|||
|
||||
def set_rules(world, player):
|
||||
|
||||
if world.logic == 'nologic':
|
||||
if world.logic[player] == 'nologic':
|
||||
logging.getLogger('').info('WARNING! Seeds generated under this logic often require major glitches and may be impossible!')
|
||||
if world.mode != 'inverted':
|
||||
world.get_region('Links House', player).can_reach_private = lambda state: True
|
||||
|
@ -35,9 +35,9 @@ def set_rules(world, player):
|
|||
else:
|
||||
raise NotImplementedError('Not implemented yet')
|
||||
|
||||
if world.logic == 'noglitches':
|
||||
if world.logic[player] == 'noglitches':
|
||||
no_glitches_rules(world, player)
|
||||
elif world.logic == 'minorglitches':
|
||||
elif world.logic[player] == 'minorglitches':
|
||||
logging.getLogger('').info('Minor Glitches may be buggy still. No guarantee for proper logic checks.')
|
||||
else:
|
||||
raise NotImplementedError('Not implemented yet')
|
||||
|
|
Loading…
Reference in New Issue