mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-24 09:08:52 -05:00
Merge pull request #1300 from aMannus/tokensanity-bgs-fix
Rando: Tokensanity BGS and maps/compasses fix
This commit is contained in:
commit
da07a8f409
@ -1642,12 +1642,16 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
||||
} else if ((item >= ITEM_SWORD_KOKIRI) && (item <= ITEM_SWORD_BGS)) {
|
||||
gSaveContext.inventory.equipment |= gBitFlags[item - ITEM_SWORD_KOKIRI] << gEquipShifts[EQUIP_SWORD];
|
||||
|
||||
// Both Giant's Knife and Biggoron Sword have the same Item ID, so this part handles both of them
|
||||
if (item == ITEM_SWORD_BGS) {
|
||||
gSaveContext.swordHealth = 8;
|
||||
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF
|
||||
||(gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) { // In rando, when buying Giant's Knife, also check
|
||||
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD]; // for 0xE in case we don't have Kokiri Sword
|
||||
// In rando, when buying Giant's Knife, also check
|
||||
// for 0xE in case we don't have Kokiri Sword
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
|
||||
|
||||
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD];
|
||||
|
||||
if (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS;
|
||||
Interface_LoadItemIcon1(globalCtx, 0);
|
||||
|
@ -205,13 +205,13 @@ void Randomizer_UpdateSkullReward(EnSi* this, GlobalContext* globalCtx) {
|
||||
getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||
getItemId = getItem.getItemId;
|
||||
if (getItemId == RG_ICE_TRAP) {
|
||||
player->getItemEntry = getItem;
|
||||
player->pendingIceTrap = true;
|
||||
textId = 0xF8;
|
||||
} else {
|
||||
textId = getItem.textId;
|
||||
giveItemId = getItem.itemId;
|
||||
}
|
||||
player->getItemEntry = getItem;
|
||||
}
|
||||
|
||||
void Randomizer_GiveSkullReward(EnSi* this, GlobalContext* globalCtx) {
|
||||
@ -222,5 +222,8 @@ void Randomizer_GiveSkullReward(EnSi* this, GlobalContext* globalCtx) {
|
||||
} else if (getItem.modIndex == MOD_RANDOMIZER) {
|
||||
Randomizer_Item_Give(globalCtx, getItem);
|
||||
}
|
||||
player->getItemEntry = getItem;
|
||||
// RANDOTOD: Move this into Item_Give() or some other more central location
|
||||
if (getItem.getItemId == GI_SWORD_BGS) {
|
||||
gSaveContext.bgsFlag = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user