summaryrefslogtreecommitdiff
path: root/soh/src/code/z_parameter.c
diff options
context:
space:
mode:
authorCaladius <Caladius@users.noreply.github.com>2024-02-01 20:57:12 -0500
committerGitHub <noreply@github.com>2024-02-01 19:57:12 -0600
commit695ab6c6ee2d7df46096679ab440f8cc0817f045 (patch)
tree9d5215387f8c7a4a3dc02c8f3f7472a8ecb062ed /soh/src/code/z_parameter.c
parentbe948339b965d76337bbec66563e7aabbcf489c1 (diff)
Hurt Container Mode (#3336)
* Each Heart Container or full Heart Piece reduces Links hearts by 1 * Based on Briaguya's suggested Code but modified slightly as some parts were missing. * Static Bool * The episode without Captain Hook's Hook --------- Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Diffstat (limited to 'soh/src/code/z_parameter.c')
-rw-r--r--soh/src/code/z_parameter.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index f9a54eb2c..6efa962b6 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -2278,8 +2278,13 @@ u8 Item_Give(PlayState* play, u8 item) {
gSaveContext.sohStats.heartPieces++;
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_HEART_CONTAINER) {
- gSaveContext.healthCapacity += 0x10;
- gSaveContext.health += 0x10;
+ if (!CVarGetInteger("gHurtContainer", 0)) {
+ gSaveContext.healthCapacity += 0x10;
+ gSaveContext.health += 0x10;
+ } else {
+ gSaveContext.healthCapacity -= 0x10;
+ gSaveContext.health -= 0x10;
+ }
gSaveContext.sohStats.heartContainers++;
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_HEART) {