Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// v1.0.0
void LastBoss::xxxxx::xxxxx(...) {
// ...
if (stuff) {
if (isStunFlagSet() || status == 0x15) {
resetStunFlag(); // this then allows the player to stun Ganon again
status = 0x15;
}
}
else if (shouldStun && lastBoss->isPlayerUnderGanon()) {
setStunFlag();
status = 0x16; // 0x16 = stunned?
}
// ...
}
// v1.5.0
void LastBoss::xxxxx::xxxxx(...) {
// ...
const bool preventStun =
aoc2::sInstance &&
aoc2::sInstance->isHardModeEnabled() &&
aoc2::sInstance->aocFlags & aoc2::Flag::PatchGanonStunLock &&
this->actor->lastBossFlags & LastBoss::Flag::IsSecondHalf;
if (stuff) {
if ((isStunFlagSet() || status == 0x15) && !preventStun) {
resetStunFlag(); // this then allows the player to stun Ganon again
status = 0x15;
}
}
else if (shouldStun && !preventStun && lastBoss->isPlayerUnderGanon()) {
setStunFlag();
status = 0x16; // 0x16 = stunned?
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment