mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
Limit difficulty: torches stop at -3 & shadow temple torch puzzle stops at -4
This commit is contained in:
parent
883bc173ed
commit
e2671e7f2b
11 changed files with 19 additions and 11 deletions
|
@ -9,6 +9,13 @@ void RegisterSwitchTimerMultiplier() {
|
||||||
COND_VB_SHOULD(VB_SWITCH_TIMER_TICK, CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0) != 0, {
|
COND_VB_SHOULD(VB_SWITCH_TIMER_TICK, CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0) != 0, {
|
||||||
int multiplier = CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0);
|
int multiplier = CVarGetInteger(CVAR_ENHANCEMENT("SwitchTimerMultiplier"), 0);
|
||||||
if (multiplier != 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) {
|
if (multiplier > 0 && gPlayState->gameplayFrames % (multiplier + 1) != 0) {
|
||||||
*should = false;
|
*should = false;
|
||||||
} else if (gPlayState->gameplayFrames % (6 + multiplier) == 0) {
|
} else if (gPlayState->gameplayFrames % (6 + multiplier) == 0) {
|
||||||
|
|
|
@ -1997,7 +1997,8 @@ typedef enum {
|
||||||
// true
|
// true
|
||||||
// ```
|
// ```
|
||||||
// #### `args`
|
// #### `args`
|
||||||
// - `*s16`
|
// - `*Actor`
|
||||||
|
// - `*s16` - timer value
|
||||||
VB_SWITCH_TIMER_TICK,
|
VB_SWITCH_TIMER_TICK,
|
||||||
|
|
||||||
// #### `result`
|
// #### `result`
|
||||||
|
|
|
@ -116,7 +116,7 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
|
||||||
if (Flags_GetSwitch(play, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
|
if (Flags_GetSwitch(play, ((this->dyna.actor.params >> 8) & 0x3F) + 1)) {
|
||||||
if (this->actionFlags & 4) {
|
if (this->actionFlags & 4) {
|
||||||
if (this->timer1 > 0) {
|
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--;
|
this->timer1--;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -192,7 +192,7 @@ void BgHidanCurtain_TurnOff(BgHidanCurtain* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgHidanCurtain_WaitForTimer(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);
|
DECR(this->timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ void BgHidanFwbig_Lower(BgHidanFwbig* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgHidanFwbig_WaitForTimer(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) {
|
if (this->timer != 0) {
|
||||||
this->timer--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
|
||||||
if (!Flags_GetSwitch(play, this->actor.params)) {
|
if (!Flags_GetSwitch(play, this->actor.params)) {
|
||||||
if (this->framesUntilDisable != -1) {
|
if (this->framesUntilDisable != -1) {
|
||||||
if (this->framesUntilDisable != 0) {
|
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;
|
this->framesUntilDisable -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ void BgMizuShutter_Move(BgMizuShutter* this, PlayState* play) {
|
||||||
|
|
||||||
void BgMizuShutter_WaitForTimer(BgMizuShutter* this, PlayState* play) {
|
void BgMizuShutter_WaitForTimer(BgMizuShutter* this, PlayState* play) {
|
||||||
if (this->timerMax != 0x3F * 20) {
|
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--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
func_8002F994(&this->dyna.actor, this->timer);
|
func_8002F994(&this->dyna.actor, this->timer);
|
||||||
|
|
|
@ -134,7 +134,7 @@ void func_808A90F4(BgRelayObjects* this, PlayState* play) {
|
||||||
|
|
||||||
void func_808A91AC(BgRelayObjects* this, PlayState* play) {
|
void func_808A91AC(BgRelayObjects* this, PlayState* play) {
|
||||||
if (this->unk_169 != 5) {
|
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) {
|
if (this->timer != 0) {
|
||||||
this->timer--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ void BgYdanHasi_MoveWater(BgYdanHasi* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgYdanHasi_DecWaterTimer(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) {
|
if (this->timer != 0) {
|
||||||
this->timer--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BgYdanHasi_UpdateThreeBlocks(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) {
|
if (this->timer != 0) {
|
||||||
this->timer--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ void func_80AFC218(EnSiofuki* this, PlayState* play) {
|
||||||
func_80AFBE8C(this, play);
|
func_80AFBE8C(this, play);
|
||||||
func_80AFC1D0(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--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderFlame.base);
|
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderFlame.base);
|
||||||
|
|
||||||
if (this->litTimer > 0) {
|
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--;
|
this->litTimer--;
|
||||||
}
|
}
|
||||||
if ((this->litTimer == 0) && (torchType != 0)) {
|
if ((this->litTimer == 0) && (torchType != 0)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue