mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Port Dampe behavior to vanilla (#1364)
* Port Dampe behavior to vanilla * Add Dampe winning to Enhanced preset
This commit is contained in:
parent
b18cc9d628
commit
e97ba37a5e
4 changed files with 20 additions and 7 deletions
|
@ -408,7 +408,7 @@ s32 EnTk_ChooseReward(EnTk* this) {
|
|||
f32 luck;
|
||||
s32 reward;
|
||||
|
||||
if (gSaveContext.n64ddFlag && !Flags_GetCollectible(gGlobalCtx, 0x1F) && this->heartPieceSpawned == 0) {
|
||||
if ((gSaveContext.n64ddFlag || CVar_GetS32("gDampeWin", 0)) && !Flags_GetCollectible(gGlobalCtx, 0x1F) && this->heartPieceSpawned == 0) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
@ -604,7 +604,7 @@ void EnTk_Dig(EnTk* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->rewardTimer = 0;
|
||||
|
||||
if (this->validDigHere == 1 || gSaveContext.n64ddFlag) {
|
||||
if (this->validDigHere == 1 || gSaveContext.n64ddFlag || CVar_GetS32("gDampeWin", 0)) {
|
||||
rewardOrigin.x = 0.0f;
|
||||
rewardOrigin.y = 0.0f;
|
||||
rewardOrigin.z = -40.0f;
|
||||
|
@ -620,21 +620,21 @@ void EnTk_Dig(EnTk* this, GlobalContext* globalCtx) {
|
|||
|
||||
// merging in dampe tour fix seems messy, so i'm just wrapping this whole thing
|
||||
// in an n64dd check for now
|
||||
if(gSaveContext.n64ddFlag) {
|
||||
if (gSaveContext.n64ddFlag || CVar_GetS32("gDampeWin", 0)) {
|
||||
if (this->currentReward == 3) {
|
||||
/*
|
||||
* Upgrade the purple rupee reward to the heart piece if this
|
||||
* is the first grand prize dig.
|
||||
*/
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x1000) && !gSaveContext.n64ddFlag) {
|
||||
if (!(gSaveContext.itemGetInf[1] & 0x1000) && !(gSaveContext.n64ddFlag || CVar_GetS32("gDampeWin", 0))) {
|
||||
gSaveContext.itemGetInf[1] |= 0x1000;
|
||||
this->currentReward = 4;
|
||||
} else if (gSaveContext.n64ddFlag && !Flags_GetCollectible(gGlobalCtx, 0x1F) && this->heartPieceSpawned == 0) {
|
||||
} else if ((gSaveContext.n64ddFlag || CVar_GetS32("gDampeWin", 0)) && !Flags_GetCollectible(gGlobalCtx, 0x1F) && this->heartPieceSpawned == 0) {
|
||||
this->currentReward = 4;
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.n64ddFlag && this->currentReward == 4) {
|
||||
if ((gSaveContext.n64ddFlag || CVar_GetS32("gDampeWin", 0)) && this->currentReward == 4) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ITEM00, rewardPos.x, rewardPos.y, rewardPos.z, 0,
|
||||
0, 0, 0x1F06);
|
||||
this->heartPieceSpawned = 1;
|
||||
|
@ -670,7 +670,7 @@ void EnTk_Dig(EnTk* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->skelAnime.curFrame >= 32.0f && this->rewardTimer == 10) {
|
||||
/* Play a reward sound shortly after digging */
|
||||
if (!gSaveContext.n64ddFlag && this->validDigHere == 0) {
|
||||
if (!(gSaveContext.n64ddFlag || CVar_GetS32("gDampeWin", 0)) && this->validDigHere == 0) {
|
||||
/* Bad dig spot */
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_SY_ERROR);
|
||||
} else if (this->currentReward == 4) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue