diff --git a/mods/randomizer/generator/data/flow_patches.yaml b/mods/randomizer/generator/data/flow_patches.yaml index edc856d85f..a9f94de733 100644 --- a/mods/randomizer/generator/data/flow_patches.yaml +++ b/mods/randomizer/generator/data/flow_patches.yaml @@ -22,7 +22,7 @@ 1: # zel_01.bmg - Ordon Village # Patch the flow in Bo's house that normally prevents us from leaving without - # Having the iron boots. Patch it so we take the flow which allows us to leave + # having the iron boots. Patch it so we take the flow which allows us to leave # no matter what - index: 0x8F type: branch @@ -138,6 +138,128 @@ parameters: 0x00000081 next: 0x2D8 + # Check custom flag for Goron selling Hylian Shield + - only if: Shop_Items == On + index: 0xA16 + type: branch + query: event flag + parameters: 0x032F + results: + - 0xA10 + - 0xA02 + + # Set custom flag when buying item from Goron selling Hylian Shield + - only if: Shop_Items == On + index: 0xA1C + type: event + event: set event flag + parameters: 0x032F + next: 0xA1A + + # Check custom flag for Goron selling Red Potion + - only if: Shop_Items == On + index: 0x9BF + type: branch + query: event flag + parameters: 0x0330 + results: + - 0x9B7 + - 0x9AA + + # Set custom flag when buying item from Goron selling Red Potion + - only if: Shop_Items == On + index: 0x9BD + type: event + event: set event flag + parameters: 0x0330 + next: 0x9BE + + # Make the empty bottle check always proceed to the rupee check + - only if: Shop_Items == On + index: 0x9A8 + type: branch + query: empty bottles + parameters: 0x0001 + results: + - 0x9B6 + - 0x9B6 + + # Check custom flag for Goron selling lantern oil + - only if: Shop_Items == On + index: 0x9A6 + type: branch + query: event flag + parameters: 0x0331 + results: + - 0x9A2 + - 0x97C + + # Set custom flag when buying item from Goron selling red potion + - only if: Shop_Items == On + index: 0x97D + type: event + event: set event flag + parameters: 0x0331 + next: 0x997 + + # Make the empty bottle check always proceed to the rupee check + - only if: Shop_Items == On + index: 0x97F + type: branch + query: empty bottles + parameters: 0x0001 + results: + - 0x980 + - 0x980 + + # Always branch the same direction regardless of whether we've gone through MDH + - only if: Shop_Items == On + index: 0x988 + type: branch + query: event flag + parameters: 0x00FA + results: + - 0x998 + - 0x998 + + # Check custom flag for Goron who sells 30 Arrows + - only if: Shop_Items == On + index: 0x9C1 + type: branch + query: event flag + parameters: 0x0332 + results: + - 0x9CD + - 0x9DD + + # Set custom flag when buying item from Goron selling 30 Arrows + - only if: Shop_Items == On + index: 0x9FC + type: event + event: set event flag + parameters: 0x0332 + next: 0x9FD + + # Skip directly to the rupee check when buying from the Goron who sells arrows + - only if: Shop_Items == On + index: 0x9C4 + type: branch + query: select 2 + parameters: 0x0000 + results: + - 0x9C5 + - 0x9FB + + # Always branch the same direction regardless of whether we've gone through MDH + - only if: Shop_Items == On + index: 0x9DD + type: branch + query: event flag + parameters: 0x00FA + results: + - 0x9E8 + - 0x9E8 + 5: # zel_05.bmg # Patch Yeta flow to always give the map check even if the player has obtained the Ordon Cheese - index: 0x8 diff --git a/mods/randomizer/generator/data/items.yaml b/mods/randomizer/generator/data/items.yaml index 28fc7c08b8..31e90f8b79 100644 --- a/mods/randomizer/generator/data/items.yaml +++ b/mods/randomizer/generator/data/items.yaml @@ -412,9 +412,9 @@ Importance: Major Id: 0x65 -#- Name: Lantern Oil Shop -# Importance: Junk -# Id: 0x66 +- Name: Lantern Oil Shop + Importance: Junk + Id: 0x66 #- Name: Water # Importance: Junk diff --git a/mods/randomizer/generator/data/locations.yaml b/mods/randomizer/generator/data/locations.yaml index b771c7bc77..97a73f7d03 100644 --- a/mods/randomizer/generator/data/locations.yaml +++ b/mods/randomizer/generator/data/locations.yaml @@ -2416,6 +2416,66 @@ - STAR Prize 2 Event Flag: 0x2301 +- Name: Castle Town Goron Shop Red Potion + Original Item: Red Potion Shop + Categories: + - Overworld + - Castle Town + - Shop + - ARC + Metadata: + Shop: + - Stage: 73 + Item: 0x61 + Name Lookup: + - Castle Town Goron Shop Red Potion + Event Flag: 0x6340 + +- Name: Castle Town Goron Shop Lantern Oil + Original Item: Lantern Oil Shop + Categories: + - Overworld + - Castle Town + - Shop + - ARC + Metadata: + Shop: + - Stage: 73 + Item: 0x66 + Name Lookup: + - Castle Town Goron Shop Lantern Oil + Event Flag: 0x6320 + +- Name: Castle Town Goron Shop Hylian Shield + Original Item: Hylian Shield + Categories: + - Overworld + - Castle Town + - Shop + - ARC + Metadata: + Shop: + - Stage: 73 + Item: 0x2C + Name Lookup: + - Castle Town Goron Shop Hylian Shield + Event Flag: 0x6380 + +- Name: Castle Town Goron Shop Arrow Refill + Original Item: Arrows 30 + Categories: + - Overworld + - Castle Town + - Shop + - ARC + Metadata: + Shop: + - Stage: 53 + Item: 0x10 + Name Lookup: + - Castle Town Goron Shop Arrow Refill + Event Flag: 0x6310 + - Name: Castle Town Malo Mart Magic Armor Original Item: Magic Armor Categories: diff --git a/mods/randomizer/generator/data/text/languages/english.yaml b/mods/randomizer/generator/data/text/languages/english.yaml index 24184fda1d..14be1beaa5 100644 --- a/mods/randomizer/generator/data/text/languages/english.yaml +++ b/mods/randomizer/generator/data/text/languages/english.yaml @@ -498,6 +498,14 @@ Bottle with Half Milk: Cryptic: Text: a {baby bottle} +Lantern Oil Shop: + Standard: + Text: Lantern Oil Shop + Pretty: + Text: some {Lantern Oil} + Cryptic: + Text: an {oil refill} + Fairy Tears: Standard: Text: Fairy Tears @@ -2189,6 +2197,65 @@ Charlo Donation Ask Text Template: For ... Would you please make a donation? +Castle Town Goron Red Potion Confirmation Initial Text Template: + Standard: + Text: |- + You can buy for only 40 Rupees! + +Castle Town Goron Red Potion Confirmation Later Text Template: + Standard: + Text: |- + Buy it Brother! I am talking about for 40 Rupees! + +Castle Town Goron Lantern Oil Confirmation Initial Text Template: + Standard: + Text: |- + So, Brother, would you buy from me for 30 Rupees? + +Castle Town Goron Lantern Oil Confirmation Later Text Template: + Standard: + Text: |- + Just buy from me for 30 Rupees, OK? + +Castle Town Goron Arrow Refill Secret Text Template: + Standard: + Text: |- + Despite all that is going on, if you + think you need , just let me know, Brother. + +Castle Town Goron Arrow Refill Confirmation Initial Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Arrow Refill Embarrassing Text Template: + Standard: + Text: |- + It is embarrassing that the only + thing I can do for you, our + benefactor, is sell you . + +Castle Town Goron Arrow Refill Let Me Know Text Template: + Standard: + Text: |- + I insist you let me know if you + should ever need , Brother. + +Castle Town Goron Arrow Refill Confirmation Later Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Hylian Shield Confirmation Initial Text Template: + Standard: + Text: |- + Anyway... Would you want for 210 Rupees? + +Castle Town Goron Hylian Shield Confirmation Later Text Template: + Standard: + Text: |- + Would you want for 210 Rupees? + Coro Bottle Offer 1 Text Template: Standard: Text: |- diff --git a/mods/randomizer/generator/data/text/languages/french.yaml b/mods/randomizer/generator/data/text/languages/french.yaml index e54b23a280..a4a7c781b7 100644 --- a/mods/randomizer/generator/data/text/languages/french.yaml +++ b/mods/randomizer/generator/data/text/languages/french.yaml @@ -498,6 +498,14 @@ Bottle with Half Milk: Cryptic: Text: a {baby bottle} +Lantern Oil Shop: + Standard: + Text: Lantern Oil Shop + Pretty: + Text: some {Lantern Oil} + Cryptic: + Text: an {oil refill} + Fairy Tears: Standard: Text: Fairy Tears @@ -2181,6 +2189,65 @@ Charlo Donation Ask Text Template: For ... Would you please make a donation? +Castle Town Goron Red Potion Confirmation Initial Text Template: + Standard: + Text: |- + You can buy for only 40 Rupees! + +Castle Town Goron Red Potion Confirmation Later Text Template: + Standard: + Text: |- + Buy it Brother! I am talking about for 40 Rupees! + +Castle Town Goron Lantern Oil Confirmation Initial Text Template: + Standard: + Text: |- + So, Brother, would you buy from me for 30 Rupees? + +Castle Town Goron Lantern Oil Confirmation Later Text Template: + Standard: + Text: |- + Just buy from me for 30 Rupees, OK? + +Castle Town Goron Arrow Refill Secret Text Template: + Standard: + Text: |- + Despite all that is going on, if you + think you need , just let me know, Brother. + +Castle Town Goron Arrow Refill Confirmation Initial Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Arrow Refill Embarrassing Text Template: + Standard: + Text: |- + It is embarrassing that the only + thing I can do for you, our + benefactor, is sell you . + +Castle Town Goron Arrow Refill Let Me Know Text Template: + Standard: + Text: |- + I insist you let me know if you + should ever need , Brother. + +Castle Town Goron Arrow Refill Confirmation Later Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Hylian Shield Confirmation Initial Text Template: + Standard: + Text: |- + Anyway... Would you want for 210 Rupees? + +Castle Town Goron Hylian Shield Confirmation Later Text Template: + Standard: + Text: |- + Would you want for 210 Rupees? + Coro Bottle Offer 1 Text Template: Standard: Text: |- diff --git a/mods/randomizer/generator/data/text/languages/german.yaml b/mods/randomizer/generator/data/text/languages/german.yaml index e4e9a7817e..f65aced9a6 100644 --- a/mods/randomizer/generator/data/text/languages/german.yaml +++ b/mods/randomizer/generator/data/text/languages/german.yaml @@ -498,6 +498,14 @@ Bottle with Half Milk: Cryptic: Text: a {baby bottle} +Lantern Oil Shop: + Standard: + Text: Lantern Oil Shop + Pretty: + Text: some {Lantern Oil} + Cryptic: + Text: an {oil refill} + Fairy Tears: Standard: Text: Fairy Tears @@ -2181,6 +2189,65 @@ Charlo Donation Ask Text Template: For ... Would you please make a donation? +Castle Town Goron Red Potion Confirmation Initial Text Template: + Standard: + Text: |- + You can buy for only 40 Rupees! + +Castle Town Goron Red Potion Confirmation Later Text Template: + Standard: + Text: |- + Buy it Brother! I am talking about for 40 Rupees! + +Castle Town Goron Lantern Oil Confirmation Initial Text Template: + Standard: + Text: |- + So, Brother, would you buy from me for 30 Rupees? + +Castle Town Goron Lantern Oil Confirmation Later Text Template: + Standard: + Text: |- + Just buy from me for 30 Rupees, OK? + +Castle Town Goron Arrow Refill Secret Text Template: + Standard: + Text: |- + Despite all that is going on, if you + think you need , just let me know, Brother. + +Castle Town Goron Arrow Refill Confirmation Initial Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Arrow Refill Embarrassing Text Template: + Standard: + Text: |- + It is embarrassing that the only + thing I can do for you, our + benefactor, is sell you . + +Castle Town Goron Arrow Refill Let Me Know Text Template: + Standard: + Text: |- + I insist you let me know if you + should ever need , Brother. + +Castle Town Goron Arrow Refill Confirmation Later Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Hylian Shield Confirmation Initial Text Template: + Standard: + Text: |- + Anyway... Would you want for 210 Rupees? + +Castle Town Goron Hylian Shield Confirmation Later Text Template: + Standard: + Text: |- + Would you want for 210 Rupees? + Coro Bottle Offer 1 Text Template: Standard: Text: |- diff --git a/mods/randomizer/generator/data/text/languages/italian.yaml b/mods/randomizer/generator/data/text/languages/italian.yaml index 7680a56b39..0f4af0b0f2 100644 --- a/mods/randomizer/generator/data/text/languages/italian.yaml +++ b/mods/randomizer/generator/data/text/languages/italian.yaml @@ -498,6 +498,14 @@ Bottle with Half Milk: Cryptic: Text: a {baby bottle} +Lantern Oil Shop: + Standard: + Text: Lantern Oil Shop + Pretty: + Text: some {Lantern Oil} + Cryptic: + Text: an {oil refill} + Fairy Tears: Standard: Text: Fairy Tears @@ -2181,6 +2189,65 @@ Charlo Donation Ask Text Template: For ... Would you please make a donation? +Castle Town Goron Red Potion Confirmation Initial Text Template: + Standard: + Text: |- + You can buy for only 40 Rupees! + +Castle Town Goron Red Potion Confirmation Later Text Template: + Standard: + Text: |- + Buy it Brother! I am talking about for 40 Rupees! + +Castle Town Goron Lantern Oil Confirmation Initial Text Template: + Standard: + Text: |- + So, Brother, would you buy from me for 30 Rupees? + +Castle Town Goron Lantern Oil Confirmation Later Text Template: + Standard: + Text: |- + Just buy from me for 30 Rupees, OK? + +Castle Town Goron Arrow Refill Secret Text Template: + Standard: + Text: |- + Despite all that is going on, if you + think you need , just let me know, Brother. + +Castle Town Goron Arrow Refill Confirmation Initial Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Arrow Refill Embarrassing Text Template: + Standard: + Text: |- + It is embarrassing that the only + thing I can do for you, our + benefactor, is sell you . + +Castle Town Goron Arrow Refill Let Me Know Text Template: + Standard: + Text: |- + I insist you let me know if you + should ever need , Brother. + +Castle Town Goron Arrow Refill Confirmation Later Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Hylian Shield Confirmation Initial Text Template: + Standard: + Text: |- + Anyway... Would you want for 210 Rupees? + +Castle Town Goron Hylian Shield Confirmation Later Text Template: + Standard: + Text: |- + Would you want for 210 Rupees? + Coro Bottle Offer 1 Text Template: Standard: Text: |- diff --git a/mods/randomizer/generator/data/text/languages/japanese.yaml b/mods/randomizer/generator/data/text/languages/japanese.yaml index 4cc69dac00..7beacb6b6b 100644 --- a/mods/randomizer/generator/data/text/languages/japanese.yaml +++ b/mods/randomizer/generator/data/text/languages/japanese.yaml @@ -498,6 +498,14 @@ Bottle with Half Milk: Cryptic: Text: a {baby bottle} +Lantern Oil Shop: + Standard: + Text: Lantern Oil Shop + Pretty: + Text: some {Lantern Oil} + Cryptic: + Text: an {oil refill} + Fairy Tears: Standard: Text: Fairy Tears @@ -2142,6 +2150,65 @@ Charlo Donation Ask Text Template: For ... Would you please make a donation? +Castle Town Goron Red Potion Confirmation Initial Text Template: + Standard: + Text: |- + You can buy for only 40 Rupees! + +Castle Town Goron Red Potion Confirmation Later Text Template: + Standard: + Text: |- + Buy it Brother! I am talking about for 40 Rupees! + +Castle Town Goron Lantern Oil Confirmation Initial Text Template: + Standard: + Text: |- + So, Brother, would you buy from me for 30 Rupees? + +Castle Town Goron Lantern Oil Confirmation Later Text Template: + Standard: + Text: |- + Just buy from me for 30 Rupees, OK? + +Castle Town Goron Arrow Refill Secret Text Template: + Standard: + Text: |- + Despite all that is going on, if you + think you need , just let me know, Brother. + +Castle Town Goron Arrow Refill Confirmation Initial Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Arrow Refill Embarrassing Text Template: + Standard: + Text: |- + It is embarrassing that the only + thing I can do for you, our + benefactor, is sell you . + +Castle Town Goron Arrow Refill Let Me Know Text Template: + Standard: + Text: |- + I insist you let me know if you + should ever need , Brother. + +Castle Town Goron Arrow Refill Confirmation Later Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Hylian Shield Confirmation Initial Text Template: + Standard: + Text: |- + Anyway... Would you want for 210 Rupees? + +Castle Town Goron Hylian Shield Confirmation Later Text Template: + Standard: + Text: |- + Would you want for 210 Rupees? + Coro Bottle Offer 1 Text Template: Standard: Text: |- diff --git a/mods/randomizer/generator/data/text/languages/spanish.yaml b/mods/randomizer/generator/data/text/languages/spanish.yaml index ee55c8d512..23ce66402d 100644 --- a/mods/randomizer/generator/data/text/languages/spanish.yaml +++ b/mods/randomizer/generator/data/text/languages/spanish.yaml @@ -498,6 +498,14 @@ Bottle with Half Milk: Cryptic: Text: a {baby bottle} +Lantern Oil Shop: + Standard: + Text: Lantern Oil Shop + Pretty: + Text: some {Lantern Oil} + Cryptic: + Text: an {oil refill} + Fairy Tears: Standard: Text: Fairy Tears @@ -2181,6 +2189,65 @@ Charlo Donation Ask Text Template: For ... Would you please make a donation? +Castle Town Goron Red Potion Confirmation Initial Text Template: + Standard: + Text: |- + You can buy for only 40 Rupees! + +Castle Town Goron Red Potion Confirmation Later Text Template: + Standard: + Text: |- + Buy it Brother! I am talking about for 40 Rupees! + +Castle Town Goron Lantern Oil Confirmation Initial Text Template: + Standard: + Text: |- + So, Brother, would you buy from me for 30 Rupees? + +Castle Town Goron Lantern Oil Confirmation Later Text Template: + Standard: + Text: |- + Just buy from me for 30 Rupees, OK? + +Castle Town Goron Arrow Refill Secret Text Template: + Standard: + Text: |- + Despite all that is going on, if you + think you need , just let me know, Brother. + +Castle Town Goron Arrow Refill Confirmation Initial Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Arrow Refill Embarrassing Text Template: + Standard: + Text: |- + It is embarrassing that the only + thing I can do for you, our + benefactor, is sell you . + +Castle Town Goron Arrow Refill Let Me Know Text Template: + Standard: + Text: |- + I insist you let me know if you + should ever need , Brother. + +Castle Town Goron Arrow Refill Confirmation Later Text Template: + Standard: + Text: |- + So... Would you want to buy for 40 Rupees? + +Castle Town Goron Hylian Shield Confirmation Initial Text Template: + Standard: + Text: |- + Anyway... Would you want for 210 Rupees? + +Castle Town Goron Hylian Shield Confirmation Later Text Template: + Standard: + Text: |- + Would you want for 210 Rupees? + Coro Bottle Offer 1 Text Template: Standard: Text: |- diff --git a/mods/randomizer/generator/data/text/text_overrides.yaml b/mods/randomizer/generator/data/text/text_overrides.yaml index 53b7980abb..0971ab01a9 100644 --- a/mods/randomizer/generator/data/text/text_overrides.yaml +++ b/mods/randomizer/generator/data/text/text_overrides.yaml @@ -379,6 +379,59 @@ Group: 4 Message Id: 6403 +- Only If: Shop_Items == On + Name: Castle Town Goron Red Potion Confirmation Initial Text + Group: 4 + Message Id: 6626 + +- Only If: Shop_Items == On + Name: Castle Town Goron Red Potion Confirmation Later Text + Group: 4 + Message Id: 6628 + +- Only If: Shop_Items == On + Name: Castle Town Goron Lantern Oil Confirmation Initial Text + Group: 4 + Message Id: 6614 + +- Only If: Shop_Items == On + Name: Castle Town Goron Lantern Oil Confirmation Later Text + Group: 4 + Message Id: 6616 + +- Only If: Shop_Items == On + Name: Castle Town Goron Arrow Refill Secret Text + Group: 4 + Message Id: 6650 + +- Only If: Shop_Items == On + Name: Castle Town Goron Arrow Refill Confirmation Initial Text + Group: 4 + Message Id: 6651 + +- Only If: Shop_Items == On + Name: Castle Town Goron Arrow Refill Embarrassing Text + Group: 4 + Message Id: 6652 + +- Only If: Shop_Items == On + Name: Castle Town Goron Arrow Refill Let Me Know Text + Group: 4 + Message Id: 6653 + +- Only If: Shop_Items == On + Name: Castle Town Goron Arrow Refill Confirmation Later Text + Group: 4 + Message Id: 6654 + +- Name: Castle Town Goron Hylian Shield Confirmation Initial Text + Group: 4 + Message Id: 6662 + +- Name: Castle Town Goron Hylian Shield Confirmation Later Text + Group: 4 + Message Id: 6664 + - Name: Coro Bottle Offer 1 Text Group: 6 Message Id: 5216 diff --git a/mods/randomizer/generator/data/world/overworld/Lanayru Province.yaml b/mods/randomizer/generator/data/world/overworld/Lanayru Province.yaml index 6bd59e4216..2e69474882 100644 --- a/mods/randomizer/generator/data/world/overworld/Lanayru Province.yaml +++ b/mods/randomizer/generator/data/world/overworld/Lanayru Province.yaml @@ -199,6 +199,10 @@ - Name: Castle Town Goron House Can Transform: If Transform Anywhere + Locations: + Castle Town Goron Shop Red Potion: Nothing + Castle Town Goron Shop Lantern Oil: Nothing + Castle Town Goron Shop Hylian Shield: Nothing Exits: Castle Town Goron House West Door Interior: Nothing Castle Town Goron House East Door Interior: Nothing @@ -207,6 +211,8 @@ - Name: Castle Town Goron House Ledge Twilight: Lanayru Can Transform: If Transform Anywhere + Locations: + Castle Town Goron Shop Arrow Refill: Can_Complete_Lanayru_Twilight Exits: Castle Town Goron House: Nothing diff --git a/mods/randomizer/generator/logic/hints.cpp b/mods/randomizer/generator/logic/hints.cpp index 5e016d1eef..8b1cbd47f9 100644 --- a/mods/randomizer/generator/logic/hints.cpp +++ b/mods/randomizer/generator/logic/hints.cpp @@ -929,6 +929,25 @@ namespace randomizer::logic::hints { "Castle Town Malo Mart Magic Armor After Purchase Text", "Castle Town Malo Mart Magic Armor Text", "Castle Town Malo Mart Magic Armor Sold Out Text"}, Text::ORANGE); + doItemTextReplacement(world, "Castle Town Goron Shop Red Potion", + {"Castle Town Goron Red Potion Confirmation Initial Text", + "Castle Town Goron Red Potion Confirmation Later Text"}, Text::ORANGE); + + doItemTextReplacement(world, "Castle Town Goron Shop Lantern Oil", + {"Castle Town Goron Lantern Oil Confirmation Initial Text", + "Castle Town Goron Lantern Oil Confirmation Later Text"}, Text::ORANGE); + + doItemTextReplacement(world, "Castle Town Goron Shop Arrow Refill", + {"Castle Town Goron Arrow Refill Confirmation Initial Text", + "Castle Town Goron Arrow Refill Confirmation Later Text", + "Castle Town Goron Arrow Refill Secret Text", + "Castle Town Goron Arrow Refill Embarrassing Text", + "Castle Town Goron Arrow Refill Let Me Know Text"}, Text::ORANGE); + + doItemTextReplacement(world, "Castle Town Goron Shop Hylian Shield", + {"Castle Town Goron Hylian Shield Confirmation Initial Text", + "Castle Town Goron Hylian Shield Confirmation Later Text"}, Text::ORANGE); + doItemTextReplacement(world, "Coro Bottle", {"Coro Bottle Offer 1 Text", "Coro Bottle Offer 2 Text", "Coro Bottle Offer 3 Text", "Coro Bottle Offer 4 Text"}, Text::ORANGE); } diff --git a/mods/randomizer/src/messages.cpp b/mods/randomizer/src/messages.cpp index 8558a3d3f6..36df8c6593 100644 --- a/mods/randomizer/src/messages.cpp +++ b/mods/randomizer/src/messages.cpp @@ -228,6 +228,7 @@ bool resolve_query(const std::string& name, FlowQueryId& out) { {"rupees", FLOW_QUERY_RUPEES}, {"item owned", FLOW_QUERY_ITEM_OWNED}, {"empty bottles", FLOW_QUERY_EMPTY_BOTTLES}, + {"select 2", FLOW_QUERY_SELECT_2}, {"select 2 cancel", FLOW_QUERY_SELECT_2_CANCEL}, {"select 3 cancel", FLOW_QUERY_SELECT_3_CANCEL}, }; @@ -249,6 +250,7 @@ bool resolve_query(const std::string& name, FlowQueryId& out) { bool resolve_event(const std::string& name, FlowEventId& out) { static const std::unordered_map builtins{ + {"set event flag", FLOW_EVENT_SET_EVENT_FLAG}, {"remove rupees", FLOW_EVENT_REMOVE_RUPEES}, {"start event", FLOW_EVENT_START_EVENT}, {"select vertical", FLOW_EVENT_SELECT_VERTICAL}, diff --git a/mods/randomizer/src/tools.cpp b/mods/randomizer/src/tools.cpp index 174b70dd61..29287bcd6b 100644 --- a/mods/randomizer/src/tools.cpp +++ b/mods/randomizer/src/tools.cpp @@ -533,6 +533,10 @@ std::string nameLookupOverride(const std::string& locationName) { {"Kakariko Village Malo Mart Red Potion", "shop:R_SP109:97"}, {"Kakariko Village Malo Mart Wooden Shield", "shop:R_SP109:43"}, {"Castle Town Malo Mart Magic Armor", "shop:R_SP160:48"}, + {"Castle Town Goron Shop Arrow Refill", "shop:F_SP116:16"}, + {"Castle Town Goron Shop Hylian Shield", "shop:R_SP160:44"}, + {"Castle Town Goron Shop Lantern Oil", "shop:R_SP160:102"}, + {"Castle Town Goron Shop Red Potion", "shop:R_SP160:97"}, {"Lakebed Temple Dungeon Reward", ITEM_CHECK_DUNGEON_REWARD_LAKEBED}, {"Ordon Cat Rescue", ITEM_CHECK_SERA_REWARD}, {"Ordon Shield", ITEM_CHECK_ORDON_SHIELD}, diff --git a/src/d/actor/d_a_npc_gra.cpp b/src/d/actor/d_a_npc_gra.cpp index e5e0d6eed0..d57ce3ab2b 100644 --- a/src/d/actor/d_a_npc_gra.cpp +++ b/src/d/actor/d_a_npc_gra.cpp @@ -4022,16 +4022,53 @@ BOOL daNpc_grA_c::talk(void*) { if (r26 && talkProc(NULL, TRUE, NULL)) { if (mFlow.getEventId(&sp8) == 1) { #if TARGET_PC + const u8 originalItem = sp8; u32 itemGiveTag = 0; - if (sp8 == dItemNo_BOMB_IN_BAG_e) { + bool isItemCheck = false; + if (originalItem == dItemNo_BOMB_IN_BAG_e) { const auto itemCheck = - dusk::mods::item_check_commit("goron_reward:F_SP113", sp8, this); + dusk::mods::item_check_commit("goron_reward:F_SP113", originalItem, this); sp8 = itemCheck.itemNo; itemGiveTag = itemCheck.tag; + isItemCheck = true; + } else { + const char* stage = dComIfGp_getStartStageName(); + const bool isAdultGoronShop = (strcmp(stage, "R_SP160") == 0 && originalItem == dItemNo_HYLIA_SHIELD_e) || + (strcmp(stage, "F_SP116") == 0 && originalItem == dItemNo_ARROW_30_e); + if (isAdultGoronShop) { + const auto itemCheck = dusk::mods::item_check_commit( + dusk::mods::item_give_tag_shop(originalItem), originalItem, this); + sp8 = itemCheck.itemNo; + itemGiveTag = itemCheck.tag; + isItemCheck = true; + } } -#endif + + if (isItemCheck && sp8 == dItemNo_NONE_e) { + dusk::mods::item_check_complete({itemGiveTag, dItemNo_NONE_e}, this); + r29 = 1; + if (mType == 0xb) { + field_0x1691 = 1; + } + } else { + field_0x1480 = fopAcM_createItemForPresentDemo( + ¤t.pos, sp8, 0, -1, -1, NULL, NULL, itemGiveTag); + if (field_0x1480 != fpcM_ERROR_PROCESS_ID_e) { + s16 r25 = + dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); + dComIfGp_getEvent()->reset(this); + fopAcM_orderChangeEventId(this, r25, 1, -1); + field_0x9ec = 1; + r29 = 1; + mOrderNewEvt = 1; + if (mType == 0xb) { + field_0x1691 = 1; + } + } + } +#else field_0x1480 = fopAcM_createItemForPresentDemo(¤t.pos, sp8, 0, -1, -1, NULL, - NULL IF_DUSK_ARG(itemGiveTag)); + NULL); if (field_0x1480 != fpcM_ERROR_PROCESS_ID_e) { s16 r25 = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xff); dComIfGp_getEvent()->reset(this); @@ -4043,6 +4080,7 @@ BOOL daNpc_grA_c::talk(void*) { field_0x1691 = 1; } } +#endif } else { if (mType == 0xa && field_0x1486 == 0 && daNpcF_chkEvtBit(0x187)) { dComIfGp_getEvent()->reset(this); diff --git a/src/d/actor/d_a_npc_grc.cpp b/src/d/actor/d_a_npc_grc.cpp index 2435f13c77..47ea7490c0 100644 --- a/src/d/actor/d_a_npc_grc.cpp +++ b/src/d/actor/d_a_npc_grc.cpp @@ -8,6 +8,9 @@ #include "d/actor/d_a_npc_grc.h" #include "d/actor/d_a_npc.h" #include "Z2AudioLib/Z2Instances.h" +#if TARGET_PC +#include "mods/items.h" +#endif #include enum grC_RES_File_ID { @@ -1476,8 +1479,27 @@ BOOL daNpc_grC_c::talk(void* param_1) { rv = TRUE; if (mFlow.getEventId(&i_itemNo) == 1) { - mItemID = fopAcM_createItemForPresentDemo(¤t.pos, i_itemNo, 0, -1, -1, NULL, NULL); +#if TARGET_PC + const bool isCastleTownShop = + strcmp(dComIfGp_getStartStageName(), "R_SP160") == 0 && + (i_itemNo == dItemNo_RED_BOTTLE_e || i_itemNo == dItemNo_OIL_BOTTLE_e); + u32 itemGiveTag = 0; + if (isCastleTownShop) { + const auto itemCheck = dusk::mods::item_check_commit( + dusk::mods::item_give_tag_shop(i_itemNo), i_itemNo, this); + i_itemNo = itemCheck.itemNo; + itemGiveTag = itemCheck.tag; + } + if (isCastleTownShop && i_itemNo == dItemNo_NONE_e) { + dusk::mods::item_check_complete({itemGiveTag, dItemNo_NONE_e}, this); + } else { + mItemID = fopAcM_createItemForPresentDemo( + ¤t.pos, i_itemNo, 0, -1, -1, NULL, NULL, itemGiveTag); + } +#else + mItemID = fopAcM_createItemForPresentDemo(¤t.pos, i_itemNo, 0, -1, -1, NULL, NULL); +#endif if (mItemID != fpcM_ERROR_PROCESS_ID_e) { s16 i_eventID = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); dComIfGp_getEvent()->reset(this);