/* * CharSelect segment is only valid when: * 1. The lobby is locked. * & 2. Game is in the character selection screen. */ public SegmentStatus CheckStatus(SpelunkyHooks spelunky) { // Do not do game save checks in the splash screen as the save file may not be reloaded yet if (spelunky.CurrentLobbyType != LobbyType.Tutorial && spelunky.CurrentState != SpelunkyState.SplashScreen) { return(new SegmentStatus() { Type = SegmentStatusType.ERROR, Message = "The game save must be reset to lock the lobby." }); } else if (spelunky.CurrentState != SpelunkyState.CharacterSelect) { return(new SegmentStatus() { Type = SegmentStatusType.INFO, Message = "Waiting for character selection screen." }); } else { return(new SegmentStatus() { Type = SegmentStatusType.INFO, Message = "Waiting for character selection." }); } }
public SegmentStatus CheckStatus(SpelunkyHooks spelunky) { return(new SegmentStatus() { Type = SegmentStatusType.INFO, Message = "Waiting for Olmec completion." }); }
public bool Cycle(SpelunkyHooks spelunky) { if (CheckStatus(spelunky).Type == SegmentStatusType.ERROR) { return(false); } var lobbyType = spelunky.CurrentLobbyType; bool shouldSplit = LastLobbyType == LobbyType.Breaking && lobbyType == LobbyType.DoorOpenNoGem; LastLobbyType = lobbyType; return(shouldSplit); }
public bool Cycle(SpelunkyHooks spelunky) { var chars = spelunky.CharactersState; if (CheckStatus(chars, spelunky.PlayCount).Type == SegmentStatusType.ERROR) { return(false); } else if (chars.NumUnlockedCharacters >= TargetUnlockCount) { return(true); } else { return(false); } }
public bool Cycle(SpelunkyHooks spelunky) { var journal = spelunky.JournalState; if (CheckStatus(journal).Type == SegmentStatusType.ERROR) { return(false); } else if (journal.NumUnlockedEntries >= TargetEntryUnlockCount) { return(true); } else { return(false); } }
public bool Cycle(SpelunkyHooks spelunky) { if (CheckStatus(spelunky).Type == SegmentStatusType.ERROR) { return(false); } var level = spelunky.CurrentLevel; var state = spelunky.CurrentState; bool shouldSplit = spelunky.TunnelManChapter == TunnelManChapter.EmptyCompleted && spelunky.CurrentState == SpelunkyState.VictoryCutscene && LastLevel == SpelunkyLevel.L4_4 && level == SpelunkyLevel.L4_4; LastLevel = level; return(shouldSplit); }
public bool Cycle(SpelunkyHooks spelunky) { if (CheckStatus(spelunky).Type == SegmentStatusType.ERROR) { return(false); } var chapter = spelunky.TunnelManChapter; var remaining = spelunky.TunnelManRemaining; bool shouldSplit = LastChapter == BeforeChapter && LastRemaining == BeforeRemaining && chapter == AfterChapter && remaining == AfterRemaining; LastChapter = chapter; LastRemaining = remaining; return(shouldSplit); }
public bool Cycle(SpelunkyHooks spelunky) { if (CheckStatus(spelunky).Type == SegmentStatusType.ERROR) { return(false); } var state = spelunky.CurrentState; var charSelectCountdown = spelunky.CharSelectCountdown; bool shouldSplit = LastState == SpelunkyState.CharacterSelect && LastCharSelectCountdown == 0 && state == SpelunkyState.CharacterSelect && charSelectCountdown != 0; LastState = state; LastCharSelectCountdown = charSelectCountdown; return(shouldSplit); }
/* * Tutorial segment is only valid when the tutorial is locked or breaking. */ public SegmentStatus CheckStatus(SpelunkyHooks spelunky) { if (LastLobbyType == LobbyType.DoorOpenNoGem && spelunky.CurrentLobbyType == LobbyType.DoorOpenNoGem) { return(new SegmentStatus() { Type = SegmentStatusType.ERROR, Message = "Lobby must be locked during the tutorial segment." }); } else { return(new SegmentStatus() { Type = SegmentStatusType.INFO, Message = "Waiting for tutorial completion." }); } }
/* * A tunnel man segment is only valid when: * 1. The current TM chapter <= BeforeChapter. * 2. If the current TM chapter == BeforeChapter, chapter remainder >= BeforeRemaining */ public SegmentStatus CheckStatus(SpelunkyHooks spelunky) { var chapter = spelunky.TunnelManChapter; if ((chapter > BeforeChapter && LastChapter > BeforeChapter) || ((chapter == BeforeChapter && LastChapter == BeforeChapter) && (spelunky.TunnelManRemaining < BeforeRemaining && LastRemaining < BeforeRemaining))) { return(new SegmentStatus() { Type = SegmentStatusType.ERROR, Message = $"Tunnel Man has already received {Item} between the {Area1} and {Area2}." }); } else { return(new SegmentStatus() { Type = SegmentStatusType.INFO, Message = $"Waiting for Tunnel Man to receive {Item} between the {Area1} and {Area2}." }); } }
public SegmentStatus CheckStatus(SpelunkyHooks spelunky) { return(CheckStatus(spelunky.CharactersState, spelunky.PlayCount)); }
public SegmentStatus CheckStatus(SpelunkyHooks spelunky) { return(CheckStatus(spelunky.JournalState)); }