summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2026-02-22 07:13:58 -0600
committerGitHub <noreply@github.com>2026-02-22 07:13:58 -0600
commit4eadf7bb9ed93787a01692ad4f1a7485555e7df1 (patch)
tree622ceb8bf46371452dab6c2582d508304b22fbea
parentd6ce368cf1818aacdb74f228c1cb16bdc091e50b (diff)
Award red potion and gold dust refills on first attempt (#1565)
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnGk.cpp8
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnTrt.cpp23
2 files changed, 24 insertions, 7 deletions
diff --git a/mm/2s2h/Rando/ActorBehavior/EnGk.cpp b/mm/2s2h/Rando/ActorBehavior/EnGk.cpp
index efed3bf4a..b1df69895 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnGk.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnGk.cpp
@@ -16,10 +16,16 @@ void Rando::ActorBehavior::InitEnGKBehavior() {
switch (actor->id) {
case ACTOR_EN_GK:
- if (RANDO_SAVE_CHECKS[RC_GORON_RACETRACK_GOLD_DUST].cycleObtained) {
+ // In either case here, WEEKEVENTREG_RECEIVED_GORON_RACE_BOTTLE will be set and trigger the rando
+ // check to be queued.
+
+ // If they have an empty bottle, force item to gold dust refill and let vanilla item get continue
+ if (Inventory_HasEmptyBottle()) {
+ *item = GI_GOLD_DUST_2;
return;
}
+ // Otherwise bypass item get entirely
*should = false;
actor->parent = &player->actor;
player->talkActor = actor;
diff --git a/mm/2s2h/Rando/ActorBehavior/EnTrt.cpp b/mm/2s2h/Rando/ActorBehavior/EnTrt.cpp
index e423997ec..e40a3f14e 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnTrt.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnTrt.cpp
@@ -27,17 +27,28 @@ void Rando::ActorBehavior::InitEnTrtBehavior() {
Actor* actor = va_arg(args, Actor*);
Player* player = GET_PLAYER(gPlayState);
- if (actor->id != ACTOR_EN_TRT && actor->id != ACTOR_EN_TRT2) {
+ // Let vanilla item give continue
+ if ((actor->id != ACTOR_EN_TRT && actor->id != ACTOR_EN_TRT2) ||
+ !RANDO_SAVE_CHECKS[RC_HAGS_POTION_SHOP_KOTAKE].shuffled ||
+ (*item != GI_POTION_RED_BOTTLE && *item != GI_POTION_RED)) {
return;
}
- if (!RANDO_SAVE_CHECKS[RC_HAGS_POTION_SHOP_KOTAKE].shuffled ||
- RANDO_SAVE_CHECKS[RC_HAGS_POTION_SHOP_KOTAKE].cycleObtained ||
- (*item != GI_POTION_RED_BOTTLE && *item != GI_POTION_RED)) {
+
+ if (!RANDO_SAVE_CHECKS[RC_HAGS_POTION_SHOP_KOTAKE].cycleObtained) {
+ SET_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_KOTAKE_BOTTLE);
+ SET_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_RED_POTION_FOR_KOUME);
+ }
+
+ // In either case here, WEEKEVENTREG_RECEIVED_KOTAKE_BOTTLE will be set and trigger the rando
+ // check to be queued.
+
+ // If they have an empty bottle, force item to red potion and let vanilla item get continue
+ if (Inventory_HasEmptyBottle()) {
+ *item = GI_POTION_RED;
return;
}
- SET_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_KOTAKE_BOTTLE);
- SET_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_RED_POTION_FOR_KOUME);
+ // Otherwise bypass item get entirely
*should = false;
actor->parent = &player->actor;