Open Bombchu Bowling with chus

This commit is contained in:
lil David 2022-08-14 12:30:22 -05:00 committed by lilDavid
parent f431f7df72
commit 8cb50a2ee1
3 changed files with 21 additions and 12 deletions

View File

@ -2551,6 +2551,8 @@ namespace Settings {
MapsAndCompasses.SetSelectedIndex(cvarSettings[RSK_STARTING_MAPS_COMPASSES]);
BombchusInLogic.SetSelectedIndex(cvarSettings[RSK_BOMBCHUS_IN_LOGIC]);
StartingConsumables.SetSelectedIndex(cvarSettings[RSK_STARTING_CONSUMABLES]);
StartingMaxRupees.SetSelectedIndex(cvarSettings[RSK_FULL_WALLETS]);

View File

@ -1688,6 +1688,7 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
case RSK_STARTING_KOKIRI_SWORD:
case RSK_COMPLETE_MASK_QUEST:
case RSK_ENABLE_GLITCH_CUTSCENES:
case RSK_BOMBCHUS_IN_LOGIC:
if(it.value() == "Off") {
gSaveContext.randoSettings[index].value = 0;
} else if(it.value() == "On") {
@ -4169,9 +4170,9 @@ void DrawRandoEditor(bool& open) {
InsertHelpHoverText(
"Bombchus are properly considered in logic.\n"
"\n"
"The first Bombchu pack will always be 20, and subsequent packs will be"
"The first Bombchu pack will always be 20, and subsequent packs will be "
"5 or 10 based on how many you have.\n"
"Once found, they can be replenished at the Kokiri shop, Bazaar, or Bombchu"
"Once found, they can be replenished at the Kokiri shop, Bazaar, or Bombchu "
"shop.\n"
"\n"
"Bombchu Bowling is opened by obtaining Bombchus."

View File

@ -143,13 +143,14 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, GlobalContext* globalCtx) {
}
}
// Check for Bomb Bag if Rando is enabled
// RANDOTODO: Check for bombchu pack instead of bomb bag if bombchus are in logic
// Check for Bomb Bag or Bombchus if Rando is enabled, depending on whether bombchus are considered in logic
if (gSaveContext.n64ddFlag) {
if (INV_CONTENT(ITEM_BOMB) != ITEM_NONE) {
this->actor.textId = 0xBF;
} else {
u8 bombchusInLogic = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC);
if ((!bombchusInLogic && INV_CONTENT(ITEM_BOMB) == ITEM_NONE) ||
(bombchusInLogic && INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE)) {
this->actor.textId = 0x7058;
} else {
this->actor.textId = 0xBF;
}
}
}
@ -177,11 +178,16 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, GlobalContext* globalCtx) {
this->eyeMode = CHU_GIRL_EYES_AWAKE;
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
// Check for beaten Dodongo's Cavern if not rando'd
// check for bomb bag if rando'd
if ((!gSaveContext.n64ddFlag &&
!((gSaveContext.eventChkInf[2] & 0x20) || BREG(2))) ||
(gSaveContext.n64ddFlag && (INV_CONTENT(ITEM_BOMB) == ITEM_NONE))) {
// Check if beaten Dodongo's Cavern if not rando'd
// check for bomb bag or bombchus if rando'd depending on whether chus are in logic
bool bombchuBowlingClosed;
if (gSaveContext.n64ddFlag) {
u8 explosive = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) ? ITEM_BOMBCHU : ITEM_BOMB;
bombchuBowlingClosed = (INV_CONTENT(explosive) == ITEM_NONE);
} else {
bombchuBowlingClosed = !((gSaveContext.eventChkInf[2] & 0x20) || BREG(2));
}
if (bombchuBowlingClosed) {
this->actionFunc = EnBomBowMan_WaitNotBeatenDC;
} else {
this->actor.textId = 0x18;