mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 16:18:50 -05:00
Tweak - Rando freestanding/skulltula ice trap behaviour (#2230)
* Improve skulltula ice traps * Improve freestanding ice traps * Merge fix
This commit is contained in:
parent
261db2c3e1
commit
1b9ab52e35
@ -106,15 +106,25 @@ void func_80AFB768(EnSi* this, PlayState* play) {
|
||||
} else {
|
||||
Item_Give(play, giveItemId);
|
||||
}
|
||||
if ((CVarGetInteger("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) && getItemId != RG_ICE_TRAP) {
|
||||
if ((!CVarGetInteger("gSkulltulaFreeze", 0) || giveItemId != ITEM_SKULL_TOKEN) &&
|
||||
getItemId != RG_ICE_TRAP) {
|
||||
player->actor.freezeTimer = 20;
|
||||
}
|
||||
|
||||
if (getItemId == RG_ICE_TRAP && Message_GetState(&play->msgCtx) != TEXT_STATE_CLOSING) {
|
||||
player->actor.freezeTimer = 10;
|
||||
}
|
||||
|
||||
Message_StartTextbox(play, textId, NULL);
|
||||
|
||||
if (gSaveContext.n64ddFlag && getItemId != RG_ICE_TRAP) {
|
||||
Randomizer_GiveSkullReward(this, play);
|
||||
Audio_PlayFanfare_Rando(getItem);
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (getItemId != RG_ICE_TRAP) {
|
||||
Randomizer_GiveSkullReward(this, play);
|
||||
Audio_PlayFanfare_Rando(getItem);
|
||||
} else {
|
||||
gSaveContext.pendingIceTrapCount++;
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
}
|
||||
} else {
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
}
|
||||
@ -145,9 +155,14 @@ void func_80AFB89C(EnSi* this, PlayState* play) {
|
||||
|
||||
Message_StartTextbox(play, textId, NULL);
|
||||
|
||||
if (gSaveContext.n64ddFlag && getItemId != RG_ICE_TRAP) {
|
||||
Randomizer_GiveSkullReward(this, play);
|
||||
Audio_PlayFanfare_Rando(getItem);
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (getItemId != RG_ICE_TRAP) {
|
||||
Randomizer_GiveSkullReward(this, play);
|
||||
Audio_PlayFanfare_Rando(getItem);
|
||||
} else {
|
||||
gSaveContext.pendingIceTrapCount++;
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
}
|
||||
} else {
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
}
|
||||
@ -161,7 +176,7 @@ void func_80AFB950(EnSi* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (Message_GetState(&play->msgCtx) != TEXT_STATE_CLOSING &&
|
||||
((CVarGetInteger("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) && getItemId != RG_ICE_TRAP)) {
|
||||
(!CVarGetInteger("gSkulltulaFreeze", 0) || getItemId == RG_ICE_TRAP || giveItemId != ITEM_SKULL_TOKEN)) {
|
||||
player->actor.freezeTimer = 10;
|
||||
} else {
|
||||
SET_GS_FLAGS((this->actor.params & 0x1F00) >> 8, this->actor.params & 0xFF);
|
||||
@ -195,7 +210,6 @@ void EnSi_Draw(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
GetItemEntry_Draw(play, getItem);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,7 +219,6 @@ void Randomizer_UpdateSkullReward(EnSi* this, PlayState* play) {
|
||||
getItem = Randomizer_GetItemFromActor(this->actor.id, play->sceneNum, this->actor.params, GI_SKULL_TOKEN);
|
||||
getItemId = getItem.getItemId;
|
||||
if (getItemId == RG_ICE_TRAP) {
|
||||
gSaveContext.pendingIceTrapCount++;
|
||||
textId = 0xF8;
|
||||
} else {
|
||||
textId = getItem.textId;
|
||||
|
@ -6301,21 +6301,13 @@ s32 func_8083E5A8(Player* this, PlayState* play) {
|
||||
|
||||
iREG(67) = false;
|
||||
|
||||
if (gSaveContext.n64ddFlag && giEntry.getItemId == RG_ICE_TRAP) {
|
||||
if (giEntry.getItemFrom == ITEM_FROM_FREESTANDING) {
|
||||
// RANDOTODO: Abstract this to a function.
|
||||
this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11);
|
||||
this->actor.colChkInfo.damage = 0;
|
||||
func_80837C0C(play, this, 3, 0.0f, 0.0f, 0, 20);
|
||||
Player_SetPendingFlag(this, play);
|
||||
Message_StartTextbox(play, 0xF8, NULL);
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
this->getItemId = GI_NONE;
|
||||
this->getItemEntry = (GetItemEntry) GET_ITEM_NONE;
|
||||
// Gameplay stats: Increment Ice Trap count
|
||||
gSaveContext.sohStats.count[COUNT_ICE_TRAPS]++;
|
||||
return 1;
|
||||
}
|
||||
if (gSaveContext.n64ddFlag && giEntry.getItemId == RG_ICE_TRAP && giEntry.getItemFrom == ITEM_FROM_FREESTANDING) {
|
||||
this->actor.freezeTimer = 30;
|
||||
Player_SetPendingFlag(this, play);
|
||||
Message_StartTextbox(play, 0xF8, NULL);
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
gSaveContext.pendingIceTrapCount++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Show the cutscene for picking up an item. In vanilla, this happens in bombchu bowling alley (because getting bombchus need to show the cutscene)
|
||||
|
Loading…
Reference in New Issue
Block a user