mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
[Rando] Prevent alarm when at full HP (#4831)
* * Prevent low HP alarm when at full HP for 1 heart start * * updated name
This commit is contained in:
parent
a46cfff438
commit
651623a845
3 changed files with 10 additions and 1 deletions
|
@ -302,6 +302,8 @@ typedef enum {
|
||||||
// Opt: *EnFr
|
// Opt: *EnFr
|
||||||
// Vanilla condition: this->reward == GI_NONE
|
// Vanilla condition: this->reward == GI_NONE
|
||||||
VB_FROGS_GO_TO_IDLE,
|
VB_FROGS_GO_TO_IDLE,
|
||||||
|
// Vanilla condition: var >= gSaveContext.health) && (gSaveContext.health > 0
|
||||||
|
VB_HEALTH_METER_BE_CRITICAL,
|
||||||
|
|
||||||
/*** Play Cutscenes ***/
|
/*** Play Cutscenes ***/
|
||||||
|
|
||||||
|
|
|
@ -1631,6 +1631,12 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VB_HEALTH_METER_BE_CRITICAL: {
|
||||||
|
if (gSaveContext.health == gSaveContext.healthCapacity) {
|
||||||
|
*should = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case VB_FREEZE_ON_SKULL_TOKEN:
|
case VB_FREEZE_ON_SKULL_TOKEN:
|
||||||
case VB_TRADE_TIMER_ODD_MUSHROOM:
|
case VB_TRADE_TIMER_ODD_MUSHROOM:
|
||||||
case VB_TRADE_TIMER_FROG:
|
case VB_TRADE_TIMER_FROG:
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "textures/parameter_static/parameter_static.h"
|
#include "textures/parameter_static/parameter_static.h"
|
||||||
#include "soh/frame_interpolation.h"
|
#include "soh/frame_interpolation.h"
|
||||||
#include "soh/OTRGlobals.h"
|
#include "soh/OTRGlobals.h"
|
||||||
|
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||||
|
|
||||||
s16 Top_LM_Margin = 0;
|
s16 Top_LM_Margin = 0;
|
||||||
s16 Left_LM_Margin = 0;
|
s16 Left_LM_Margin = 0;
|
||||||
|
@ -674,7 +675,7 @@ u32 HealthMeter_IsCritical(void) {
|
||||||
var = 0x2C;
|
var = 0x2C;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((var >= gSaveContext.health) && (gSaveContext.health > 0)) {
|
if (GameInteractor_Should(VB_HEALTH_METER_BE_CRITICAL, var >= gSaveContext.health && gSaveContext.health > 0)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue