mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-23 00:28:51 -05:00
Tweak: Shopsanity Heart Pieces and Containers now refill Link's health (#2724)
Heart Pieces and Heart Containers normally refill Links health when the text box with their respective textID is closed. However, with shops and shopsanity, after receiving the heart piece, the textbox isn't actually closed. The shop keeper keeps it open to prompt the player if they want to continue shopping. This prevents the health refill logic from running. This PR adds a check for these items in the BuyEvent for randomizer items and manually refills Links health.
This commit is contained in:
parent
7d20509b5b
commit
1b63f4ca1a
@ -1071,6 +1071,14 @@ void EnGirlA_BuyEvent_Randomizer(PlayState* play, EnGirlA* this) {
|
||||
gSaveContext.pendingSaleMod = getItemEntry.modIndex;
|
||||
Flags_SetRandomizerInf(shopItemIdentity.randomizerInf);
|
||||
Rupees_ChangeBy(-this->basePrice);
|
||||
|
||||
// Heart Pieces and Heart Containers refill Links health when the text box is closed on their text IDs.
|
||||
// In Shopsanity the textbox does not close, as the shop keeper continues the text bos asking to buy more.
|
||||
// So here we detect when a Heart Piece/Container is granted to refil Links health manually
|
||||
if (getItemEntry.itemId == ITEM_HEART_PIECE || getItemEntry.itemId == ITEM_HEART_PIECE_2 ||
|
||||
getItemEntry.itemId == ITEM_HEART_CONTAINER) {
|
||||
gSaveContext.healthAccumulator = 0x140; // Refill 20 hearts
|
||||
}
|
||||
}
|
||||
|
||||
void EnGirlA_Noop(EnGirlA* this, PlayState* play) {
|
||||
|
Loading…
Reference in New Issue
Block a user