mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-10-21 02:44:46 -04:00
Fix defeating Ganon when wincon is not Defeat Ganon warping outside Hyrule Castle (#7404)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/ShipInit.hpp"
|
||||
#include "soh/Enhancements/randomizer/SeedContext.h"
|
||||
|
||||
extern "C" {
|
||||
#include "z64save.h"
|
||||
@@ -23,7 +24,9 @@ static void RegisterBossDefeatTimestamps() {
|
||||
BOSS_DEFEAT_TIMESTAMP(ACTOR_BOSS_GANON, TIMESTAMP_DEFEAT_GANONDORF);
|
||||
COND_ID_HOOK(OnBossDefeat, ACTOR_BOSS_GANON2, true, [](void* refActor) {
|
||||
gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = static_cast<u32>(GAMEPLAYSTAT_TOTAL_TIME);
|
||||
gSaveContext.ship.stats.gameComplete = true;
|
||||
if (!IS_RANDO || RAND_GET_OPTION(RSK_WINCON).Is(RO_WINCON_DEFEAT_GANON)) {
|
||||
gSaveContext.ship.stats.gameComplete = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ char* GameplayStats_GetCurrentTime();
|
||||
? (!gSaveContext.ship.stats.firstInput \
|
||||
? 0 \
|
||||
: ((GetUnixTimestamp() - gSaveContext.ship.stats.firstInput) / 100)) \
|
||||
: (gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] \
|
||||
? gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] \
|
||||
: (gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] \
|
||||
? gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] \
|
||||
: (gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] \
|
||||
? gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] \
|
||||
: (gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] \
|
||||
? gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] \
|
||||
: gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TIMESPLITS_COMPLETED]))) \
|
||||
: (gSaveContext.ship.stats.playTimer / 2 + gSaveContext.ship.stats.pauseTimer / 3))
|
||||
#define CURRENT_MODE_TIMER \
|
||||
|
||||
@@ -1872,7 +1872,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_GANONS_TOWER);
|
||||
randomizerQueuedChecks.push(RC_GANON);
|
||||
CheckTriggers();
|
||||
gPlayState->nextEntranceIndex = ENTR_OUTSIDE_GANONS_CASTLE_1_2;
|
||||
gPlayState->nextEntranceIndex = Entrance_OverrideNextIndex(ENTR_OUTSIDE_GANONS_CASTLE_1_2);
|
||||
gPlayState->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gPlayState->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE_SLOW;
|
||||
|
||||
Reference in New Issue
Block a user