Add enhancement for making nuts explode bombs, similar to bombchus (#1906)

This commit is contained in:
Garrett Cox 2022-11-05 08:37:32 -05:00 committed by GitHub
parent 6d10e6b9f8
commit 4396411d10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -819,6 +819,8 @@ namespace GameMenuBar {
UIWidgets::Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask");
UIWidgets::PaddedEnhancementCheckbox("Mask Select in Inventory", "gMaskSelect", true, false);
UIWidgets::Tooltip("After completing the mask trading sub-quest, press A and any direction on the mask slot to change masks");
UIWidgets::PaddedEnhancementCheckbox("Nuts explode bombs", "gNutsExplodeBombs", true, false);
UIWidgets::Tooltip("Makes nuts explode bombs, similar to how they interact with bombchus. This does not affect bombflowers.");
ImGui::EndMenu();
}

View File

@ -103,6 +103,9 @@ void EnBom_Init(Actor* thisx, GlobalContext* globalCtx) {
Collider_SetCylinder(globalCtx, &this->bombCollider, thisx, &sCylinderInit);
Collider_SetJntSph(globalCtx, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]);
this->explosionColliderItems[0].info.toucher.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
if (CVar_GetS32("gNutsExplodeBombs", 0)) {
this->bombCollider.info.bumper.dmgFlags |= 1;
}
thisx->shape.rot.z &= 0xFF;
if (thisx->shape.rot.z & 0x80) {