Man On Roof

This commit is contained in:
Taw 2024-02-10 09:06:34 -08:00
parent 596ea5ebbb
commit 4e5b92fdf3
3 changed files with 6 additions and 9 deletions

View File

@ -268,6 +268,7 @@ typedef enum {
GI_VB_GIVE_ITEM_FROM_MAGIC_BEAN_SALESMAN, GI_VB_GIVE_ITEM_FROM_MAGIC_BEAN_SALESMAN,
// Opt: *EnFr // Opt: *EnFr
GI_VB_GIVE_ITEM_FROM_FROGS, GI_VB_GIVE_ITEM_FROM_FROGS,
GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF,
GI_VB_GIVE_ITEM_FAIRY_OCARINA, GI_VB_GIVE_ITEM_FAIRY_OCARINA,
GI_VB_GIVE_ITEM_WEIRD_EGG, GI_VB_GIVE_ITEM_WEIRD_EGG,

View File

@ -782,6 +782,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
case GI_VB_ANJU_SET_OBTAINED_TRADE_ITEM: case GI_VB_ANJU_SET_OBTAINED_TRADE_ITEM:
case GI_VB_GIVE_ITEM_FROM_ROLLING_GORON_AS_CHILD: case GI_VB_GIVE_ITEM_FROM_ROLLING_GORON_AS_CHILD:
case GI_VB_GIVE_ITEM_FROM_LAB_DIVE: case GI_VB_GIVE_ITEM_FROM_LAB_DIVE:
case GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF:
case GI_VB_GIVE_ITEM_SKULL_TOKEN: case GI_VB_GIVE_ITEM_SKULL_TOKEN:
case GI_VB_GIVE_ITEM_FROM_BLUE_WARP: case GI_VB_GIVE_ITEM_FROM_BLUE_WARP:
case GI_VB_GIVE_ITEM_FAIRY_OCARINA: case GI_VB_GIVE_ITEM_FAIRY_OCARINA:

View File

@ -6,6 +6,7 @@
#include "z_en_ani.h" #include "z_en_ani.h"
#include "objects/object_ani/object_ani.h" #include "objects/object_ani/object_ani.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
@ -119,7 +120,7 @@ void func_809B0524(EnAni* this, PlayState* play) {
} }
void func_809B0558(EnAni* this, PlayState* play) { void func_809B0558(EnAni* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) { if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
this->actor.parent = NULL; this->actor.parent = NULL;
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
EnAni_SetupAction(this, func_809B04F0); EnAni_SetupAction(this, func_809B04F0);
@ -128,11 +129,8 @@ void func_809B0558(EnAni* this, PlayState* play) {
} }
Flags_SetItemGetInf(ITEMGETINF_15); Flags_SetItemGetInf(ITEMGETINF_15);
} else { } else {
if (!IS_RANDO) { if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f); func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 200.0f);
} }
} }
} }
@ -142,11 +140,8 @@ void func_809B05F0(EnAni* this, PlayState* play) {
EnAni_SetupAction(this, func_809B0558); EnAni_SetupAction(this, func_809B0558);
} }
if (!IS_RANDO) { if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_MAN_ON_ROOF, true, NULL)) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f); func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 200.0f);
} }
} }