diff --git a/Adjuster.py b/Adjuster.py index 63a296be..4ab61b8c 100755 --- a/Adjuster.py +++ b/Adjuster.py @@ -29,7 +29,7 @@ def main(): Select the rate at which the heart beep sound is played at low health. (default: %(default)s) ''') - parser.add_argument('--heartcolor', default='red', const='red', nargs='?', choices=['red', 'blue', 'green', 'yellow'], + parser.add_argument('--heartcolor', default='red', const='red', nargs='?', choices=['red', 'blue', 'green', 'yellow', 'random'], help='Select the color of Link\'s heart meter. (default: %(default)s)') parser.add_argument('--sprite', help='''\ Path to a sprite sheet to use for Link. Needs to be in diff --git a/EntranceRandomizer.py b/EntranceRandomizer.py index 84db543a..fed67800 100755 --- a/EntranceRandomizer.py +++ b/EntranceRandomizer.py @@ -196,7 +196,7 @@ def start(): Select the rate at which the heart beep sound is played at low health. (default: %(default)s) ''') - parser.add_argument('--heartcolor', default='red', const='red', nargs='?', choices=['red', 'blue', 'green', 'yellow'], + parser.add_argument('--heartcolor', default='red', const='red', nargs='?', choices=['red', 'blue', 'green', 'yellow', 'random'], help='Select the color of Link\'s heart meter. (default: %(default)s)') parser.add_argument('--sprite', help='''\ Path to a sprite sheet to use for Link. Needs to be in diff --git a/Gui.py b/Gui.py index 63c205dd..33d83c7f 100755 --- a/Gui.py +++ b/Gui.py @@ -217,7 +217,7 @@ def guiMain(args=None): heartcolorFrame = Frame(drowDownFrame) heartcolorVar = StringVar() heartcolorVar.set('red') - heartcolorOptionMenu = OptionMenu(heartcolorFrame, heartcolorVar, 'red', 'blue', 'green', 'yellow') + heartcolorOptionMenu = OptionMenu(heartcolorFrame, heartcolorVar, 'red', 'blue', 'green', 'yellow', 'random') heartcolorOptionMenu.pack(side=RIGHT) heartcolorLabel = Label(heartcolorFrame, text='Heart color') heartcolorLabel.pack(side=LEFT) @@ -373,7 +373,7 @@ def guiMain(args=None): heartbeepLabel2.pack(side=LEFT) heartcolorFrame2 = Frame(drowDownFrame2) - heartcolorOptionMenu2 = OptionMenu(heartcolorFrame2, heartcolorVar, 'red', 'blue', 'green', 'yellow') + heartcolorOptionMenu2 = OptionMenu(heartcolorFrame2, heartcolorVar, 'red', 'blue', 'green', 'yellow', 'random') heartcolorOptionMenu2.pack(side=RIGHT) heartcolorLabel2 = Label(heartcolorFrame2, text='Heart color') heartcolorLabel2.pack(side=LEFT) diff --git a/Rom.py b/Rom.py index 14e941b3..7e3075ae 100644 --- a/Rom.py +++ b/Rom.py @@ -978,6 +978,8 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, spr rom.write_byte(0x180033, {'off': 0x00, 'half': 0x40, 'quarter': 0x80, 'normal': 0x20, 'double': 0x10}[beep]) # set heart color + if color == 'random': + color = random.choice(['red', 'blue', 'green', 'yellow']) rom.write_byte(0x6FA1E, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color]) rom.write_byte(0x6FA20, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color]) rom.write_byte(0x6FA22, {'red': 0x24, 'blue': 0x2C, 'green': 0x3C, 'yellow': 0x28}[color]) @@ -1081,7 +1083,7 @@ def write_strings(rom, world): this_hint = 'The big chest in Ganon\'s Tower contains ' + world.get_location(location).item.hint_text + '.' tt[hint_locations.pop(0)] = this_hint elif location == 'Thieves\' Town - Big Chest': - this_hint = 'The big chest in Thieves\' Tower contains ' + world.get_location(location).item.hint_text + '.' + this_hint = 'The big chest in Thieves\' Town contains ' + world.get_location(location).item.hint_text + '.' tt[hint_locations.pop(0)] = this_hint elif location == 'Ice Palace - Big Chest': this_hint = 'The big chest in Ice Palace contains ' + world.get_location(location).item.hint_text + '.'