Use randomizerInf

This commit is contained in:
Garrett Cox 2022-09-02 11:47:57 -05:00
parent 73606edf4e
commit d60a82d67a
9 changed files with 143 additions and 81 deletions

View File

@ -261,5 +261,6 @@ extern GraphicsContext* __gfxCtx;
#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1) #define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1)
#define NUM_TRIALS 6 #define NUM_TRIALS 6
#define NUM_SHOP_ITEMS 64
#endif #endif

View File

@ -183,8 +183,7 @@ typedef struct {
char ganonHintText[150]; char ganonHintText[150];
char ganonText[250]; char ganonText[250];
u8 seedIcons[5]; u8 seedIcons[5];
u16 randomizerInf[4]; u16 randomizerInf[8];
u8 shopItemsPurchased[48];
u8 temporaryWeapon; u8 temporaryWeapon;
u16 adultTradeItems; u16 adultTradeItems;
} SaveContext; // size = 0x1428 } SaveContext; // size = 0x1428

View File

@ -709,6 +709,14 @@ std::vector<RandomizerCheck> shopItemRandomizerChecks = {
RC_ZD_SHOP_ITEM_6, RC_ZD_SHOP_ITEM_6,
RC_ZD_SHOP_ITEM_7, RC_ZD_SHOP_ITEM_7,
RC_ZD_SHOP_ITEM_8, RC_ZD_SHOP_ITEM_8,
RC_KAK_BAZAAR_ITEM_1,
RC_KAK_BAZAAR_ITEM_2,
RC_KAK_BAZAAR_ITEM_3,
RC_KAK_BAZAAR_ITEM_4,
RC_KAK_BAZAAR_ITEM_5,
RC_KAK_BAZAAR_ITEM_6,
RC_KAK_BAZAAR_ITEM_7,
RC_KAK_BAZAAR_ITEM_8,
RC_KAK_POTION_SHOP_ITEM_1, RC_KAK_POTION_SHOP_ITEM_1,
RC_KAK_POTION_SHOP_ITEM_2, RC_KAK_POTION_SHOP_ITEM_2,
RC_KAK_POTION_SHOP_ITEM_3, RC_KAK_POTION_SHOP_ITEM_3,
@ -717,6 +725,14 @@ std::vector<RandomizerCheck> shopItemRandomizerChecks = {
RC_KAK_POTION_SHOP_ITEM_6, RC_KAK_POTION_SHOP_ITEM_6,
RC_KAK_POTION_SHOP_ITEM_7, RC_KAK_POTION_SHOP_ITEM_7,
RC_KAK_POTION_SHOP_ITEM_8, RC_KAK_POTION_SHOP_ITEM_8,
RC_MARKET_BAZAAR_ITEM_1,
RC_MARKET_BAZAAR_ITEM_2,
RC_MARKET_BAZAAR_ITEM_3,
RC_MARKET_BAZAAR_ITEM_4,
RC_MARKET_BAZAAR_ITEM_5,
RC_MARKET_BAZAAR_ITEM_6,
RC_MARKET_BAZAAR_ITEM_7,
RC_MARKET_BAZAAR_ITEM_8,
RC_MARKET_POTION_SHOP_ITEM_1, RC_MARKET_POTION_SHOP_ITEM_1,
RC_MARKET_POTION_SHOP_ITEM_2, RC_MARKET_POTION_SHOP_ITEM_2,
RC_MARKET_POTION_SHOP_ITEM_3, RC_MARKET_POTION_SHOP_ITEM_3,
@ -2211,52 +2227,51 @@ ScrubIdentity Randomizer::IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respa
ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) { ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) {
struct ShopItemIdentity shopItemIdentity; struct ShopItemIdentity shopItemIdentity;
shopItemIdentity.shopItemId = -1;
shopItemIdentity.randomizerCheck = RC_UNKNOWN_CHECK; shopItemIdentity.randomizerCheck = RC_UNKNOWN_CHECK;
shopItemIdentity.getItemId = GI_NONE; shopItemIdentity.getItemId = GI_NONE;
shopItemIdentity.itemPrice = -1; shopItemIdentity.itemPrice = -1;
shopItemIdentity.isShuffled = GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) > 0; shopItemIdentity.isShuffled = GetRandoSettingValue(RSK_SHOPSANITY) > 0;
switch (sceneNum) { switch (sceneNum) {
case SCENE_KOKIRI_SHOP: case SCENE_KOKIRI_SHOP:
switch (actorParams) { switch (actorParams) {
case 0x0D: case 0x0D:
shopItemIdentity.shopItemId = 0x00; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_1; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_1;
shopItemIdentity.getItemId = GI_SHIELD_DEKU; shopItemIdentity.getItemId = GI_SHIELD_DEKU;
break; break;
case 0x00: case 0x00:
shopItemIdentity.shopItemId = 0x01; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_2;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_2; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_2;
shopItemIdentity.getItemId = GI_NUTS_5_2; shopItemIdentity.getItemId = GI_NUTS_5_2;
break; break;
case 0x04: case 0x04:
shopItemIdentity.shopItemId = 0x02; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_3;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_3; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_3;
shopItemIdentity.getItemId = GI_NUTS_10; shopItemIdentity.getItemId = GI_NUTS_10;
break; break;
case 0x05: case 0x05:
shopItemIdentity.shopItemId = 0x03; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_4;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_4; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_4;
shopItemIdentity.getItemId = GI_STICKS_1; shopItemIdentity.getItemId = GI_STICKS_1;
break; break;
case 0x1D: case 0x1D:
shopItemIdentity.shopItemId = 0x04; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_5;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_5; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_5;
shopItemIdentity.getItemId = GI_SEEDS_30; shopItemIdentity.getItemId = GI_SEEDS_30;
break; break;
case 0x2C: case 0x2C:
shopItemIdentity.shopItemId = 0x05; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_6;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_6; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_6;
shopItemIdentity.getItemId = GI_ARROWS_SMALL; shopItemIdentity.getItemId = GI_ARROWS_SMALL;
break; break;
case 0x01: case 0x01:
shopItemIdentity.shopItemId = 0x06; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_7;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_7; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_7;
shopItemIdentity.getItemId = GI_ARROWS_MEDIUM; shopItemIdentity.getItemId = GI_ARROWS_MEDIUM;
break; break;
case 0x10: case 0x10:
shopItemIdentity.shopItemId = 0x07; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_8;
shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_8; shopItemIdentity.randomizerCheck = RC_KF_SHOP_ITEM_8;
shopItemIdentity.getItemId = GI_HEART; shopItemIdentity.getItemId = GI_HEART;
break; break;
@ -2265,43 +2280,43 @@ ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) {
case SCENE_GOLON: case SCENE_GOLON:
switch (actorParams) { switch (actorParams) {
case 0x03: case 0x03:
shopItemIdentity.shopItemId = 0x08; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_1;
shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_1; shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_1;
shopItemIdentity.getItemId = GI_BOMBS_5; shopItemIdentity.getItemId = GI_BOMBS_5;
break; break;
case 0x06: case 0x06:
shopItemIdentity.shopItemId = 0x09; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_2;
shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_2; shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_2;
shopItemIdentity.getItemId = GI_BOMBS_10; shopItemIdentity.getItemId = GI_BOMBS_10;
break; break;
case 0x2D: case 0x2D:
shopItemIdentity.shopItemId = 0x0A; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_3;
shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_3; shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_3;
shopItemIdentity.getItemId = GI_BOMBS_20; shopItemIdentity.getItemId = GI_BOMBS_20;
break; break;
case 0x2E: case 0x2E:
shopItemIdentity.shopItemId = 0x0B; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_4;
shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_4; shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_4;
shopItemIdentity.getItemId = GI_BOMBS_30; shopItemIdentity.getItemId = GI_BOMBS_30;
break; break;
case 0x0E: case 0x0E:
shopItemIdentity.shopItemId = 0x0C; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_5;
shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_5; shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_5;
shopItemIdentity.getItemId = GI_TUNIC_GORON; shopItemIdentity.getItemId = GI_TUNIC_GORON;
break; break;
case 0x10: case 0x10:
shopItemIdentity.shopItemId = 0x0D; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_6;
shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_6; shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_6;
shopItemIdentity.getItemId = GI_HEART; shopItemIdentity.getItemId = GI_HEART;
break; break;
case 0x30: case 0x30:
shopItemIdentity.shopItemId = 0x0E; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_7;
shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_7; shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_7;
shopItemIdentity.getItemId = GI_POTION_RED; shopItemIdentity.getItemId = GI_POTION_RED;
break; break;
// TODO: Not a huge issue because shopsanity won't use this slot, but it has the same actorParam as another // TODO: Not a huge issue because shopsanity won't use this slot, but it has the same actorParam as another
// case 0x10: // case 0x10:
// shopItemIdentity.shopItemId = 0x0F; // shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_8;
// shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_8; // shopItemIdentity.randomizerCheck = RC_GC_SHOP_ITEM_8;
// shopItemIdentity.getItemId = GI_HEART; // shopItemIdentity.getItemId = GI_HEART;
// break; // break;
@ -2310,42 +2325,42 @@ ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) {
case SCENE_ZOORA: case SCENE_ZOORA:
switch (actorParams) { switch (actorParams) {
case 0x0F: case 0x0F:
shopItemIdentity.shopItemId = 0x10; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_1;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_1; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_1;
shopItemIdentity.getItemId = GI_TUNIC_ZORA; shopItemIdentity.getItemId = GI_TUNIC_ZORA;
break; break;
case 0x2C: case 0x2C:
shopItemIdentity.shopItemId = 0x11; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_2;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_2; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_2;
shopItemIdentity.getItemId = GI_ARROWS_SMALL; shopItemIdentity.getItemId = GI_ARROWS_SMALL;
break; break;
case 0x10: case 0x10:
shopItemIdentity.shopItemId = 0x12; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_3;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_3; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_3;
shopItemIdentity.getItemId = GI_HEART; shopItemIdentity.getItemId = GI_HEART;
break; break;
case 0x01: case 0x01:
shopItemIdentity.shopItemId = 0x13; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_4;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_4; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_4;
shopItemIdentity.getItemId = GI_ARROWS_MEDIUM; shopItemIdentity.getItemId = GI_ARROWS_MEDIUM;
break; break;
case 0x00: case 0x00:
shopItemIdentity.shopItemId = 0x14; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_5;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_5; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_5;
shopItemIdentity.getItemId = GI_NUTS_5_2; shopItemIdentity.getItemId = GI_NUTS_5_2;
break; break;
case 0x02: case 0x02:
shopItemIdentity.shopItemId = 0x15; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_6;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_6; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_6;
shopItemIdentity.getItemId = GI_ARROWS_LARGE; shopItemIdentity.getItemId = GI_ARROWS_LARGE;
break; break;
case 0x07: case 0x07:
shopItemIdentity.shopItemId = 0x16; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_7;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_7; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_7;
shopItemIdentity.getItemId = GI_FISH; shopItemIdentity.getItemId = GI_FISH;
break; break;
case 0x31: case 0x31:
shopItemIdentity.shopItemId = 0x17; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_8;
shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_8; shopItemIdentity.randomizerCheck = RC_ZD_SHOP_ITEM_8;
shopItemIdentity.getItemId = GI_POTION_RED; shopItemIdentity.getItemId = GI_POTION_RED;
break; break;
@ -2354,42 +2369,42 @@ ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) {
case SCENE_DRAG: case SCENE_DRAG:
switch (actorParams) { switch (actorParams) {
case 0x09: case 0x09:
shopItemIdentity.shopItemId = 0x18; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_1;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_1; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_1;
shopItemIdentity.getItemId = GI_POTION_GREEN; shopItemIdentity.getItemId = GI_POTION_GREEN;
break; break;
case 0x27: case 0x27:
shopItemIdentity.shopItemId = 0x19; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_2;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_2; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_2;
shopItemIdentity.getItemId = GI_BLUE_FIRE; shopItemIdentity.getItemId = GI_BLUE_FIRE;
break; break;
case 0x08: case 0x08:
shopItemIdentity.shopItemId = 0x1A; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_3;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_3; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_3;
shopItemIdentity.getItemId = GI_POTION_RED; shopItemIdentity.getItemId = GI_POTION_RED;
break; break;
case 0x2B: case 0x2B:
shopItemIdentity.shopItemId = 0x1B; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_4;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_4; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_4;
shopItemIdentity.getItemId = GI_FAIRY; shopItemIdentity.getItemId = GI_FAIRY;
break; break;
case 0x00: case 0x00:
shopItemIdentity.shopItemId = 0x1C; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_5;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_5; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_5;
shopItemIdentity.getItemId = GI_NUTS_5_2; shopItemIdentity.getItemId = GI_NUTS_5_2;
break; break;
case 0x28: case 0x28:
shopItemIdentity.shopItemId = 0x1D; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_6;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_6; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_6;
shopItemIdentity.getItemId = GI_BUGS; shopItemIdentity.getItemId = GI_BUGS;
break; break;
case 0x2A: case 0x2A:
shopItemIdentity.shopItemId = 0x1E; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_7;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_7; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_7;
shopItemIdentity.getItemId = GI_POE; shopItemIdentity.getItemId = GI_POE;
break; break;
case 0x07: case 0x07:
shopItemIdentity.shopItemId = 0x1F; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_8;
shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_8; shopItemIdentity.randomizerCheck = RC_KAK_POTION_SHOP_ITEM_8;
shopItemIdentity.getItemId = GI_FISH; shopItemIdentity.getItemId = GI_FISH;
break; break;
@ -2398,42 +2413,42 @@ ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) {
case SCENE_ALLEY_SHOP: case SCENE_ALLEY_SHOP:
switch (actorParams) { switch (actorParams) {
case 0x09: case 0x09:
shopItemIdentity.shopItemId = 0x20; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_1;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_1; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_1;
shopItemIdentity.getItemId = GI_POTION_GREEN; shopItemIdentity.getItemId = GI_POTION_GREEN;
break; break;
case 0x27: case 0x27:
shopItemIdentity.shopItemId = 0x21; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_2;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_2; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_2;
shopItemIdentity.getItemId = GI_BLUE_FIRE; shopItemIdentity.getItemId = GI_BLUE_FIRE;
break; break;
case 0x08: case 0x08:
shopItemIdentity.shopItemId = 0x22; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_3;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_3; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_3;
shopItemIdentity.getItemId = GI_POTION_RED; shopItemIdentity.getItemId = GI_POTION_RED;
break; break;
case 0x2B: case 0x2B:
shopItemIdentity.shopItemId = 0x23; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_4;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_4; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_4;
shopItemIdentity.getItemId = GI_FAIRY; shopItemIdentity.getItemId = GI_FAIRY;
break; break;
case 0x00: case 0x00:
shopItemIdentity.shopItemId = 0x24; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_5;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_5; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_5;
shopItemIdentity.getItemId = GI_NUTS_5_2; shopItemIdentity.getItemId = GI_NUTS_5_2;
break; break;
case 0x28: case 0x28:
shopItemIdentity.shopItemId = 0x25; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_6;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_6; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_6;
shopItemIdentity.getItemId = GI_BUGS; shopItemIdentity.getItemId = GI_BUGS;
break; break;
case 0x2A: case 0x2A:
shopItemIdentity.shopItemId = 0x26; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_7;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_7; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_7;
shopItemIdentity.getItemId = GI_POE; shopItemIdentity.getItemId = GI_POE;
break; break;
case 0x07: case 0x07:
shopItemIdentity.shopItemId = 0x27; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_8;
shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_8; shopItemIdentity.randomizerCheck = RC_MARKET_POTION_SHOP_ITEM_8;
shopItemIdentity.getItemId = GI_FISH; shopItemIdentity.getItemId = GI_FISH;
break; break;
@ -2442,42 +2457,42 @@ ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) {
case SCENE_NIGHT_SHOP: case SCENE_NIGHT_SHOP:
switch (actorParams) { switch (actorParams) {
case 0x18: case 0x18:
shopItemIdentity.shopItemId = 0x28; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_1;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_1; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_1;
shopItemIdentity.getItemId = GI_BOMBCHUS_10; shopItemIdentity.getItemId = GI_BOMBCHUS_10;
break; break;
case 0x1C: case 0x1C:
shopItemIdentity.shopItemId = 0x29; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_2;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_2; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_2;
shopItemIdentity.getItemId = GI_BOMBCHUS_10; shopItemIdentity.getItemId = GI_BOMBCHUS_10;
break; break;
case 0x19: case 0x19:
shopItemIdentity.shopItemId = 0x2A; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_3;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_3; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_3;
shopItemIdentity.getItemId = GI_BOMBCHUS_10; shopItemIdentity.getItemId = GI_BOMBCHUS_10;
break; break;
case 0x15: case 0x15:
shopItemIdentity.shopItemId = 0x2B; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_4;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_4; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_4;
shopItemIdentity.getItemId = GI_BOMBCHUS_10; shopItemIdentity.getItemId = GI_BOMBCHUS_10;
break; break;
case 0x1A: case 0x1A:
shopItemIdentity.shopItemId = 0x2C; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_5;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_5; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_5;
shopItemIdentity.getItemId = GI_BOMBCHUS_20; shopItemIdentity.getItemId = GI_BOMBCHUS_20;
break; break;
case 0x16: case 0x16:
shopItemIdentity.shopItemId = 0x2D; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_6;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_6; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_6;
shopItemIdentity.getItemId = GI_BOMBCHUS_20; shopItemIdentity.getItemId = GI_BOMBCHUS_20;
break; break;
case 0x1B: case 0x1B:
shopItemIdentity.shopItemId = 0x2E; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_7;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_7; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_7;
shopItemIdentity.getItemId = GI_BOMBCHUS_20; shopItemIdentity.getItemId = GI_BOMBCHUS_20;
break; break;
case 0x17: case 0x17:
shopItemIdentity.shopItemId = 0x2F; shopItemIdentity.randomizerInf = RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_8;
shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_8; shopItemIdentity.randomizerCheck = RC_MARKET_BOMBCHU_SHOP_ITEM_8;
shopItemIdentity.getItemId = GI_BOMBCHUS_20; shopItemIdentity.getItemId = GI_BOMBCHUS_20;
break; break;

View File

@ -1031,7 +1031,7 @@ typedef struct ScrubIdentity {
} ScrubIdentity; } ScrubIdentity;
typedef struct ShopItemIdentity { typedef struct ShopItemIdentity {
int32_t shopItemId; RandomizerInf randomizerInf;
RandomizerCheck randomizerCheck; RandomizerCheck randomizerCheck;
GetItemID getItemId; GetItemID getItemId;
int32_t itemPrice; int32_t itemPrice;

View File

@ -66,6 +66,71 @@ typedef enum {
RAND_INF_SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_BRIDGE, RAND_INF_SCRUBS_PURCHASED_LW_DEKU_SCRUB_NEAR_BRIDGE,
RAND_INF_SCRUBS_PURCHASED_DMC_DEKU_SCRUB, RAND_INF_SCRUBS_PURCHASED_DMC_DEKU_SCRUB,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_2,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_3,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_4,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_5,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_6,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_7,
RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_8,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_1,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_2,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_3,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_4,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_5,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_6,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_7,
RAND_INF_SHOP_ITEMS_GC_SHOP_ITEM_8,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_1,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_2,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_3,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_4,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_5,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_6,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_7,
RAND_INF_SHOP_ITEMS_ZD_SHOP_ITEM_8,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_1,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_2,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_3,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_4,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_5,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_6,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_7,
RAND_INF_SHOP_ITEMS_KAK_BAZAAR_ITEM_8,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_1,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_2,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_3,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_4,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_5,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_6,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_7,
RAND_INF_SHOP_ITEMS_KAK_POTION_SHOP_ITEM_8,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_1,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_2,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_3,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_4,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_5,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_6,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_7,
RAND_INF_SHOP_ITEMS_MARKET_BAZAAR_ITEM_8,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_1,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_2,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_3,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_4,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_5,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_6,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_7,
RAND_INF_SHOP_ITEMS_MARKET_POTION_SHOP_ITEM_8,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_1,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_2,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_3,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_4,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_5,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_6,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_7,
RAND_INF_SHOP_ITEMS_MARKET_BOMBCHU_SHOP_ITEM_8,
// 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,

View File

@ -761,10 +761,6 @@ void SaveManager::LoadBaseVersion1() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) { SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]); SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
}); });
SaveManager::Instance->LoadArray("shopItemsPurchased", ARRAY_COUNT(gSaveContext.shopItemsPurchased), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.shopItemsPurchased[i]);
});
} }
void SaveManager::LoadBaseVersion2() { void SaveManager::LoadBaseVersion2() {
@ -922,10 +918,6 @@ void SaveManager::LoadBaseVersion2() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) { SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]); SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
}); });
SaveManager::Instance->LoadArray("shopItemsPurchased", ARRAY_COUNT(gSaveContext.shopItemsPurchased), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.shopItemsPurchased[i]);
});
} }
void SaveManager::SaveBase() { void SaveManager::SaveBase() {
@ -1079,10 +1071,6 @@ void SaveManager::SaveBase() {
SaveManager::Instance->SaveArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) { SaveManager::Instance->SaveArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->SaveData("", gSaveContext.randomizerInf[i]); SaveManager::Instance->SaveData("", gSaveContext.randomizerInf[i]);
}); });
SaveManager::Instance->SaveArray("shopItemsPurchased", ARRAY_COUNT(gSaveContext.shopItemsPurchased), [](size_t i) {
SaveManager::Instance->SaveData("", gSaveContext.shopItemsPurchased[i]);
});
} }
void SaveManager::SaveArray(const std::string& name, const size_t size, SaveArrayFunc func) { void SaveManager::SaveArray(const std::string& name, const size_t size, SaveArrayFunc func) {

View File

@ -9,7 +9,6 @@
#define NUM_DUNGEONS 8 #define NUM_DUNGEONS 8
#define NUM_COWS 10 #define NUM_COWS 10
#define NUM_SCRUBS 35 #define NUM_SCRUBS 35
#define NUM_SHOP_ITEMS 35
/** /**
* Initialize new save. * Initialize new save.
@ -762,11 +761,6 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.randomizerInf[i] = 0; gSaveContext.randomizerInf[i] = 0;
} }
// Sets all shop items to not purchased when generating a rando save.
for (u8 i = 0; i < NUM_SHOP_ITEMS; i++) {
gSaveContext.shopItemsPurchased[i] = 0;
}
// Set all trials to cleared if trial count is random or anything other than 6 // Set all trials to cleared if trial count is random or anything other than 6
if (Randomizer_GetSettingValue(RSK_RANDOM_TRIALS) || (Randomizer_GetSettingValue(RSK_TRIAL_COUNT) != 6)) { if (Randomizer_GetSettingValue(RSK_RANDOM_TRIALS) || (Randomizer_GetSettingValue(RSK_TRIAL_COUNT) != 6)) {
for (u16 i = RAND_INF_TRIALS_DONE_LIGHT_TRIAL; i <= RAND_INF_TRIALS_DONE_SHADOW_TRIAL; i++) { for (u16 i = RAND_INF_TRIALS_DONE_LIGHT_TRIAL; i <= RAND_INF_TRIALS_DONE_SHADOW_TRIAL; i++) {

View File

@ -745,7 +745,7 @@ s32 EnGirlA_CanBuy_Randomizer(GlobalContext* globalCtx, EnGirlA* this) {
// TOOD: We should put a sold out sign instead of preventing them from buying again // TOOD: We should put a sold out sign instead of preventing them from buying again
// TODO: Need to allow repeated buys for some items // TODO: Need to allow repeated buys for some items
if (gSaveContext.shopItemsPurchased[shopItemIdentity.shopItemId] == 1) { if (Flags_GetRandomizerInf(shopItemIdentity.randomizerInf)) {
return CANBUY_RESULT_CANT_GET_NOW; return CANBUY_RESULT_CANT_GET_NOW;
} }
@ -947,7 +947,7 @@ void EnGirlA_BuyEvent_ObtainBombchuPack(GlobalContext* globalCtx, EnGirlA* this)
void EnGirlA_BuyEvent_Randomizer(GlobalContext* globalCtx, EnGirlA* this) { void EnGirlA_BuyEvent_Randomizer(GlobalContext* globalCtx, EnGirlA* this) {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params); ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params);
gSaveContext.shopItemsPurchased[shopItemIdentity.shopItemId] = 1; Flags_SetRandomizerInf(shopItemIdentity.randomizerInf);
Rupees_ChangeBy(-this->basePrice); Rupees_ChangeBy(-this->basePrice);
} }
@ -1001,8 +1001,8 @@ void EnGirlA_SetItemDescription(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params); ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params);
if (shopItemIdentity.shopItemId != -1) { if (shopItemIdentity.isShuffled) {
this->actor.textId = 0x9100 + shopItemIdentity.shopItemId; this->actor.textId = 0x9100 + (shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
} }
} }
@ -1027,14 +1027,14 @@ void EnGirlA_UpdateStockedItem(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params); ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params);
if (shopItemIdentity.shopItemId != -1) { if (shopItemIdentity.isShuffled) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.getItemId); GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.getItemId);
itemEntry->objID = getItemEntry.objectId; itemEntry->objID = getItemEntry.objectId;
itemEntry->giDrawId = getItemEntry.gid; itemEntry->giDrawId = getItemEntry.gid;
itemEntry->getItemId = getItemEntry.getItemId; itemEntry->getItemId = getItemEntry.getItemId;
itemEntry->count = 1; itemEntry->count = 1;
itemEntry->price = shopItemIdentity.itemPrice; itemEntry->price = shopItemIdentity.itemPrice;
itemEntry->itemDescTextId = 0x9100 + shopItemIdentity.shopItemId; itemEntry->itemDescTextId = 0x9100 + (shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
} }
} }
@ -1066,15 +1066,15 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params); ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->actor.params);
if (shopItemIdentity.shopItemId != -1) { if (shopItemIdentity.isShuffled) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.getItemId); GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.getItemId);
itemEntry->objID = getItemEntry.objectId; itemEntry->objID = getItemEntry.objectId;
itemEntry->giDrawId = getItemEntry.gid; itemEntry->giDrawId = getItemEntry.gid;
itemEntry->getItemId = getItemEntry.getItemId; itemEntry->getItemId = getItemEntry.getItemId;
itemEntry->count = 1; itemEntry->count = 1;
itemEntry->price = shopItemIdentity.itemPrice; itemEntry->price = shopItemIdentity.itemPrice;
itemEntry->itemDescTextId = 0x9100 + shopItemIdentity.shopItemId; itemEntry->itemDescTextId = 0x9100 + (shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
itemEntry->itemBuyPromptTextId = 0x9100 + shopItemIdentity.shopItemId + 48; // Magic number, 48 is the number of shop items in the game itemEntry->itemBuyPromptTextId = 0x9100 + ((shopItemIdentity.randomizerInf - RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1) + NUM_SHOP_ITEMS);
itemEntry->canBuyFunc = EnGirlA_CanBuy_Randomizer; itemEntry->canBuyFunc = EnGirlA_CanBuy_Randomizer;
itemEntry->itemGiveFunc = EnGirlA_ItemGive_Randomizer; itemEntry->itemGiveFunc = EnGirlA_ItemGive_Randomizer;
itemEntry->buyEventFunc = EnGirlA_BuyEvent_Randomizer; itemEntry->buyEventFunc = EnGirlA_BuyEvent_Randomizer;

View File

@ -1334,7 +1334,7 @@ void EnOssan_GiveItemWithFanfare(GlobalContext* globalCtx, EnOssan* this) {
func_8002F434(&this->actor, globalCtx, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f); func_8002F434(&this->actor, globalCtx, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f);
} else { } else {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->shelfSlots[this->cursorIndex]->actor.params); ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->shelfSlots[this->cursorIndex]->actor.params);
if (shopItemIdentity.shopItemId != -1) { if (shopItemIdentity.isShuffled) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.getItemId); GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.getItemId);
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 120.0f, 120.0f); GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 120.0f, 120.0f);
} else { } else {