mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 16:18:50 -05:00
Use randomizerInf for fishing and big poes (#3088)
This commit is contained in:
parent
356e305bd3
commit
18e21e12c8
@ -319,7 +319,7 @@ typedef struct {
|
|||||||
/* */ char inputSeed[1024];
|
/* */ char inputSeed[1024];
|
||||||
/* */ u32 finalSeed;
|
/* */ u32 finalSeed;
|
||||||
/* */ u8 seedIcons[5];
|
/* */ u8 seedIcons[5];
|
||||||
/* */ u16 randomizerInf[9];
|
/* */ u16 randomizerInf[10];
|
||||||
/* */ u16 adultTradeItems;
|
/* */ u16 adultTradeItems;
|
||||||
// #endregion
|
// #endregion
|
||||||
} SaveContext; // size = 0x1428
|
} SaveContext; // size = 0x1428
|
||||||
|
@ -348,7 +348,7 @@ const std::vector<FlagTable> flagTables = {
|
|||||||
{ 0x24, "Market Crowd Text Randomizer" },
|
{ 0x24, "Market Crowd Text Randomizer" },
|
||||||
{ 0x30, "Entered the Market" },
|
{ 0x30, "Entered the Market" },
|
||||||
} },
|
} },
|
||||||
{ "Randomizer Inf Flags", RANDOMIZER_INF, 0x08, {
|
{ "Randomizer Inf Flags", RANDOMIZER_INF, 0x09, {
|
||||||
{ RAND_INF_DUNGEONS_DONE_DEKU_TREE, "DUNGEONS_DONE_DEKU_TREE" },
|
{ RAND_INF_DUNGEONS_DONE_DEKU_TREE, "DUNGEONS_DONE_DEKU_TREE" },
|
||||||
{ RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN, "DUNGEONS_DONE_DODONGOS_CAVERN" },
|
{ RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN, "DUNGEONS_DONE_DODONGOS_CAVERN" },
|
||||||
{ RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY, "DUNGEONS_DONE_JABU_JABUS_BELLY" },
|
{ RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY, "DUNGEONS_DONE_JABU_JABUS_BELLY" },
|
||||||
@ -500,6 +500,9 @@ const std::vector<FlagTable> flagTables = {
|
|||||||
|
|
||||||
{ RAND_INF_KAK_100_GOLD_SKULLTULA_REWARD, "KAK_100_GOLD_SKULLTULA_REWARD" },
|
{ RAND_INF_KAK_100_GOLD_SKULLTULA_REWARD, "KAK_100_GOLD_SKULLTULA_REWARD" },
|
||||||
{ RAND_INF_GREG_FOUND, "RAND_INF_GREG_FOUND" },
|
{ RAND_INF_GREG_FOUND, "RAND_INF_GREG_FOUND" },
|
||||||
|
{ RAND_INF_CHILD_FISHING, "RAND_INF_CHILD_FISHING" },
|
||||||
|
{ RAND_INF_ADULT_FISHING, "RAND_INF_ADULT_FISHING" },
|
||||||
|
{ RAND_INF_10_BIG_POES, "RAND_INF_10_BIG_POES" },
|
||||||
} },
|
} },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,8 +51,8 @@ void LocationTable_Init() {
|
|||||||
locationTable[HF_DEKU_SCRUB_GROTTO] = ItemLocation::GrottoScrub(RC_HF_DEKU_SCRUB_GROTTO, 0xE6, "HF Deku Scrub Grotto", HF_DEKU_SCRUB_GROTTO, PIECE_OF_HEART, {Category::cDekuScrub, Category::cDekuScrubUpgrades}, SpoilerCollectionCheck::Scrub(), SpoilerCollectionCheckGroup::GROUP_HYRULE_FIELD);
|
locationTable[HF_DEKU_SCRUB_GROTTO] = ItemLocation::GrottoScrub(RC_HF_DEKU_SCRUB_GROTTO, 0xE6, "HF Deku Scrub Grotto", HF_DEKU_SCRUB_GROTTO, PIECE_OF_HEART, {Category::cDekuScrub, Category::cDekuScrubUpgrades}, SpoilerCollectionCheck::Scrub(), SpoilerCollectionCheckGroup::GROUP_HYRULE_FIELD);
|
||||||
|
|
||||||
//Lake Hylia
|
//Lake Hylia
|
||||||
locationTable[LH_CHILD_FISHING] = ItemLocation::Base (RC_LH_CHILD_FISHING, 0x49, "LH Child Fishing", LH_CHILD_FISHING, PIECE_OF_HEART, {}, SpoilerCollectionCheck::Fishing(), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
locationTable[LH_CHILD_FISHING] = ItemLocation::Base (RC_LH_CHILD_FISHING, 0x49, "LH Child Fishing", LH_CHILD_FISHING, PIECE_OF_HEART, {}, SpoilerCollectionCheck::RandomizerInf(), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
||||||
locationTable[LH_ADULT_FISHING] = ItemLocation::Base (RC_LH_ADULT_FISHING, 0x49, "LH Adult Fishing", LH_ADULT_FISHING, PROGRESSIVE_SCALE, {}, SpoilerCollectionCheck::Fishing(), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
locationTable[LH_ADULT_FISHING] = ItemLocation::Base (RC_LH_ADULT_FISHING, 0x49, "LH Adult Fishing", LH_ADULT_FISHING, PROGRESSIVE_SCALE, {}, SpoilerCollectionCheck::RandomizerInf(), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
||||||
locationTable[LH_LAB_DIVE] = ItemLocation::Base (RC_LH_LAB_DIVE, 0x38, "LH Lab Dive", LH_LAB_DIVE, PIECE_OF_HEART, {}, SpoilerCollectionCheck::ItemGetInf(24), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
locationTable[LH_LAB_DIVE] = ItemLocation::Base (RC_LH_LAB_DIVE, 0x38, "LH Lab Dive", LH_LAB_DIVE, PIECE_OF_HEART, {}, SpoilerCollectionCheck::ItemGetInf(24), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
||||||
locationTable[LH_TRADE_FROG] = ItemLocation::Base (RC_LH_TRADE_FROG, 0x38, "LH Lab Trade Eyeball Frog", LH_TRADE_FROG, EYEDROPS, {Category::cAdultTrade}, SpoilerCollectionCheck::RandomizerInf(), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
locationTable[LH_TRADE_FROG] = ItemLocation::Base (RC_LH_TRADE_FROG, 0x38, "LH Lab Trade Eyeball Frog", LH_TRADE_FROG, EYEDROPS, {Category::cAdultTrade}, SpoilerCollectionCheck::RandomizerInf(), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
||||||
locationTable[LH_UNDERWATER_ITEM] = ItemLocation::Base (RC_LH_UNDERWATER_ITEM, 0x57, "LH Underwater Item", LH_UNDERWATER_ITEM, RUTOS_LETTER, {}, SpoilerCollectionCheck::EventChkInf(0x31), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
locationTable[LH_UNDERWATER_ITEM] = ItemLocation::Base (RC_LH_UNDERWATER_ITEM, 0x57, "LH Underwater Item", LH_UNDERWATER_ITEM, RUTOS_LETTER, {}, SpoilerCollectionCheck::EventChkInf(0x31), SpoilerCollectionCheckGroup::GROUP_LAKE_HYLIA);
|
||||||
@ -96,7 +96,7 @@ void LocationTable_Init() {
|
|||||||
locationTable[MARKET_BOMBCHU_BOWLING_BOMBCHUS] = ItemLocation::Base (RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, 0x4B, "MK Bombchu Bowling Bombchus", NONE, BOMBCHU_DROP, {}, SpoilerCollectionCheck::None(), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
locationTable[MARKET_BOMBCHU_BOWLING_BOMBCHUS] = ItemLocation::Base (RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, 0x4B, "MK Bombchu Bowling Bombchus", NONE, BOMBCHU_DROP, {}, SpoilerCollectionCheck::None(), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||||
locationTable[MARKET_LOST_DOG] = ItemLocation::Base (RC_MARKET_LOST_DOG, 0x35, "MK Lost Dog", MARKET_LOST_DOG, PIECE_OF_HEART, {}, SpoilerCollectionCheck::InfTable(0x19, 0x09), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
locationTable[MARKET_LOST_DOG] = ItemLocation::Base (RC_MARKET_LOST_DOG, 0x35, "MK Lost Dog", MARKET_LOST_DOG, PIECE_OF_HEART, {}, SpoilerCollectionCheck::InfTable(0x19, 0x09), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||||
locationTable[MARKET_SHOOTING_GALLERY_REWARD] = ItemLocation::Base (RC_MARKET_SHOOTING_GALLERY_REWARD, 0x42, "MK Shooting Gallery", MARKET_SHOOTING_GALLERY_REWARD, PROGRESSIVE_SLINGSHOT, {}, SpoilerCollectionCheck::ItemGetInf(5), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
locationTable[MARKET_SHOOTING_GALLERY_REWARD] = ItemLocation::Base (RC_MARKET_SHOOTING_GALLERY_REWARD, 0x42, "MK Shooting Gallery", MARKET_SHOOTING_GALLERY_REWARD, PROGRESSIVE_SLINGSHOT, {}, SpoilerCollectionCheck::ItemGetInf(5), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||||
locationTable[MARKET_10_BIG_POES] = ItemLocation::Base (RC_MARKET_10_BIG_POES, 0x4D, "MK 10 Big Poes", MARKET_10_BIG_POES, EMPTY_BOTTLE, {}, SpoilerCollectionCheck::BigPoePoints(), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
locationTable[MARKET_10_BIG_POES] = ItemLocation::Base (RC_MARKET_10_BIG_POES, 0x4D, "MK 10 Big Poes", MARKET_10_BIG_POES, EMPTY_BOTTLE, {}, SpoilerCollectionCheck::RandomizerInf(), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||||
locationTable[MARKET_TREASURE_CHEST_GAME_ITEM_1] = ItemLocation::Chest (RC_MARKET_TREASURE_CHEST_GAME_ITEM_1, 0x10, 0x01, "MK Chest Game First Room Chest", MARKET_TREASURE_CHEST_GAME_ITEM_1, TREASURE_GAME_SMALL_KEY, {Category::cChestMinigame}, SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
locationTable[MARKET_TREASURE_CHEST_GAME_ITEM_1] = ItemLocation::Chest (RC_MARKET_TREASURE_CHEST_GAME_ITEM_1, 0x10, 0x01, "MK Chest Game First Room Chest", MARKET_TREASURE_CHEST_GAME_ITEM_1, TREASURE_GAME_SMALL_KEY, {Category::cChestMinigame}, SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||||
locationTable[MARKET_TREASURE_CHEST_GAME_ITEM_2] = ItemLocation::Chest (RC_MARKET_TREASURE_CHEST_GAME_ITEM_2, 0x10, 0x03, "MK Chest Game Second Room Chest", MARKET_TREASURE_CHEST_GAME_ITEM_2, TREASURE_GAME_SMALL_KEY, {Category::cChestMinigame}, SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
locationTable[MARKET_TREASURE_CHEST_GAME_ITEM_2] = ItemLocation::Chest (RC_MARKET_TREASURE_CHEST_GAME_ITEM_2, 0x10, 0x03, "MK Chest Game Second Room Chest", MARKET_TREASURE_CHEST_GAME_ITEM_2, TREASURE_GAME_SMALL_KEY, {Category::cChestMinigame}, SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||||
locationTable[MARKET_TREASURE_CHEST_GAME_ITEM_3] = ItemLocation::Chest (RC_MARKET_TREASURE_CHEST_GAME_ITEM_3, 0x10, 0x05, "MK Chest Game Third Room Chest", MARKET_TREASURE_CHEST_GAME_ITEM_3, TREASURE_GAME_SMALL_KEY, {Category::cChestMinigame}, SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
locationTable[MARKET_TREASURE_CHEST_GAME_ITEM_3] = ItemLocation::Chest (RC_MARKET_TREASURE_CHEST_GAME_ITEM_3, 0x10, 0x05, "MK Chest Game Third Room Chest", MARKET_TREASURE_CHEST_GAME_ITEM_3, TREASURE_GAME_SMALL_KEY, {Category::cChestMinigame}, SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||||
|
@ -2529,7 +2529,9 @@ std::map<RandomizerCheck, RandomizerInf> rcToRandomizerInf = {
|
|||||||
{ RC_DMT_TRADE_BROKEN_SWORD, RAND_INF_ADULT_TRADES_DMT_TRADE_BROKEN_SWORD },
|
{ RC_DMT_TRADE_BROKEN_SWORD, RAND_INF_ADULT_TRADES_DMT_TRADE_BROKEN_SWORD },
|
||||||
{ RC_LH_TRADE_FROG, RAND_INF_ADULT_TRADES_LH_TRADE_FROG },
|
{ RC_LH_TRADE_FROG, RAND_INF_ADULT_TRADES_LH_TRADE_FROG },
|
||||||
{ RC_DMT_TRADE_EYEDROPS, RAND_INF_ADULT_TRADES_DMT_TRADE_EYEDROPS },
|
{ RC_DMT_TRADE_EYEDROPS, RAND_INF_ADULT_TRADES_DMT_TRADE_EYEDROPS },
|
||||||
|
{ RC_LH_CHILD_FISHING, RAND_INF_CHILD_FISHING },
|
||||||
|
{ RC_LH_ADULT_FISHING, RAND_INF_ADULT_FISHING },
|
||||||
|
{ RC_MARKET_10_BIG_POES, RAND_INF_10_BIG_POES },
|
||||||
};
|
};
|
||||||
|
|
||||||
RandomizerCheckObject Randomizer::GetCheckObjectFromActor(s16 actorId, s16 sceneNum, s32 actorParams = 0x00) {
|
RandomizerCheckObject Randomizer::GetCheckObjectFromActor(s16 actorId, s16 sceneNum, s32 actorParams = 0x00) {
|
||||||
|
@ -742,15 +742,8 @@ bool HasItemBeenCollected(RandomizerCheckObject obj) {
|
|||||||
return gSaveContext.itemGetInf[flag / 16] & INDEX_TO_16BIT_LITTLE_ENDIAN_BITMASK(flag);
|
return gSaveContext.itemGetInf[flag / 16] & INDEX_TO_16BIT_LITTLE_ENDIAN_BITMASK(flag);
|
||||||
case SpoilerCollectionCheckType::SPOILER_CHK_MAGIC_BEANS:
|
case SpoilerCollectionCheckType::SPOILER_CHK_MAGIC_BEANS:
|
||||||
return BEANS_BOUGHT >= 10;
|
return BEANS_BOUGHT >= 10;
|
||||||
case SpoilerCollectionCheckType::SPOILER_CHK_MINIGAME:
|
|
||||||
if (obj.rc == RC_LH_CHILD_FISHING)
|
|
||||||
return HIGH_SCORE(HS_FISHING) & 0x400;
|
|
||||||
if (obj.rc == RC_LH_ADULT_FISHING)
|
|
||||||
return HIGH_SCORE(HS_FISHING) & 0x800;
|
|
||||||
case SpoilerCollectionCheckType::SPOILER_CHK_NONE:
|
case SpoilerCollectionCheckType::SPOILER_CHK_NONE:
|
||||||
return false;
|
return false;
|
||||||
case SpoilerCollectionCheckType::SPOILER_CHK_POE_POINTS:
|
|
||||||
return gSaveContext.highScores[HS_POE_POINTS] >= 1000;
|
|
||||||
case SpoilerCollectionCheckType::SPOILER_CHK_GRAVEDIGGER:
|
case SpoilerCollectionCheckType::SPOILER_CHK_GRAVEDIGGER:
|
||||||
// Gravedigger has a fix in place that means one of two save locations. Check both.
|
// Gravedigger has a fix in place that means one of two save locations. Check both.
|
||||||
return (gSaveContext.itemGetInf[1] & 0x1000) || // vanilla flag
|
return (gSaveContext.itemGetInf[1] & 0x1000) || // vanilla flag
|
||||||
|
@ -154,6 +154,11 @@ typedef enum {
|
|||||||
|
|
||||||
RAND_INF_GREG_FOUND,
|
RAND_INF_GREG_FOUND,
|
||||||
|
|
||||||
|
RAND_INF_CHILD_FISHING,
|
||||||
|
RAND_INF_ADULT_FISHING,
|
||||||
|
|
||||||
|
RAND_INF_10_BIG_POES,
|
||||||
|
|
||||||
// If you add anything to this list, you need to update the size of randomizerInf in z64save.h to be ceil(RAND_INF_MAX / 16)
|
// If you add anything to this list, you need to update the size of randomizerInf in z64save.h to be ceil(RAND_INF_MAX / 16)
|
||||||
|
|
||||||
RAND_INF_MAX,
|
RAND_INF_MAX,
|
||||||
|
@ -337,7 +337,10 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
|
|||||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||||
Rupees_ChangeBy(50);
|
Rupees_ChangeBy(50);
|
||||||
HIGH_SCORE(HS_POE_POINTS) += 100;
|
HIGH_SCORE(HS_POE_POINTS) += 100;
|
||||||
if (HIGH_SCORE(HS_POE_POINTS) != 1000) {
|
if (
|
||||||
|
(!gSaveContext.n64ddFlag && HIGH_SCORE(HS_POE_POINTS) != 1000) ||
|
||||||
|
(gSaveContext.n64ddFlag && (HIGH_SCORE(HS_POE_POINTS) != 1000 || Flags_GetRandomizerInf(RAND_INF_10_BIG_POES)))
|
||||||
|
) {
|
||||||
if (HIGH_SCORE(HS_POE_POINTS) > 1100) {
|
if (HIGH_SCORE(HS_POE_POINTS) > 1100) {
|
||||||
HIGH_SCORE(HS_POE_POINTS) = 1100;
|
HIGH_SCORE(HS_POE_POINTS) = 1100;
|
||||||
}
|
}
|
||||||
@ -345,6 +348,7 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
|
|||||||
} else {
|
} else {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
|
Flags_SetRandomizerInf(RAND_INF_10_BIG_POES);
|
||||||
player->exchangeItemId = EXCH_ITEM_NONE;
|
player->exchangeItemId = EXCH_ITEM_NONE;
|
||||||
this->textId = 0x70F8;
|
this->textId = 0x70F8;
|
||||||
Message_ContinueTextbox(play, this->textId);
|
Message_ContinueTextbox(play, this->textId);
|
||||||
|
@ -5046,9 +5046,13 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sLinkAge == 1) {
|
if (sLinkAge == 1) {
|
||||||
if (!(HIGH_SCORE(HS_FISHING) & 0x400)) {
|
if (
|
||||||
|
(!gSaveContext.n64ddFlag && !(HIGH_SCORE(HS_FISHING) & 0x400)) ||
|
||||||
|
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_CHILD_FISHING))
|
||||||
|
) {
|
||||||
if (D_80B7E078 >= Fishing_GetMinimumRequiredScore()) {
|
if (D_80B7E078 >= Fishing_GetMinimumRequiredScore()) {
|
||||||
HIGH_SCORE(HS_FISHING) |= 0x400;
|
HIGH_SCORE(HS_FISHING) |= 0x400;
|
||||||
|
Flags_SetRandomizerInf(RAND_INF_CHILD_FISHING);
|
||||||
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
|
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
getItemId = GI_HEART_PIECE;
|
getItemId = GI_HEART_PIECE;
|
||||||
@ -5059,9 +5063,13 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!(HIGH_SCORE(HS_FISHING) & 0x800)) {
|
if (
|
||||||
|
(!gSaveContext.n64ddFlag && !(HIGH_SCORE(HS_FISHING) & 0x800)) ||
|
||||||
|
(gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_ADULT_FISHING))
|
||||||
|
) {
|
||||||
if (D_80B7E078 >= Fishing_GetMinimumRequiredScore()) {
|
if (D_80B7E078 >= Fishing_GetMinimumRequiredScore()) {
|
||||||
HIGH_SCORE(HS_FISHING) |= 0x800;
|
HIGH_SCORE(HS_FISHING) |= 0x800;
|
||||||
|
Flags_SetRandomizerInf(RAND_INF_ADULT_FISHING);
|
||||||
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
|
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
getItemId = GI_SCALE_GOLD;
|
getItemId = GI_SCALE_GOLD;
|
||||||
|
Loading…
Reference in New Issue
Block a user