Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip ballad of windfish #180

Merged
merged 5 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mm/2s2h/BenGui/BenMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,10 @@ void BenMenu::AddEnhancements() {
AddWidget(path, "Skip Gorman Horse Race", WIDGET_CVAR_CHECKBOX)
.CVar("gEnhancements.Minigames.SkipHorseRace")
.Options(CheckboxOptions().Tooltip("Instantly win the Gorman Horse Race"));
AddWidget(path, "Skip Ballad of Windfish", WIDGET_CVAR_CHECKBOX)
.CVar("gEnhancements.Minigames.SkipBalladOfWindfish")
.Options(CheckboxOptions().Tooltip(
"Play the complete Ballad after playing in one form if you have all three transformation masks."));

path.column = 3;
AddWidget(path, "Saving", WIDGET_SEPARATOR_TEXT);
Expand Down
28 changes: 28 additions & 0 deletions mm/2s2h/Enhancements/Minigames/SkipBalladOfWindfish.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <libultraship/bridge.h>
#include "2s2h/GameInteractor/GameInteractor.h"
#include "2s2h/Enhancements/Enhancements.h"
#include "2s2h/ShipInit.hpp"

extern "C" {
#include "functions.h"
}

#define CVAR_NAME "gEnhancements.Minigames.SkipBalladOfWindfish"
#define CVAR CVarGetInteger(CVAR_NAME, 0)

void RegisterSkipBalladOfWindfish() {

COND_VB_SHOULD(VB_BALLAD_PLAYED_FORM, CVAR, {
if (INV_CONTENT(ITEM_MASK_DEKU) != ITEM_MASK_DEKU || INV_CONTENT(ITEM_MASK_GORON) != ITEM_MASK_GORON ||
INV_CONTENT(ITEM_MASK_ZORA) != ITEM_MASK_ZORA) {
return;
}

SET_WEEKEVENTREG(WEEKEVENTREG_56_10); // Played Ballad as Human
SET_WEEKEVENTREG(WEEKEVENTREG_56_20); // Played Ballad as Deku
SET_WEEKEVENTREG(WEEKEVENTREG_56_40); // Played Ballad as Zora
SET_WEEKEVENTREG(WEEKEVENTREG_56_80); // Played Ballad as Goron
});
}

static RegisterShipInitFunc initFunc(RegisterSkipBalladOfWindfish, { CVAR_NAME });
1 change: 1 addition & 0 deletions mm/2s2h/GameInteractor/GameInteractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ typedef enum {
VB_GORON_ROLL_INCREASE_SPIKE_LEVEL,
VB_GORON_ROLL_DISABLE_SPIKE_MODE,
VB_DEKU_LINK_SPIN_ON_LAST_HOP,
VB_BALLAD_PLAYED_FORM,
VB_CONTINUE_BANKER_DIALOGUE,
VB_FISH2_SPAWN_HEART_PIECE,
VB_PLAY_DEFEAT_CAPTAIN_SEQUENCE,
Expand Down
2 changes: 2 additions & 0 deletions mm/src/overlays/actors/ovl_En_Toto/z_en_toto.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "z_en_toto.h"
#include "objects/object_zm/object_zm.h"
#include "2s2h/GameInteractor/GameInteractor.h"

#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)

Expand Down Expand Up @@ -523,6 +524,7 @@ s32 func_80BA46D8(EnToto* this, PlayState* play) {

s32 func_80BA4740(EnToto* this, PlayState* play) {
if (play->msgCtx.ocarinaMode == OCARINA_MODE_END) {
GameInteractor_Should(VB_BALLAD_PLAYED_FORM, true);
if (GET_PLAYER_FORM == PLAYER_FORM_HUMAN) {
SET_WEEKEVENTREG(WEEKEVENTREG_56_10);
}
Expand Down
Loading