Rando: Remove ice trap effect from vanilla ice trap chests (#5711)

This commit is contained in:
Pepe20129
2025-08-06 05:43:41 +02:00
committed by GitHub
parent 429021d434
commit 6d4c6f8ea6
3 changed files with 14 additions and 2 deletions

View File

@@ -2222,6 +2222,15 @@ typedef enum {
// - `s32` limbCount
// - `*Vec3s` frameTable
VB_LOAD_PLAYER_ANIMATION_FRAME,
// #### `result`
// ```c
// (this->dyna.actor.params >> 5 & 0x7F) == GI_ICE_TRAP && this->actionFunc == EnBox_Open &&
// this->skelanime.curFrame > 45 && this->iceSmokeTimer < 100
// ```
// #### `args`
// - `*EnBox`
VB_CHEST_USE_ICE_EFFECT,
} GIVanillaBehavior;
#endif

View File

@@ -1713,6 +1713,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
case VB_GIVE_ITEM_WATER_MEDALLION:
case VB_GIVE_ITEM_SPIRIT_MEDALLION:
case VB_GIVE_ITEM_SHADOW_MEDALLION:
case VB_CHEST_USE_ICE_EFFECT:
*should = false;
break;
case VB_GIVE_ITEM_SKULL_TOKEN:

View File

@@ -567,8 +567,10 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
Actor_SetFocus(&this->dyna.actor, 40.0f);
}
if ((this->dyna.actor.params >> 5 & 0x7F) == GI_ICE_TRAP && this->actionFunc == EnBox_Open &&
this->skelanime.curFrame > 45 && this->iceSmokeTimer < 100) {
if (GameInteractor_Should(VB_CHEST_USE_ICE_EFFECT,
(this->dyna.actor.params >> 5 & 0x7F) == GI_ICE_TRAP && this->actionFunc == EnBox_Open &&
this->skelanime.curFrame > 45 && this->iceSmokeTimer < 100,
this)) {
EnBox_SpawnIceSmoke(this, play);
}
}