mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Randomizer: Fixes LACS and Prelude checks under certain conditions (#961)
* Prevents LACS flag from getting set when it shouldn't be. * Fixes Prelude and LACS checks so they apply immediately if missed. * Refactors the scene-flag-setting code into its own function. * Renames new enums and props to be clearer and not specific to scene flags. * Refactors pendingFlag data into a separate struct.
This commit is contained in:
parent
8c25e9a992
commit
b59c9cdf02
4 changed files with 51 additions and 6 deletions
|
@ -237,10 +237,11 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(GlobalContext* globalCtx, Randomi
|
|||
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) && LINK_IS_ADULT &&
|
||||
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA) &&
|
||||
!Flags_GetTreasure(globalCtx, 0x1E) && player != NULL && !Player_InBlockingCsMode(globalCtx, player) &&
|
||||
globalCtx->sceneLoadFlag == 0 && player->getItemId == GI_NONE) {
|
||||
globalCtx->sceneLoadFlag == 0) {
|
||||
GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_ARROW_LIGHT);
|
||||
GiveItemWithoutActor(globalCtx, getItemId);
|
||||
Flags_SetTreasure(globalCtx, 0x1E);
|
||||
player->pendingFlag.flagID = 0x1E;
|
||||
player->pendingFlag.flagType = FLAG_SCENE_TREASURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue