mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-15 14:05:06 -05:00
Merge remote-tracking branch 'upstream/rando-next' into rando-enhanced-magic-arrows
This commit is contained in:
commit
e1da7bf9af
@ -1327,15 +1327,15 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
|
||||
case RG_BUY_BOMBCHU_10:
|
||||
case RG_BUY_BOMBCHU_20:
|
||||
case RG_BUY_BOMBCHU_5:
|
||||
case RG_BOMBCHU_DROP:
|
||||
// If Bombchus aren't in logic, you need a bomb bag to purchase them
|
||||
// If they are in logic, you need to have already obtained them somewhere else
|
||||
// Bombchu Drop is only used as a bowling reward, so it needs the same logic
|
||||
if (GetRandoSettingValue(RSK_BOMBCHUS_IN_LOGIC)) {
|
||||
return INV_CONTENT(ITEM_BOMBCHU) == ITEM_BOMBCHU ? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
|
||||
} else {
|
||||
return CUR_UPG_VALUE(UPG_BOMB_BAG) ? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
|
||||
}
|
||||
case RG_BOMBCHU_DROP:
|
||||
return INV_CONTENT(ITEM_BOMBCHU) == ITEM_BOMBCHU ? CAN_OBTAIN : CANT_OBTAIN_NEED_UPGRADE;
|
||||
case RG_PROGRESSIVE_HOOKSHOT:
|
||||
switch (INV_CONTENT(ITEM_HOOKSHOT)) {
|
||||
case ITEM_NONE:
|
||||
@ -1694,7 +1694,13 @@ GetItemID Randomizer::GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItem
|
||||
return GI_OCARINA_OOT;
|
||||
}
|
||||
case RG_PROGRESSIVE_BOMBCHUS:
|
||||
return GI_BOMBCHUS_20;
|
||||
if (INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE) {
|
||||
return GI_BOMBCHUS_20;
|
||||
}
|
||||
if (AMMO(ITEM_BOMBCHU) < 5) {
|
||||
return GI_BOMBCHUS_10;
|
||||
}
|
||||
return GI_BOMBCHUS_5;
|
||||
case RG_BOMBCHU_5:
|
||||
case RG_BUY_BOMBCHU_5:
|
||||
case RG_BOMBCHU_DROP:
|
||||
|
@ -1637,6 +1637,10 @@ extern "C" GetItemEntry ItemTable_RetrieveEntry(s16 tableID, s16 getItemID) {
|
||||
extern "C" GetItemEntry Randomizer_GetItemFromActor(s16 actorId, s16 sceneNum, s16 actorParams, GetItemID ogId) {
|
||||
s16 getItemModIndex;
|
||||
RandomizerCheck randomizerCheck = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(actorId, sceneNum, actorParams);
|
||||
// if we got unknown check here, we don't need to do anything else, just return the ogId.
|
||||
if (randomizerCheck == RC_UNKNOWN_CHECK) {
|
||||
return ItemTable_RetrieveEntry(MOD_NONE, ogId);
|
||||
}
|
||||
if (OTRGlobals::Instance->gRandomizer->CheckContainsVanillaItem(randomizerCheck)) {
|
||||
getItemModIndex = MOD_NONE;
|
||||
} else {
|
||||
@ -1653,6 +1657,11 @@ extern "C" GetItemEntry Randomizer_GetItemFromActor(s16 actorId, s16 sceneNum, s
|
||||
|
||||
extern "C" GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId) {
|
||||
s16 getItemModIndex;
|
||||
|
||||
// if we got unknown check here, we don't need to do anything else, just return the ogId.
|
||||
if (randomizerCheck == RC_UNKNOWN_CHECK) {
|
||||
return ItemTable_RetrieveEntry(MOD_NONE, ogId);
|
||||
}
|
||||
if (OTRGlobals::Instance->gRandomizer->CheckContainsVanillaItem(randomizerCheck)) {
|
||||
getItemModIndex = MOD_NONE;
|
||||
} else {
|
||||
|
@ -101,6 +101,9 @@ void GiveLinksPocketItem() {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LINKS_POCKET, RG_NONE);
|
||||
|
||||
if (getItemEntry.modIndex == MOD_NONE) {
|
||||
if (getItemEntry.getItemId == GI_SWORD_BGS) {
|
||||
gSaveContext.bgsFlag = true;
|
||||
}
|
||||
Item_Give(NULL, getItemEntry.itemId);
|
||||
} else if (getItemEntry.modIndex == MOD_RANDOMIZER) {
|
||||
Randomizer_Item_Give(NULL, getItemEntry);
|
||||
@ -400,6 +403,9 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
s32 giid = getItem.getItemId;
|
||||
|
||||
if (getItem.modIndex == MOD_NONE) {
|
||||
if (getItem.getItemId == GI_SWORD_BGS) {
|
||||
gSaveContext.bgsFlag = true;
|
||||
}
|
||||
Item_Give(NULL, getItem.itemId);
|
||||
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
||||
Randomizer_Item_Give(NULL, getItem);
|
||||
|
Loading…
Reference in New Issue
Block a user