mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-19 13:03:33 -04:00
cave of ordeals fairy check
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum fairy_RES_File_ID {
|
||||
/* BCK */
|
||||
/* 0x09 */ BCK_FAIRY_F_SAD = 0x9,
|
||||
@@ -1269,11 +1273,7 @@ void daNpc_Fairy_c::AppearDemoCall() {
|
||||
} else {
|
||||
mEvtNo = EVT_APPEAR_50F_02;
|
||||
}
|
||||
#if TARGET_PC
|
||||
} else if (dComIfGs_checkEmptyBottle() || randomizer_IsActive()) {
|
||||
#else
|
||||
} else if (dComIfGs_checkEmptyBottle()) {
|
||||
#endif
|
||||
} else if (dComIfGs_checkEmptyBottle() IF_DUSK(|| randomizer_IsActive())) {
|
||||
mEvtNo = EVT_APPEAR_50F_01;
|
||||
} else {
|
||||
mEvtNo = EVT_APPEAR_50F_04;
|
||||
@@ -1337,6 +1337,13 @@ void daNpc_Fairy_c::PresentDemoCall() {
|
||||
item_no = 0;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
// If we haven't visted this great fairy before, give the random item
|
||||
if (randomizer_IsActive() && !daNpcT_chkEvtBit(505)) {
|
||||
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Cave of Ordeals Great Fairy Reward"));
|
||||
}
|
||||
#endif
|
||||
|
||||
fpc_ProcID id = fopAcM_createItemForPresentDemo(¤t.pos, item_no, 0, -1, -1, NULL, NULL);
|
||||
if (id != fpcM_ERROR_PROCESS_ID_e) {
|
||||
dComIfGp_event_setItemPartnerId(id);
|
||||
|
||||
@@ -559,6 +559,14 @@ BOOL dSv_player_item_c::checkInsectBottle() {
|
||||
u8 dSv_player_item_c::checkEmptyBottle() {
|
||||
u8 bottleNum = 0;
|
||||
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive() && getStageID() == Cave_of_Ordeals) {
|
||||
// Return 1 to allow the player to collect the item from the floor 50 reward,
|
||||
// as this will make the game think that the player has an empty bottle.
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < BOTTLE_MAX; i++) {
|
||||
if (mItems[i + SLOT_11] == dItemNo_EMPTY_BOTTLE_e) {
|
||||
bottleNum++;
|
||||
|
||||
Reference in New Issue
Block a user