Ejemplo n.º 1
0
        public void Reset(bool resetStats = true)
        {
            Logger.WriteLine("-------- Reset ---------", "Game");

            ReplayMaker.Reset();
            Player.Reset();
            Opponent.Reset();

            Entities.Clear();
            SavedReplay         = false;
            OpponentSecretCount = 0;
            OpponentSecrets.ClearSecrets();
            NoMatchingDeck = false;

            if (!IsInMenu && resetStats)
            {
                if (CurrentGameMode == GameMode.Ranked)
                {
                    Logger.WriteLine("Resetting gamemode to casual", "Game");
                    CurrentGameMode = GameMode.Casual;
                }
                CurrentGameStats = new GameStats(GameResult.None, "", "")
                {
                    PlayerName = "", OpponentName = "", Region = CurrentRegion
                };
                _gameModeDetectionComplete = false;
            }
            HSLogLines.Clear();
            PowerLog.Clear();

            if (Core.Game != null && Core.Overlay != null)
            {
                Helper.UpdatePlayerCards();
                Helper.UpdateOpponentCards();
                Core.MainWindow.NeedToIncorrectDeckMessage = false;
            }
        }
Ejemplo n.º 2
0
 public static void AddHSLogLine(string logLine)
 {
     HSLogLines.Add(logLine);
 }