mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-06 18:01:01 -04:00
fix getting fishing hole HP with fishing rod
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
@@ -2905,6 +2906,14 @@ static void lure_heart(dmg_rod_class* i_this) {
|
||||
if (obj_life != NULL) {
|
||||
fopAcM_delete(obj_life);
|
||||
fopAcM_onItem(obj_life, 0x80);
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
// Call the item get function for the ranodmized item instead
|
||||
u16 key = (getStageID() << 8) | 0x80;
|
||||
u8 itemId = verifyProgressiveItem(randomizer_GetContext().mFreestandingItemOverrides[key]);
|
||||
execItemGet(itemId);
|
||||
} else
|
||||
#endif
|
||||
execItemGet(dItemNo_KAKERA_HEART_e);
|
||||
u8 eventReg = dComIfGs_getEventReg(0xECFF);
|
||||
eventReg |= (u8)0x40;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "dusk/randomizer/game/flags.h"
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#include "dusk/randomizer/game/stages.h"
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
dMsgFlow_c::dMsgFlow_c() {
|
||||
@@ -519,6 +520,16 @@ int dMsgFlow_c::setNormalMsg(mesg_flow_node* i_flowNode_p, fopAc_ac_c* i_speaker
|
||||
msg_no = getItemMessageID(g_randomizerState.mFishingBottleItemId);
|
||||
g_randomizerState.mFishingBottleItemId = 0;
|
||||
}
|
||||
// If this is Hena's message about catching a piece of heart, replace it with our
|
||||
// randomized item. This happens before the execItemGet function, so we don't need
|
||||
// to store it like the fishing bottle check above.
|
||||
else if ((msg_no == 0x1D8C || msg_no == 0x1D9A) && dMsgObject_getGroupID() == 7) {
|
||||
u16 key = (getStageID() << 8) | 0x80;
|
||||
u8 itemId = verifyProgressiveItem(randomizer_GetContext().mFreestandingItemOverrides[key]);
|
||||
msg_no = getItemMessageID(itemId);
|
||||
// Ignore the rest of the flow after this
|
||||
var_r29->next_node_idx = -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user