Skip to content

Commit

Permalink
Merge 'Fix misc hint for Expensive Merchants when the item name is lo…
Browse files Browse the repository at this point in the history
…nger than one line' (#2053)
  • Loading branch information
cjohnson57 committed Jul 31, 2023
2 parents 95c6d00 + 7959183 commit 1c159f5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
30 changes: 25 additions & 5 deletions Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2133,7 +2133,11 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p
else:
location = world.get_location("ZR Magic Bean Salesman")
item_text = get_hint(get_item_generic_name(location.item), True).text
update_message_by_id(messages, 0x405E, "\x1AChomp chomp chomp...We have...\x01\x05\x41" + item_text + "\x05\x40! \x01Do you want it...huh? Huh?\x04\x05\x41\x0860 Rupees\x05\x40 and it's yours!\x01Keyahahah!\x01\x1B\x05\x42Yes\x01No\x05\x40\x02")
wrapped_item_text = line_wrap(item_text, False, False, False)
if wrapped_item_text != item_text:
update_message_by_id(messages, 0x405E, "\x1AChomp chomp chomp...We have...\x01\x05\x41" + wrapped_item_text + "\x05\x40!\x04\x05\x41\x0860 Rupees\x05\x40 and it's yours!\x01Keyahahah!\x01\x1B\x05\x42Yes\x01No\x05\x40\x02")
else:
update_message_by_id(messages, 0x405E, "\x1AChomp chomp chomp...We have...\x01\x05\x41" + item_text + "\x05\x40! \x01Do you want it...huh? Huh?\x04\x05\x41\x0860 Rupees\x05\x40 and it's yours!\x01Keyahahah!\x01\x1B\x05\x42Yes\x01No\x05\x40\x02")
update_message_by_id(messages, 0x4069, "You don't have enough money.\x01I can't sell it to you.\x01Chomp chomp...\x02")
update_message_by_id(messages, 0x406C, "We hope you like it!\x01Chomp chomp chomp.\x02")
# Change first magic bean to cost 60 (is used as the price for the one time item when beans are shuffled)
Expand All @@ -2147,7 +2151,11 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p
else:
location = world.get_location("Wasteland Bombchu Salesman")
item_text = get_hint(get_item_generic_name(location.item), True).text
update_message_by_id(messages, 0x6077, "\x06\x41Well Come!\x04I am selling stuff, strange and \x01rare, from all over the world to \x01everybody. Today's special is...\x01\x05\x41"+ item_text + "\x05\x40! \x01\x04How about \x05\x41200 Rupees\x05\x40?\x01\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
wrapped_item_text = line_wrap(item_text, False, False, False)
if wrapped_item_text != item_text:
update_message_by_id(messages, 0x6077, "\x06\x41Well Come!\x04I am selling stuff, strange and \x01rare. Today's special is...\x01\x05\x41"+ wrapped_item_text + "\x05\x40!\x04How about \x05\x41200 Rupees\x05\x40?\x01\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
else:
update_message_by_id(messages, 0x6077, "\x06\x41Well Come!\x04I am selling stuff, strange and \x01rare, from all over the world to \x01everybody. Today's special is...\x01\x05\x41"+ wrapped_item_text + "\x05\x40! \x01\x04How about \x05\x41200 Rupees\x05\x40?\x01\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
update_message_by_id(messages, 0x6078, "Thank you very much!\x04The mark that will lead you to\x01the Spirit Temple is the \x05\x41flag on\x01the left \x05\x40outside the shop.\x01Be seeing you!\x02")

rom.write_byte(rom.sym('SHUFFLE_MEDIGORON'), 0x01)
Expand All @@ -2159,15 +2167,23 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p
else:
location = world.get_location("GC Medigoron")
item_text = get_hint(get_item_generic_name(location.item), True).text
update_message_by_id(messages, 0x304F, "For 200 Rupees, how about buying \x01\x05\x41" + item_text + "\x05\x40?\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
wrapped_item_text = line_wrap(item_text, False, False, False)
if wrapped_item_text != item_text:
update_message_by_id(messages, 0x304F, "For 200 Rupees, how about buying...\x04\x05\x41" + wrapped_item_text + "\x05\x40?\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
else:
update_message_by_id(messages, 0x304F, "For 200 Rupees, how about buying \x01\x05\x41" + item_text + "\x05\x40?\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")

rom.write_byte(rom.sym('SHUFFLE_GRANNYS_POTION_SHOP'), 0x01)
if 'unique_merchants' not in world.settings.misc_hints:
update_message_by_id(messages, 0x500C, "Mysterious item! How about\x01\x05\x41100 Rupees\x05\x40?\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
else:
location = world.get_location("Kak Granny Buy Blue Potion")
item_text = get_hint(get_item_generic_name(location.item), True).text
update_message_by_id(messages, 0x500C, "How about \x05\x41100 Rupees\x05\x40 for\x01\x05\x41"+ item_text +"\x05\x40?\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
wrapped_item_text = line_wrap(item_text, False, False, False)
if wrapped_item_text != item_text:
update_message_by_id(messages, 0x500C, "How about \x05\x41100 Rupees\x05\x40 for...\x04\x05\x41"+ wrapped_item_text +"\x05\x40?\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")
else:
update_message_by_id(messages, 0x500C, "How about \x05\x41100 Rupees\x05\x40 for\x01\x05\x41"+ item_text +"\x05\x40?\x01\x1B\x05\x42Buy\x01Don't buy\x05\x40\x02")

new_message = "All right. You don't have to play\x01if you don't want to.\x0B\x02"
update_message_by_id(messages, 0x908B, new_message, 0x00)
Expand All @@ -2182,7 +2198,11 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p
else:
location = world.get_location("Market Treasure Chest Game Salesman")
item_text = get_hint(get_item_generic_name(location.item), True).text
update_message_by_id(messages, 0x6D, "I seem to have misplaced my\x01keys, but I have a fun item to\x01sell instead.\x04How about \x05\x4110 Rupees\x05\x40 for\x01\x05\x41" + item_text + "\x05\x40?\x01\x1B\x05\x42Buy\x01Don't Buy\x05\x40\x02")
wrapped_item_text = line_wrap(item_text, False, False, False)
if wrapped_item_text != item_text:
update_message_by_id(messages, 0x6D, "I seem to have misplaced my\x01keys, but I have a fun item to\x01sell instead.\x01How about \x05\x4110 Rupees\x05\x40 for...\x04\x05\x41" + wrapped_item_text + "\x05\x40?\x01\x1B\x05\x42Buy\x01Don't Buy\x05\x40\x02")
else:
update_message_by_id(messages, 0x6D, "I seem to have misplaced my\x01keys, but I have a fun item to\x01sell instead.\x04How about \x05\x4110 Rupees\x05\x40 for\x01\x05\x41" + item_text + "\x05\x40?\x01\x1B\x05\x42Buy\x01Don't Buy\x05\x40\x02")
update_message_by_id(messages, 0x908B, "That's OK!\x01More fun for me.\x0B\x02", 0x00)
update_message_by_id(messages, 0x6E, "Wait, that room was off limits!\x02")
update_message_by_id(messages, 0x704C, "I hope you like it!\x02")
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '7.1.157'
__version__ = '7.1.158'

# This is a supplemental version number for branches based off of main dev.
supplementary_version = 0
Expand Down

0 comments on commit 1c159f5

Please sign in to comment.