Skip to content

Instantly share code, notes, and snippets.

@leoetlino
Created January 12, 2020 11:05
Show Gist options
  • Save leoetlino/e34b93d865e15054403527a80a78d0b8 to your computer and use it in GitHub Desktop.
Save leoetlino/e34b93d865e15054403527a80a78d0b8 to your computer and use it in GitHub Desktop.
// 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