mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 02:27:21 -07:00
Rando: Shuffle Merchants (#1720)
This commit is contained in:
parent
f050ba9ff7
commit
341bc43daf
9 changed files with 133 additions and 1 deletions
|
@ -97,6 +97,8 @@ s32 func_80A3D7C8(void) {
|
|||
return 1;
|
||||
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) {
|
||||
return 2;
|
||||
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS)) && (gBitFlags[2] & gSaveContext.inventory.equipment)){
|
||||
return 1;
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
|
@ -209,6 +211,11 @@ void func_80A3DC44(EnGm* this, PlayState* play) {
|
|||
return;
|
||||
case 1:
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
//Resets "Talked to Medigoron" flag in infTable to restore initial conversation state
|
||||
gSaveContext.infTable[11] &= ~2;
|
||||
}
|
||||
case 2:
|
||||
this->actionFunc = EnGm_ProcessChoiceIndex;
|
||||
default:
|
||||
|
@ -243,8 +250,17 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
|||
Message_ContinueTextbox(play, 0xC8);
|
||||
this->actionFunc = func_80A3DD7C;
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
GiveItemEntryFromActor(&this->actor, play,
|
||||
Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE), 415.0f, 10.0f);
|
||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
this->actionFunc = func_80A3DF00;
|
||||
} else {
|
||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||
this->actionFunc = func_80A3DF00;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1: // no
|
||||
|
@ -260,7 +276,17 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80A3DF60;
|
||||
} else {
|
||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
GiveItemEntryFromActor(&this->actor, play,
|
||||
Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE), 415.0f, 10.0f);
|
||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
}
|
||||
else {
|
||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,15 @@ void func_80A89160(EnJs* this, PlayState* play) {
|
|||
this->actor.parent = NULL;
|
||||
En_Js_SetupAction(this, func_80A8910C);
|
||||
} else {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)) {
|
||||
GiveItemEntryFromActor(&this->actor, play,
|
||||
Randomizer_GetItemFromKnownCheck(RC_WASTELAND_BOMBCHU_SALESMAN, GI_BOMBCHUS_10), 90.0f, 10.0f);
|
||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN);
|
||||
} else {
|
||||
func_8002F434(&this->actor, play, GI_BOMBCHUS_10, 10000.0f, 50.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue