Skip to content

Commit 3cc059f

Browse files
committed
Merge 'Fix Starting Health in SaveContext' (#2515)
2 parents 3d99a96 + 443a1ee commit 3cc059f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
## Bug fixes
88
* Fix a potential softlock when talking to Pierre (the upper scarecrow) as child in Lake Hylia.
99
* Fix a generator failure when a dungeon reward is selected as a random starting item.
10+
* Fix a bug where the starting health capacity in game might be miscalculated when starting with a heart piece.
1011

1112
# 9.0
1213

SaveContext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def give_health(self, health: float):
288288

289289
self.addresses['health_capacity'].value = int(health) * 0x10
290290
self.addresses['health'].value = int(health) * 0x10
291-
self.addresses['quest']['heart_pieces'].value = int((health % 1) * 4) * 0x10
291+
self.addresses['quest']['heart_pieces'].value = int((health % 1) * 4)
292292

293293
def give_item(self, world: World, item: str, count: int = 1) -> None:
294294
if item.endswith(')'):
@@ -689,7 +689,7 @@ def get_save_context_addresses() -> AddressesDict:
689689
'stone_of_agony' : Address(0x00A4, mask=0x00200000),
690690
'gerudos_card' : Address(0x00A4, mask=0x00400000),
691691
'gold_skulltula' : Address(0x00A4, mask=0x00800000),
692-
'heart_pieces' : Address(0x00A4, mask=0xFF000000),
692+
'heart_pieces' : Address(0x00A4, mask=0xF0000000),
693693
},
694694

695695
# Dungeon Items

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '9.0.7'
1+
__version__ = '9.0.8'
22

33
# This is a supplemental version number for branches based off of main dev.
44
supplementary_version = 0

0 commit comments

Comments
 (0)