Fake boots checkbox/argument

This commit is contained in:
aerinon
2021-07-07 16:23:16 -07:00
parent fb22c88ace
commit ffcc78f95c
11 changed files with 22 additions and 5 deletions

View File

@@ -131,6 +131,7 @@ class World(object):
set_player_attr('treasure_hunt_total', 0) set_player_attr('treasure_hunt_total', 0)
set_player_attr('potshuffle', False) set_player_attr('potshuffle', False)
set_player_attr('pot_contents', None) set_player_attr('pot_contents', None)
set_player_attr('fakeboots', False)
set_player_attr('shopsanity', False) set_player_attr('shopsanity', False)
set_player_attr('keydropshuffle', False) set_player_attr('keydropshuffle', False)

3
CLI.py
View File

@@ -97,7 +97,7 @@ def parse_cli(argv, no_defaults=False):
'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid', 'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid',
'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory', 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory',
'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max', 'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max',
'triforce_min_difference', 'triforce_goal', 'triforce_pool', 'shufflelinks', 'triforce_min_difference', 'triforce_goal', 'triforce_pool', 'shufflelinks', 'fakeboots',
'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'dungeon_counters', 'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'dungeon_counters',
'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots', 'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots',
'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor', 'heartbeep', 'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor', 'heartbeep',
@@ -144,6 +144,7 @@ def parse_settings():
"shuffleganon": True, "shuffleganon": True,
"shuffle": "vanilla", "shuffle": "vanilla",
"shufflelinks": False, "shufflelinks": False,
"fakeboots": False,
"shufflepots": False, "shufflepots": False,
"shuffleenemies": "none", "shuffleenemies": "none",

View File

@@ -90,6 +90,7 @@ def main(args, seed=None, fish=None):
world.treasure_hunt_count = args.triforce_goal.copy() world.treasure_hunt_count = args.triforce_goal.copy()
world.treasure_hunt_total = args.triforce_pool.copy() world.treasure_hunt_total = args.triforce_pool.copy()
world.shufflelinks = args.shufflelinks.copy() world.shufflelinks = args.shufflelinks.copy()
world.fakeboots = args.fakeboots.copy()
world.rom_seeds = {player: random.randint(0, 999999999) for player in range(1, world.players + 1)} world.rom_seeds = {player: random.randint(0, 999999999) for player in range(1, world.players + 1)}

View File

@@ -143,6 +143,7 @@ def roll_settings(weights):
ret.dungeon_counters = 'pickup' if ret.door_shuffle != 'vanilla' or ret.compassshuffle == 'on' else 'off' ret.dungeon_counters = 'pickup' if ret.door_shuffle != 'vanilla' or ret.compassshuffle == 'on' else 'off'
ret.shufflelinks = get_choice('shufflelinks') == 'on' ret.shufflelinks = get_choice('shufflelinks') == 'on'
ret.fakeboots = get_choice('fakeboots') == 'on'
ret.shopsanity = get_choice('shopsanity') == 'on' ret.shopsanity = get_choice('shopsanity') == 'on'
ret.keydropshuffle = get_choice('keydropshuffle') == 'on' ret.keydropshuffle = get_choice('keydropshuffle') == 'on'
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'

4
Rom.py
View File

@@ -18,7 +18,6 @@ except ImportError:
from BaseClasses import CollectionState, ShopType, Region, Location, Door, DoorType, RegionType, PotItem from BaseClasses import CollectionState, ShopType, Region, Location, Door, DoorType, RegionType, PotItem
from DoorShuffle import compass_data, DROptions, boss_indicator from DoorShuffle import compass_data, DROptions, boss_indicator
from Dungeons import dungeon_music_addresses from Dungeons import dungeon_music_addresses
from KeyDoorShuffle import count_locations_exclude_logic
from Regions import location_table, shop_to_location_table, retro_shops from Regions import location_table, shop_to_location_table, retro_shops
from RoomData import DoorKind from RoomData import DoorKind
from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits, TextTable from Text import MultiByteTextMapper, CompressedTextMapper, text_addresses, Credits, TextTable
@@ -1163,6 +1162,9 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
rom.write_byte(0x18017E, 0x01) # Fairy fountains only trade in bottles rom.write_byte(0x18017E, 0x01) # Fairy fountains only trade in bottles
# Starting equipment # Starting equipment
if world.fakeboots[player]:
rom.write_byte(0x18008E, 0x01)
equip = [0] * (0x340 + 0x4F) equip = [0] * (0x340 + 0x4F)
equip[0x36C] = 0x18 equip[0x36C] = 0x18
equip[0x36D] = 0x18 equip[0x36D] = 0x18

View File

@@ -310,6 +310,10 @@
"action": "store_true", "action": "store_true",
"type": "bool" "type": "bool"
}, },
"fakeboots": {
"action": "store_true",
"type": "bool"
},
"calc_playthrough": { "calc_playthrough": {
"action": "store_false", "action": "store_false",
"type": "bool" "type": "bool"

View File

@@ -262,6 +262,7 @@
"Keys are universal, shooting arrows costs rupees,", "Keys are universal, shooting arrows costs rupees,",
"and a few other little things make this more like Zelda-1. (default: %(default)s)" "and a few other little things make this more like Zelda-1. (default: %(default)s)"
], ],
"fakeboots": [ " Players starts with fake boots that allow dashing but no item checks (default: %(default)s"],
"startinventory": [ "Specifies a list of items that will be in your starting inventory (separated by commas). (default: %(default)s)" ], "startinventory": [ "Specifies a list of items that will be in your starting inventory (separated by commas). (default: %(default)s)" ],
"usestartinventory": [ "Toggle usage of Starting Inventory." ], "usestartinventory": [ "Toggle usage of Starting Inventory." ],
"custom": [ "Not supported." ], "custom": [ "Not supported." ],

View File

@@ -189,6 +189,7 @@
"randomizer.item.hints": "Include Helpful Hints", "randomizer.item.hints": "Include Helpful Hints",
"randomizer.item.retro": "Retro mode (universal keys)", "randomizer.item.retro": "Retro mode (universal keys)",
"randomizer.item.fakeboots": "Start with Fake Boots",
"randomizer.item.worldstate": "World State", "randomizer.item.worldstate": "World State",
"randomizer.item.worldstate.standard": "Standard", "randomizer.item.worldstate.standard": "Standard",

View File

@@ -4,7 +4,8 @@
"shopsanity": { "type": "checkbox" }, "shopsanity": { "type": "checkbox" },
"hints": { "hints": {
"type": "checkbox" "type": "checkbox"
} },
"fakeboots": { "type": "checkbox" }
}, },
"leftItemFrame": { "leftItemFrame": {
"worldstate": { "worldstate": {

View File

@@ -58,6 +58,7 @@ SETTINGSTOPROCESS = {
"hints": "hints", "hints": "hints",
"retro": "retro", "retro": "retro",
"shopsanity": "shopsanity", "shopsanity": "shopsanity",
"fakeboots": "fakeboots",
"worldstate": "mode", "worldstate": "mode",
"logiclevel": "logic", "logiclevel": "logic",
"goal": "goal", "goal": "goal",

View File

@@ -1,4 +1,4 @@
from tkinter import ttk, Frame, E, W, LEFT, RIGHT from tkinter import ttk, Frame, E, W, LEFT, RIGHT, Label
import source.gui.widgets as widgets import source.gui.widgets as widgets
import json import json
import os import os
@@ -17,6 +17,9 @@ def item_page(parent):
self.frames["checkboxes"] = Frame(self) self.frames["checkboxes"] = Frame(self)
self.frames["checkboxes"].pack(anchor=W) self.frames["checkboxes"].pack(anchor=W)
various_options = Label(self.frames["checkboxes"], text="")
various_options.pack(side=LEFT)
self.frames["leftItemFrame"] = Frame(self) self.frames["leftItemFrame"] = Frame(self)
self.frames["rightItemFrame"] = Frame(self) self.frames["rightItemFrame"] = Frame(self)
self.frames["leftItemFrame"].pack(side=LEFT) self.frames["leftItemFrame"].pack(side=LEFT)
@@ -34,7 +37,7 @@ def item_page(parent):
self.widgets[key] = dictWidgets[key] self.widgets[key] = dictWidgets[key]
packAttrs = {"anchor":E} packAttrs = {"anchor":E}
if self.widgets[key].type == "checkbox": if self.widgets[key].type == "checkbox":
packAttrs["anchor"] = W packAttrs["side"] = LEFT
self.widgets[key].pack(packAttrs) self.widgets[key].pack(packAttrs)
return self return self