Fix Heart Containers/Pieces Item Pool Calculation (#6226)

This calc ends up with 8 heart containers in the pool with the default 3 starting hearts, just like the 8 heart containers in the vanilla game. Changing starting hearts results in half of the remaining hearts being filled by heart containers and half of the remaining hearts being filled by heart pieces.
This commit is contained in:
Christopher Leggett
2026-02-06 02:18:06 +00:00
committed by GitHub
parent 2656c20f71
commit 65c7c3e4a9

View File

@@ -871,7 +871,7 @@ void GenerateItemPool() {
break;
case RO_ITEM_POOL_BALANCED: {
int heartsToPlace = maxHearts - startingHearts;
int halfHearts = maxHearts >> 2;
int halfHearts = heartsToPlace / 2;
AddFixedItemToPool(RG_HEART_CONTAINER, heartsToPlace - halfHearts, false);
AddFixedItemToPool(RG_PIECE_OF_HEART, halfHearts * 4, false);
break;