diff --git a/mm/2s2h/BenGui/BenMenu.cpp b/mm/2s2h/BenGui/BenMenu.cpp index d433efcec7..761b77f370 100644 --- a/mm/2s2h/BenGui/BenMenu.cpp +++ b/mm/2s2h/BenGui/BenMenu.cpp @@ -985,11 +985,6 @@ void BenMenu::AddEnhancements() { .CVar("gEnhancements.Cycle.DoNotResetTimeSpeed") .Options(CheckboxOptions().Tooltip( "Playing the Song of Time will not reset the current time speed set by Inverted Song of Time.")); - AddWidget(path, "Keep Express Mail", WIDGET_CVAR_CHECKBOX) - .CVar("gEnhancements.Cycle.KeepExpressMail") - .Options(CheckboxOptions().Tooltip( - "Allows the player to keep the Express Mail in their inventory after delivering it " - "the first time, so that both deliveries can be done within one cycle.")); AddWidget(path, "Stop Oceanside Spider House squatter", WIDGET_CVAR_CHECKBOX) .CVar("gEnhancements.Cycle.StopOceansideSpiderHouseSquatter") .Options( @@ -1426,6 +1421,49 @@ void BenMenu::AddEnhancements() { .Max(60) .DefaultValue(60)); + path.column = SECTION_COLUMN_3; + AddWidget(path, "3 Day 100%", WIDGET_SEPARATOR_TEXT); + AddWidget(path, "Deku Link can damage Sakon", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.DekuDamageSuttari") + .Options(CheckboxOptions().Tooltip( + "Allows the player to damage Sakon the Thief as Deku Link allowing the player to obtain the " + "Blast Mask and the All-Night Mask in the first Deku Link Only cycle.")); + AddWidget(path, "Make Curiosity Shop not racist", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.NotRacistCuriosityShop") + .Options( + CheckboxOptions().Tooltip("Allows the player to shop at the curiosity shop regardless of race. " + "This lets you purchase the All-Night Mask in the first Deku Link Only cycle.")); + AddWidget(path, "Allow bank money for AN Mask", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.AllNightMaskWithBankMoney") + .Options( + CheckboxOptions().Tooltip("Allows the player to use their bank money to purchase the All-Night Mask. " + "This lets you purchase the All-Night Mask in the first Deku Link Only cycle.")); + AddWidget(path, "No timeskip with AN Mask", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.AllNightMaskNoTimeSkip") + .Options(CheckboxOptions().Tooltip( + "Normally, listening to Anju's Grandmother's stories will skip you forward in time. " + "This simply disables that so you don't skip forward if you're wearing the All-Night Mask.")); + AddWidget(path, "Mayor argues until Moonfall", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.MayorArguesUntilMoonfall") + .Options(CheckboxOptions().Tooltip( + "Normally, the mayor, the soldiers, and craftsmen will stop arguing by night on the third day. " + "This keeps them arguing so you can show them the Couple's Mask for the Piece of Heart.")); + AddWidget(path, "Keep Express Mail", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.KeepExpressMail") + .Options(CheckboxOptions().Tooltip( + "Allows the player to keep the Express Mail in their inventory after delivering it " + "the first time, so that both deliveries can be done within one cycle.")); + AddWidget(path, "3 Day 100% - Optional", WIDGET_SEPARATOR_TEXT); + AddWidget(path, "Oceanside Wallet Any Day", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.OceansideWalletAnyDay") + .Options(CheckboxOptions().Tooltip( + "Changes the behavior of the man who gives you the wallet so he'll give it to you any day instead of just " + "the first day. " + "As a side effect, he'll also give you the silver rupee any day, if you already have his wallet.")); + AddWidget(path, "No timeskip after hideout", WIDGET_CVAR_CHECKBOX) + .CVar("gEnhancements.DifficultyOptions.NoTimeskipAfterHideout") + .Options(CheckboxOptions().Tooltip("Normally you get a timeskip to midnight after finishing Sakon's hideout. " + "This simply disables that so you don't have to lose 5 precious hours.")); // HUD Editor path = { "Enhancements", "HUD Editor", SECTION_COLUMN_1 }; AddSidebarEntry("Enhancements", "HUD Editor", 1); diff --git a/mm/2s2h/Enhancements/DifficultyOptions/AllNightMaskNoTimeSkip.cpp b/mm/2s2h/Enhancements/DifficultyOptions/AllNightMaskNoTimeSkip.cpp new file mode 100644 index 0000000000..ac309c50ac --- /dev/null +++ b/mm/2s2h/Enhancements/DifficultyOptions/AllNightMaskNoTimeSkip.cpp @@ -0,0 +1,12 @@ +#include "public/bridge/consolevariablebridge.h" +#include "2s2h/GameInteractor/GameInteractor.h" +#include "2s2h/ShipInit.hpp" + +#define CVAR_NAME "gEnhancements.DifficultyOptions.AllNightMaskNoTimeSkip" +#define CVAR CVarGetInteger(CVAR_NAME, 0) + +void RegisterAllNightMaskNoTimeSkip() { + COND_VB_SHOULD(VB_ALL_NIGHT_TIME_SKIP, CVAR, { *should = false; }); +} + +static RegisterShipInitFunc initFunc(RegisterAllNightMaskNoTimeSkip, { CVAR_NAME }); diff --git a/mm/2s2h/Enhancements/DifficultyOptions/AllNightMaskWithBankMoney.cpp b/mm/2s2h/Enhancements/DifficultyOptions/AllNightMaskWithBankMoney.cpp new file mode 100644 index 0000000000..c238f2ab49 --- /dev/null +++ b/mm/2s2h/Enhancements/DifficultyOptions/AllNightMaskWithBankMoney.cpp @@ -0,0 +1,12 @@ +#include "public/bridge/consolevariablebridge.h" +#include "2s2h/GameInteractor/GameInteractor.h" +#include "2s2h/ShipInit.hpp" + +#define CVAR_NAME "gEnhancements.DifficultyOptions.AllNightMaskWithBankMoney" +#define CVAR CVarGetInteger(CVAR_NAME, 0) + +void RegisterAllNightMaskWithBankMoney() { + COND_VB_SHOULD(VB_NOT_OVERFLOW_BANK, CVAR, { *should = false; }); +} + +static RegisterShipInitFunc initFunc(RegisterAllNightMaskWithBankMoney, { CVAR_NAME }); diff --git a/mm/2s2h/Enhancements/DifficultyOptions/DekuDamageSuttari.cpp b/mm/2s2h/Enhancements/DifficultyOptions/DekuDamageSuttari.cpp new file mode 100644 index 0000000000..bd5c56c3ad --- /dev/null +++ b/mm/2s2h/Enhancements/DifficultyOptions/DekuDamageSuttari.cpp @@ -0,0 +1,12 @@ +#include "public/bridge/consolevariablebridge.h" +#include "2s2h/GameInteractor/GameInteractor.h" +#include "2s2h/ShipInit.hpp" + +#define CVAR_NAME "gEnhancements.DifficultyOptions.DekuDamageSuttari" +#define CVAR CVarGetInteger(CVAR_NAME, 0) + +void RegisterDekuDamageSuttari() { + COND_VB_SHOULD(VB_SUTTARI_IMMUNE_DEKU, CVAR, { *should = false; }); +} + +static RegisterShipInitFunc initFunc(RegisterDekuDamageSuttari, { CVAR_NAME }); diff --git a/mm/2s2h/Enhancements/Cycle/KeepExpressMail.cpp b/mm/2s2h/Enhancements/DifficultyOptions/KeepExpressMail.cpp similarity index 94% rename from mm/2s2h/Enhancements/Cycle/KeepExpressMail.cpp rename to mm/2s2h/Enhancements/DifficultyOptions/KeepExpressMail.cpp index 143efdc445..03e972b8a8 100644 --- a/mm/2s2h/Enhancements/Cycle/KeepExpressMail.cpp +++ b/mm/2s2h/Enhancements/DifficultyOptions/KeepExpressMail.cpp @@ -8,7 +8,7 @@ extern "C" { #include "variables.h" } -#define CVAR_NAME "gEnhancements.Cycle.KeepExpressMail" +#define CVAR_NAME "gEnhancements.DifficultyOptions.KeepExpressMail" #define CVAR CVarGetInteger(CVAR_NAME, 0) void RegisterKeepExpressMail() { diff --git a/mm/2s2h/Enhancements/DifficultyOptions/MayorArguesUntilMoonfall.cpp b/mm/2s2h/Enhancements/DifficultyOptions/MayorArguesUntilMoonfall.cpp new file mode 100644 index 0000000000..008606b386 --- /dev/null +++ b/mm/2s2h/Enhancements/DifficultyOptions/MayorArguesUntilMoonfall.cpp @@ -0,0 +1,12 @@ +#include "public/bridge/consolevariablebridge.h" +#include "2s2h/GameInteractor/GameInteractor.h" +#include "2s2h/ShipInit.hpp" + +#define CVAR_NAME "gEnhancements.DifficultyOptions.MayorArguesUntilMoonfall" +#define CVAR CVarGetInteger(CVAR_NAME, 0) + +void RegisterMayorArguesUntilMoonfall() { + COND_VB_SHOULD(VB_MAYOR_STOP_ARGUING, CVAR, { *should = false; }); +} + +static RegisterShipInitFunc initFunc(RegisterMayorArguesUntilMoonfall, { CVAR_NAME }); diff --git a/mm/2s2h/Enhancements/DifficultyOptions/NoTimeskipAfterHideout.cpp b/mm/2s2h/Enhancements/DifficultyOptions/NoTimeskipAfterHideout.cpp new file mode 100644 index 0000000000..dbb16673cd --- /dev/null +++ b/mm/2s2h/Enhancements/DifficultyOptions/NoTimeskipAfterHideout.cpp @@ -0,0 +1,12 @@ +#include "public/bridge/consolevariablebridge.h" +#include "2s2h/GameInteractor/GameInteractor.h" +#include "2s2h/ShipInit.hpp" + +#define CVAR_NAME "gEnhancements.DifficultyOptions.NoTimeskipAfterHideout" +#define CVAR CVarGetInteger(CVAR_NAME, 0) + +void RegisterNoTimeskipAfterHideout() { + COND_VB_SHOULD(VB_TIMESKIP_AFTER_HIDEOUT, CVAR, { *should = false; }); +} + +static RegisterShipInitFunc initFunc(RegisterNoTimeskipAfterHideout, { CVAR_NAME }); diff --git a/mm/2s2h/Enhancements/DifficultyOptions/NotRacistCuriosityShop.cpp b/mm/2s2h/Enhancements/DifficultyOptions/NotRacistCuriosityShop.cpp new file mode 100644 index 0000000000..03c68b4529 --- /dev/null +++ b/mm/2s2h/Enhancements/DifficultyOptions/NotRacistCuriosityShop.cpp @@ -0,0 +1,12 @@ +#include "public/bridge/consolevariablebridge.h" +#include "2s2h/GameInteractor/GameInteractor.h" +#include "2s2h/ShipInit.hpp" + +#define CVAR_NAME "gEnhancements.DifficultyOptions.NotRacistCuriosityShop" +#define CVAR CVarGetInteger(CVAR_NAME, 0) + +void RegisterNotRacistCuriosityShop() { + COND_VB_SHOULD(VB_CURIOSITY_SHOP_RACIST, CVAR, { *should = false; }); +} + +static RegisterShipInitFunc initFunc(RegisterNotRacistCuriosityShop, { CVAR_NAME }); diff --git a/mm/2s2h/Enhancements/DifficultyOptions/OceansideWalletAnyDay.cpp b/mm/2s2h/Enhancements/DifficultyOptions/OceansideWalletAnyDay.cpp new file mode 100644 index 0000000000..3936edbdcf --- /dev/null +++ b/mm/2s2h/Enhancements/DifficultyOptions/OceansideWalletAnyDay.cpp @@ -0,0 +1,12 @@ +#include "public/bridge/consolevariablebridge.h" +#include "2s2h/GameInteractor/GameInteractor.h" +#include "2s2h/ShipInit.hpp" + +#define CVAR_NAME "gEnhancements.DifficultyOptions.OceansideWalletAnyDay" +#define CVAR CVarGetInteger(CVAR_NAME, 0) + +void RegisterOceansideWalletAnyDay() { + COND_VB_SHOULD(VB_OCEAN_HOUSE_WALLET_FIRST_DAY_ONLY, CVAR, { *should = false; }); +} + +static RegisterShipInitFunc initFunc(RegisterOceansideWalletAnyDay, { CVAR_NAME }); diff --git a/mm/2s2h/GameInteractor/GameInteractor.h b/mm/2s2h/GameInteractor/GameInteractor.h index f6d3ffb2b4..14274441f9 100644 --- a/mm/2s2h/GameInteractor/GameInteractor.h +++ b/mm/2s2h/GameInteractor/GameInteractor.h @@ -243,6 +243,13 @@ typedef enum { VB_SETUP_TRANSITION, VB_BE_NEAR_DOOR, VB_LOAD_PLAYER_ANIMATION_FRAME, + VB_SUTTARI_IMMUNE_DEKU, + VB_CURIOSITY_SHOP_RACIST, + VB_NOT_OVERFLOW_BANK, + VB_ALL_NIGHT_TIME_SKIP, + VB_MAYOR_STOP_ARGUING, + VB_OCEAN_HOUSE_WALLET_FIRST_DAY_ONLY, + VB_TIMESKIP_AFTER_HIDEOUT, } GIVanillaBehavior; typedef enum { diff --git a/mm/2s2h/PresetManager/PresetManager.cpp b/mm/2s2h/PresetManager/PresetManager.cpp index 930044c872..0295104576 100644 --- a/mm/2s2h/PresetManager/PresetManager.cpp +++ b/mm/2s2h/PresetManager/PresetManager.cpp @@ -74,15 +74,15 @@ nlohmann::json curatedPresetJ = R"( "DoNotResetConsumables": 1, "DoNotResetRazorSword": 1, "DoNotResetRupees": 1, - "DoNotResetTimeSpeed": 1, - "KeepExpressMail": 1 + "DoNotResetTimeSpeed": 1 }, "Dialogue": { "FastBankSelection": 1, "FastText": 1 }, "DifficultyOptions": { - "LowerBankRewardThresholds": 1 + "LowerBankRewardThresholds": 1, + "KeepExpressMail": 1 }, "Dpad": { "DpadEquips": 1 diff --git a/mm/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c b/mm/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c index e7b638bcd2..599545404d 100644 --- a/mm/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c +++ b/mm/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c @@ -6,6 +6,7 @@ #include "z_en_baisen.h" #include "objects/object_bai/object_bai.h" +#include "2s2h/GameInteractor/GameInteractor.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) @@ -86,14 +87,16 @@ void EnBaisen_Init(Actor* thisx, PlayState* play) { this->paramCopy = this->actor.params; if (this->actor.params == 0) { this->unk290 = true; - if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80) && ((gSaveContext.save.day != 3) || !gSaveContext.save.isNight)) { + if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80) && (!GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) || + (gSaveContext.save.day != 3) || !gSaveContext.save.isNight)) { Actor_Kill(&this->actor); } } else { this->collider.dim.radius = 30; this->collider.dim.height = 60; this->collider.dim.yShift = 0; - if (CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80) || ((gSaveContext.save.day == 3) && gSaveContext.save.isNight)) { + if (CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80) || (GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) && + (gSaveContext.save.day == 3) && gSaveContext.save.isNight)) { Actor_Kill(&this->actor); } } @@ -261,7 +264,8 @@ void EnBaisen_Update(Actor* thisx, PlayState* play) { this->unusedCounter--; } this->actor.shape.rot.y = this->actor.world.rot.y; - if ((this->paramCopy != 0) && (gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + if (GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) && (this->paramCopy != 0) && (gSaveContext.save.day == 3) && + gSaveContext.save.isNight) { Actor_Kill(&this->actor); return; } diff --git a/mm/src/overlays/actors/ovl_En_Dt/z_en_dt.c b/mm/src/overlays/actors/ovl_En_Dt/z_en_dt.c index 387b7d79c4..fac98dd314 100644 --- a/mm/src/overlays/actors/ovl_En_Dt/z_en_dt.c +++ b/mm/src/overlays/actors/ovl_En_Dt/z_en_dt.c @@ -8,6 +8,7 @@ #include "objects/object_dt/object_dt.h" #include "overlays/actors/ovl_En_Muto/z_en_muto.h" #include "overlays/actors/ovl_En_Baisen/z_en_baisen.h" +#include "2s2h/GameInteractor/GameInteractor.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) @@ -107,7 +108,8 @@ void EnDt_Init(Actor* thisx, PlayState* play) { Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); - if ((gSaveContext.save.day == 3) && (gSaveContext.save.isNight != 0)) { + if (GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) && (gSaveContext.save.day == 3) && + (gSaveContext.save.isNight != 0)) { func_80BEAC84(this, play); } else { //! FAKE: @@ -208,6 +210,16 @@ void func_80BE9E94(EnDt* this, PlayState* play) { } actor = actor->next; } + if (!GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true)) { + if (this->unk_274 == NULL || this->unk_274 == 0) { + this->unk_274 = + (EnMuto*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_MUTO, -245.0f, 0.0f, -314.0f, 0, 16384, 0, 1); + } + if (this->unk_278 == NULL || this->unk_278 == 0) { + this->unk_278 = + (EnBaisen*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BAISEN, -84.0f, 0.0f, -315.0f, 0, -16384, 0, 1); + } + } func_80BE9EF8(this, play); } @@ -610,13 +622,16 @@ void EnDt_Update(Actor* thisx, PlayState* play) { SkelAnime_Update(&this->skelanime); Actor_SetScale(&this->actor, 0.01f); - if ((this->unk_254 != 4) && (this->unk_254 != 5) && (gSaveContext.save.day == 3) && - (gSaveContext.save.isNight != 0)) { - func_80BEAC84(this, play); + if (GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true)) { + if ((this->unk_254 != 4) && (this->unk_254 != 5) && (gSaveContext.save.day == 3) && + (gSaveContext.save.isNight != 0)) { + func_80BEAC84(this, play); + } } if (!(gSaveContext.save.saveInfo.weekEventReg[63] & 0x80) && - ((gSaveContext.save.day != 3) || ((gSaveContext.save.day == 3) && (gSaveContext.save.isNight == 0)))) { + (!GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) || (gSaveContext.save.day != 3) || + ((gSaveContext.save.day == 3) && (gSaveContext.save.isNight == 0)))) { Audio_PlaySequenceAtPos(3, &gSfxDefaultPos, 49, 1000.0f); Actor_PlaySfx(&this->actor, NA_SE_EV_CROWD - SFX_FLAG); } diff --git a/mm/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c b/mm/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c index 5fdb0a9ffb..0be88be6ed 100644 --- a/mm/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c +++ b/mm/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c @@ -142,11 +142,11 @@ u16 EnFsn_GetWelcome(PlayState* play) { return 0x29CC; case PLAYER_MASK_DEKU: - return 0x29FC; + return GameInteractor_Should(VB_CURIOSITY_SHOP_RACIST, true) ? 0x29FC : 0x29CC; case PLAYER_MASK_GORON: case PLAYER_MASK_ZORA: - return 0x29FD; + return GameInteractor_Should(VB_CURIOSITY_SHOP_RACIST, true) ? 0x29FD : 0x29CC; case PLAYER_MASK_KAFEIS_MASK: return 0x2364; @@ -836,7 +836,10 @@ void EnFsn_BeginInteraction(EnFsn* this, PlayState* play) { if (CutsceneManager_IsNext(this->csId)) { CutsceneManager_StartWithPlayerCsAndSetFlag(this->csId, &this->actor); this->cutsceneState = ENFSN_CUTSCENESTATE_PLAYING; - if (Player_GetMask(play) == PLAYER_MASK_NONE) { + if (Player_GetMask(play) == PLAYER_MASK_NONE || + (!GameInteractor_Should(VB_CURIOSITY_SHOP_RACIST, true) && + (Player_GetMask(play) == PLAYER_MASK_DEKU || Player_GetMask(play) == PLAYER_MASK_GORON || + Player_GetMask(play) == PLAYER_MASK_ZORA))) { Interface_SetAButtonDoAction(play, DO_ACTION_NEXT); if (EnFsn_HasItemsToSell()) { this->actionFunc = EnFsn_AskBuyOrSell; diff --git a/mm/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/mm/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index 89537787fc..422022dbf7 100644 --- a/mm/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/mm/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -5,6 +5,7 @@ */ #include "z_en_girla.h" +#include "2s2h/GameInteractor/GameInteractor.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10) @@ -50,6 +51,7 @@ void EnGirlA_BuySword(PlayState* play, EnGirlA* this); void EnGirlA_BuyShieldMirror(PlayState* play, EnGirlA* this); void EnGirlA_BuyFanfare(PlayState* play, EnGirlA* this); +void EnGirlA_BuyBankOverflowFanfare(PlayState* play, EnGirlA* this); ActorInit En_GirlA_InitVars = { /**/ ACTOR_EN_GIRLA, @@ -103,7 +105,7 @@ static ShopItemEntry sShopItemEntries[] = { { OBJECT_GI_LIQUID, GID_POTION_RED, func_800B8050, 1, 0x06C9, 0x06CA, GI_POTION_RED, EnGirlA_CanBuyPotionRed, EnGirlA_BuyBottleItem, EnGirlA_BuyFanfare }, { OBJECT_GI_MASK06, GID_MASK_ALL_NIGHT, func_800B8050, 1, 0x29D9, 0x29DA, GI_MASK_ALL_NIGHT, - EnGirlA_CanBuyMaskAllNight, EnGirlA_BuyMaskAllNight, EnGirlA_BuyFanfare }, + EnGirlA_CanBuyMaskAllNight, EnGirlA_BuyMaskAllNight, EnGirlA_BuyBankOverflowFanfare }, { OBJECT_GI_BOMBPOUCH, GID_BOMB_BAG_20, func_800B8050, 1, 0x29DB, 0x29DC, GI_BOMB_BAG_20, EnGirlA_CanBuyBombBagCuriosityShop, EnGirlA_BuyBombBag, EnGirlA_BuyFanfare }, { OBJECT_GI_BOMBPOUCH, GID_BOMB_BAG_30, func_800B8050, 2, 0x29DB, 0x29DC, GI_BOMB_BAG_30, @@ -270,7 +272,9 @@ s32 EnGirlA_CanBuyStick(PlayState* play, EnGirlA* this) { } s32 EnGirlA_CanBuyMaskAllNight(PlayState* play, EnGirlA* this) { - if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) { + if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C && + (GameInteractor_Should(VB_NOT_OVERFLOW_BANK, true) || + gSaveContext.save.saveInfo.playerData.rupees + HS_GET_BANK_RUPEES() < play->msgCtx.unk1206C)) { return CANBUY_RESULT_NEED_RUPEES; } return CANBUY_RESULT_SUCCESS_2; @@ -534,6 +538,18 @@ void EnGirlA_BuyFanfare(PlayState* play, EnGirlA* this) { Rupees_ChangeBy(-play->msgCtx.unk1206C); } +void EnGirlA_BuyBankOverflowFanfare(PlayState* play, EnGirlA* this) { + s16 playerRupees = gSaveContext.save.saveInfo.playerData.rupees; + s16 cost = play->msgCtx.unk1206C; + s16 bankRupees = HS_GET_BANK_RUPEES(); + if (playerRupees >= cost) { + Rupees_ChangeBy(-cost); + } else { + Rupees_ChangeBy(-playerRupees); + HS_SET_BANK_RUPEES(bankRupees - (cost - playerRupees)); + } +} + void EnGirlA_DoNothing(EnGirlA* this, PlayState* play) { } diff --git a/mm/src/overlays/actors/ovl_En_Muto/z_en_muto.c b/mm/src/overlays/actors/ovl_En_Muto/z_en_muto.c index 37b3b7f51d..d8b8275ac1 100644 --- a/mm/src/overlays/actors/ovl_En_Muto/z_en_muto.c +++ b/mm/src/overlays/actors/ovl_En_Muto/z_en_muto.c @@ -6,6 +6,7 @@ #include "z_en_muto.h" #include "objects/object_toryo/object_toryo.h" +#include "2s2h/GameInteractor/GameInteractor.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) @@ -74,7 +75,8 @@ void EnMuto_Init(Actor* thisx, PlayState* play) { this->textIdIndex = 3; } - if ((gSaveContext.save.day != 3) || !gSaveContext.save.isNight) { + if ((!GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80)) || + (gSaveContext.save.day != 3) || !gSaveContext.save.isNight) { Actor_Kill(&this->actor); } } else { @@ -82,7 +84,8 @@ void EnMuto_Init(Actor* thisx, PlayState* play) { this->collider.dim.height = 60; this->collider.dim.yShift = 0; - if (CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80) || ((gSaveContext.save.day == 3) && gSaveContext.save.isNight)) { + if (CHECK_WEEKEVENTREG(WEEKEVENTREG_63_80) || (GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) && + (gSaveContext.save.day == 3) && gSaveContext.save.isNight)) { Actor_Kill(&this->actor); } } @@ -254,7 +257,8 @@ void EnMuto_Update(Actor* thisx, PlayState* play2) { EnMuto_SetHeadRotation(this); } - if (this->isInMayorsRoom && (gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + if (GameInteractor_Should(VB_MAYOR_STOP_ARGUING, true) && this->isInMayorsRoom && (gSaveContext.save.day == 3) && + gSaveContext.save.isNight) { Actor_Kill(&this->actor); return; } diff --git a/mm/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/mm/src/overlays/actors/ovl_En_Nb/z_en_nb.c index 5bb39bb01b..73c069bc64 100644 --- a/mm/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/mm/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -6,6 +6,7 @@ #include "z_en_nb.h" #include "objects/object_nb/object_nb.h" +#include "2s2h/GameInteractor/GameInteractor.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20) @@ -505,11 +506,13 @@ s32 func_80BC01DC(Actor* thisx, PlayState* play) { this->behaviour++; // fallthrough case ENNB_BEHAVIOUR_5: - if (!CHECK_EVENTINF(EVENTINF_42)) { - gSaveContext.save.time = CLOCK_TIME(8, 0); - Sram_IncrementDay(); - } else { - Environment_SetTimeJump(120.0f); + if (Player_GetMask(play) != PLAYER_MASK_ALL_NIGHT || GameInteractor_Should(VB_ALL_NIGHT_TIME_SKIP, true)) { + if (!CHECK_EVENTINF(EVENTINF_42)) { + gSaveContext.save.time = CLOCK_TIME(8, 0); + Sram_IncrementDay(); + } else { + Environment_SetTimeJump(120.0f); + } } this->behaviour++; diff --git a/mm/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/mm/src/overlays/actors/ovl_En_Sth/z_en_sth.c index cdd594ddc2..e5579bf975 100644 --- a/mm/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/mm/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -8,6 +8,7 @@ */ #include "z_en_sth.h" +#include "2s2h/GameInteractor/GameInteractor.h" #define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY) @@ -335,7 +336,7 @@ void EnSth_GiveOceansideSpiderHouseReward(EnSth* this, PlayState* play) { void EnSth_HandleOceansideSpiderHouseConversation(EnSth* this, PlayState* play) { s32 day = CURRENT_DAY - 1; - if (day < 0) { + if (day < 0 || !GameInteractor_Should(VB_OCEAN_HOUSE_WALLET_FIRST_DAY_ONLY, true)) { day = 0; } diff --git a/mm/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/mm/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 2ecd7eec31..ece4e1e4ff 100644 --- a/mm/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/mm/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -1510,6 +1510,8 @@ void EnSuttari_Init(Actor* thisx, PlayState* play) { } Collider_InitCylinder(play, &this->collider); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); + sDamageTable.attack[0xF] = + GameInteractor_Should(VB_SUTTARI_IMMUNE_DEKU, true) ? DMG_ENTRY(1, 0x0) : DMG_ENTRY(1, 0xF); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit2); this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; EnSuttari_GetPaths(this, play); diff --git a/mm/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/mm/src/overlays/actors/ovl_En_Test3/z_en_test3.c index ba1c97ae22..f5dfd3aee4 100644 --- a/mm/src/overlays/actors/ovl_En_Test3/z_en_test3.c +++ b/mm/src/overlays/actors/ovl_En_Test3/z_en_test3.c @@ -9,6 +9,7 @@ #include "overlays/actors/ovl_En_Door/z_en_door.h" #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_mask_ki_tan/object_mask_ki_tan.h" +#include "2s2h/GameInteractor/GameInteractor.h" #define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_CAN_PRESS_SWITCH) @@ -784,7 +785,9 @@ s32 func_80A3FBE8(EnTest3* this, PlayState* play) { CutsceneManager_SetReturnCamera(CAM_ID_MAIN); Environment_StartTime(); if (((void)0, gSaveContext.save.time) > CLOCK_TIME(6, 0)) { - Environment_SetTimeJump(TIME_TO_MINUTES_ALT_F(fabsf((s16) - ((void)0, gSaveContext.save.time)))); + if (GameInteractor_Should(VB_TIMESKIP_AFTER_HIDEOUT, true)) { + Environment_SetTimeJump(TIME_TO_MINUTES_ALT_F(fabsf((s16) - ((void)0, gSaveContext.save.time)))); + } } if (play->actorCtx.flags & ACTORCTX_FLAG_6) { SET_WEEKEVENTREG(WEEKEVENTREG_ESCAPED_SAKONS_HIDEOUT);