Limit difficulty: torches stop at -3 & shadow temple torch puzzle stops at -4

This commit is contained in:
Demur Rumed 2025-06-11 21:00:44 +00:00
commit e2671e7f2b
11 changed files with 19 additions and 11 deletions

View file

@ -9,6 +9,13 @@ void RegisterSwitchTimerMultiplier() {
COND_VB_SHOULD(VB_SWITCH_TIMER_TICK, CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0) != 0, {
int multiplier = CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0);
if (multiplier != 0) {
Actor* actor = va_arg(args, Actor*);
if (multiplier < -3 && actor->id == ACTOR_OBJ_SYOKUDAI) {
multiplier = -3;
} else if (multiplier < -4 && actor->id == ACTOR_BG_GND_DARKMEIRO) {
multiplier = -4;
}
if (multiplier > 0 && gPlayState->gameplayFrames % (multiplier + 1) != 0) {
*should = false;
} else if (gPlayState->gameplayFrames % (6 + multiplier) == 0) {

View file

@ -1997,7 +1997,8 @@ typedef enum {
// true
// ```
// #### `args`
// - `*s16`
// - `*Actor`
// - `*s16` - timer value
VB_SWITCH_TIMER_TICK,
// #### `result`

View file

@ -116,7 +116,7 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
if (Flags_GetSwitch(play, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
if (this->actionFlags & 4) {
if (this->timer1 > 0) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer1)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer1)) {
this->timer1--;
}
} else {

View file

@ -192,7 +192,7 @@ void BgHidanCurtain_TurnOff(BgHidanCurtain* this, PlayState* play) {
}
void BgHidanCurtain_WaitForTimer(BgHidanCurtain* this, PlayState* play) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
DECR(this->timer);
}

View file

@ -166,7 +166,7 @@ void BgHidanFwbig_Lower(BgHidanFwbig* this, PlayState* play) {
}
void BgHidanFwbig_WaitForTimer(BgHidanFwbig* this, PlayState* play) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
if (this->timer != 0) {
this->timer--;
}

View file

@ -92,7 +92,7 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
if (!Flags_GetSwitch(play, this->actor.params)) {
if (this->framesUntilDisable != -1) {
if (this->framesUntilDisable != 0) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->framesUntilDisable)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->framesUntilDisable)) {
this->framesUntilDisable -= 1;
}
}

View file

@ -138,7 +138,7 @@ void BgMizuShutter_Move(BgMizuShutter* this, PlayState* play) {
void BgMizuShutter_WaitForTimer(BgMizuShutter* this, PlayState* play) {
if (this->timerMax != 0x3F * 20) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
this->timer--;
}
func_8002F994(&this->dyna.actor, this->timer);

View file

@ -134,7 +134,7 @@ void func_808A90F4(BgRelayObjects* this, PlayState* play) {
void func_808A91AC(BgRelayObjects* this, PlayState* play) {
if (this->unk_169 != 5) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
if (this->timer != 0) {
this->timer--;
}

View file

@ -127,7 +127,7 @@ void BgYdanHasi_MoveWater(BgYdanHasi* this, PlayState* play) {
}
void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, PlayState* play) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
if (this->timer != 0) {
this->timer--;
}
@ -149,7 +149,7 @@ void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, PlayState* play) {
}
void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, PlayState* play) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
if (this->timer != 0) {
this->timer--;
}

View file

@ -189,7 +189,7 @@ void func_80AFC218(EnSiofuki* this, PlayState* play) {
func_80AFBE8C(this, play);
func_80AFC1D0(this, play);
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->timer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->timer)) {
this->timer--;
}

View file

@ -241,7 +241,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderFlame.base);
if (this->litTimer > 0) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, &this->litTimer)) {
if (GameInteractor_Should(VB_SWITCH_TIMER_TICK, true, this, &this->litTimer)) {
this->litTimer--;
}
if ((this->litTimer == 0) && (torchType != 0)) {