Skip to content

Commit

Permalink
vb talon's chickens (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
briaguya-ai authored Apr 4, 2024
1 parent 1e9cba1 commit 307e106
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 2 additions & 0 deletions soh/soh/Enhancements/game-interactor/GameInteractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ typedef enum {
GI_VB_GIVE_ITEM_FROM_SHOOTING_GALLERY,
// Opt: *EnExItem
GI_VB_GIVE_ITEM_FROM_TARGET_IN_WOODS,
// Opt: *EnTa
GI_VB_GIVE_ITEM_FROM_TALONS_CHICKENS,
// Opt: *EnDivingGame
GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME,

Expand Down
1 change: 1 addition & 0 deletions soh/soh/Enhancements/randomizer/hook_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
case GI_VB_TRADE_TIMER_FROG:
case GI_VB_ANJU_SET_OBTAINED_TRADE_ITEM:
case GI_VB_GIVE_ITEM_FROM_TARGET_IN_WOODS:
case GI_VB_GIVE_ITEM_FROM_TALONS_CHICKENS:
case GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME:
case GI_VB_GIVE_ITEM_FROM_GORON:
case GI_VB_GIVE_ITEM_FROM_LAB_DIVE:
Expand Down
12 changes: 3 additions & 9 deletions soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ void EnTa_TalkGeneralInLonLonHouse(EnTa* this, PlayState* play) {
}

void EnTa_GiveItemInLonLonHouse(EnTa* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_TALONS_CHICKENS, true, &this->actor)) {
this->actor.parent = NULL;
this->actionFunc = EnTa_TalkGeneralInLonLonHouse;
if (!(this->unk_2E0 & 0x2)) {
Expand All @@ -879,11 +879,8 @@ void EnTa_GiveItemInLonLonHouse(EnTa* this, PlayState* play) {
} else if (this->unk_2E0 & 2) {
Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 50.0f);
} else {
if (!IS_RANDO) {
if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_TALONS_CHICKENS, true, &this->actor)) {
Actor_OfferGetItem(&this->actor, play, GI_MILK_BOTTLE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
}
}
this->unk_2E0 |= 1;
Expand All @@ -894,11 +891,8 @@ void EnTa_TalkAfterCuccoGameFirstWon(EnTa* this, PlayState* play) {
Message_CloseTextbox(play);
this->unk_2E0 &= ~0x2;
EnTa_SetupAction(this, EnTa_GiveItemInLonLonHouse, EnTa_AnimRunToEnd);
if (!IS_RANDO) {
if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_TALONS_CHICKENS, true, &this->actor)) {
Actor_OfferGetItem(&this->actor, play, GI_MILK_BOTTLE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
}
}
}
Expand Down

0 comments on commit 307e106

Please sign in to comment.