Skip to content

Add 'Allow Nana' option to Powershield Training#338

Open
slefforge wants to merge 1 commit into
AlexanderHarrison:masterfrom
slefforge:powershield-allow-nana
Open

Add 'Allow Nana' option to Powershield Training#338
slefforge wants to merge 1 commit into
AlexanderHarrison:masterfrom
slefforge:powershield-allow-nana

Conversation

@slefforge

Copy link
Copy Markdown

added an option to toggle between both climbers / sopo for the powershield event. I added a menu option in the event that only appears when you're playing as ice climbers. when you toggle it, it effectively resets the event but with the correct sopo bool.

most of this code is the logic for ensuring that the other event settings persist when this is toggled.

@AlexanderHarrison

Copy link
Copy Markdown
Owner

I suggest that we instead find a way to despawn/respawn nana during the event, when the option is flipped, rather than hack this in. My initial idea is to always start the event with nana, change the setting name to "Popo Only" or something, force a KO when the option is flipped, then immediately despawn nana if the option is on.

@slefforge slefforge force-pushed the powershield-allow-nana branch 2 times, most recently from f79b89f to fb26c5c Compare June 3, 2026 05:45
@slefforge

Copy link
Copy Markdown
Author

Good suggestion. This approach is simpler.

Comment thread src/powershield.c Outdated
void ChangeRandomFireDelayMax(GOBJ *event_menu, int value);
int GetRandomLaserDelay(void);
void ChangeAllowNana(GOBJ *event_menu, int value);
void SaveOption(GOBJ *event_menu, int value);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment thread src/powershield.c Outdated
.OnChange = SaveOption,
},
{
.kind = OPTKIND_STRING,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to OPTKIND_TOGGLE

Comment thread src/powershield.c Outdated
.name = "Laser Height",
.desc = {"Change the laser height."},
.values = Options_LaserHeight,
.OnChange = SaveOption,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove SaveOption callbacks and the unused function below

Comment thread src/powershield.c Outdated

static void PutOnGround(GOBJ *ft);

void Event_Init(GOBJ *event_gobj) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment thread src/powershield.c Outdated
Comment on lines +158 to +172
if (player_data->kind == FTKIND_POPO) {
if (Options_Main[6].kind != OPTKIND_STRING) {
EventOption temp = Options_Main[6];
Options_Main[6] = Options_Main[7];
Options_Main[7] = temp;
}
Menu_Main.option_num = 8;
} else {
if (Options_Main[6].kind != OPTKIND_FUNC) {
EventOption temp = Options_Main[6];
Options_Main[6] = Options_Main[7];
Options_Main[7] = temp;
}
Menu_Main.option_num = 7;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just disable the option if the player isn't ice climbers for now. I'll add a built-in way to hide options before the next stable release. No need to overcomplicate it for now.

Comment thread src/powershield.c Outdated
Comment on lines +174 to +176
bool disable_random_bounds = Options_Main[OPT_FIRE_SPEED].val != FIRE_SPEED_RANDOM;
Options_Main[OPT_FIRE_DELAY_RANDOM_MIN].disable = disable_random_bounds;
Options_Main[OPT_FIRE_DELAY_RANDOM_MAX].disable = disable_random_bounds;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment thread src/powershield.c Outdated
}

void SaveOption(GOBJ *event_menu, int value) {
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@slefforge slefforge force-pushed the powershield-allow-nana branch from fb26c5c to d223bac Compare June 18, 2026 00:34
@slefforge

Copy link
Copy Markdown
Author

let me know if that looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants