summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalkierian <malkierian@gmail.com>2025-04-11 12:49:34 -0700
committerGitHub <noreply@github.com>2025-04-11 15:49:34 -0400
commitf0f2157a4c2b4bc6cbe239eebb1e4a2b54c80321 (patch)
tree40c36382cb3061f7b0498ecba284e9989a76961e
parent698fca8862b791e6458c98e4e3d7849189d0a213 (diff)
Move processing for RAND_INF_WEIRD_EGG to trade item processing so it happens whenever you get the egg. (#5382)
Remove RSK check for garden entrance because access is still handled by `CanUse(RG_WEIRD_EGG)`.
-rw-r--r--soh/soh/Enhancements/randomizer/hook_handlers.cpp4
-rw-r--r--soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp2
-rw-r--r--soh/src/code/z_parameter.c3
3 files changed, 4 insertions, 5 deletions
diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp
index a10e8b67f..4ea81a943 100644
--- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp
+++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp
@@ -245,10 +245,6 @@ void RandomizerOnFlagSetHandler(int16_t flagType, int16_t flag) {
Flags_SetRandomizerInf(RAND_INF_ZELDAS_LETTER);
}
- if (flagType == FLAG_EVENT_CHECK_INF && flag == EVENTCHKINF_OBTAINED_POCKET_EGG) {
- Flags_SetRandomizerInf(RAND_INF_WEIRD_EGG);
- }
-
RandomizerCheck rc = GetRandomizerCheckFromFlag(flagType, flag);
if (rc == RC_UNKNOWN_CHECK)
return;
diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp
index bdcdf9a4c..dbf467b0f 100644
--- a/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp
+++ b/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp
@@ -34,7 +34,7 @@ void RegionTable_Init_CastleGrounds() {
}, {
//Exits
Entrance(RR_CASTLE_GROUNDS, []{return true;}),
- Entrance(RR_HC_GARDEN, []{return logic->CanUse(RG_WEIRD_EGG) || !ctx->GetOption(RSK_SHUFFLE_WEIRD_EGG) || (ctx->GetTrickOption(RT_DAMAGE_BOOST_SIMPLE) && logic->HasExplosives() && logic->CanJumpslash());}),
+ Entrance(RR_HC_GARDEN, []{return logic->CanUse(RG_WEIRD_EGG) || (ctx->GetTrickOption(RT_DAMAGE_BOOST_SIMPLE) && logic->HasExplosives() && logic->CanJumpslash());}),
Entrance(RR_HC_GREAT_FAIRY_FOUNTAIN, []{return logic->BlastOrSmash();}),
Entrance(RR_HC_STORMS_GROTTO, []{return logic->CanOpenStormsGrotto();}),
});
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index facbbfd81..2a6d3369d 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -2434,6 +2434,9 @@ u8 Item_Give(PlayState* play, u8 item) {
}
} else {
Flags_SetRandomizerInf(item - ITEM_WEIRD_EGG + RAND_INF_CHILD_TRADES_HAS_WEIRD_EGG);
+ if (item == ITEM_WEIRD_EGG) {
+ Flags_SetRandomizerInf(RAND_INF_WEIRD_EGG);
+ }
}
}