예제 #1
0
        public void HandleOpponentSecretPlayed(string cardId, int from, int turn, bool fromDeck, int otherId)
        {
            LogEvent("OpponentSecretPlayed");
            _game.OpponentSecretCount++;
            if (fromDeck)
            {
                _game.OpponentDeckDiscard(cardId);
            }
            else
            {
                _game.OpponentPlay(cardId, from, turn);
            }
            _game.AddPlayToCurrentGame(PlayType.OpponentSecretPlayed, turn, cardId);

            var isStolenCard = from > 0 && _game.OpponentHandMarks[from - 1] == CardMark.Stolen;

            _game.OpponentSecrets.NewSecretPlayed(otherId, isStolenCard);

            Helper.MainWindow.Overlay.ShowSecrets();
            GameEvents.OnOpponentPlay.Execute(GameV2.GetCardFromId(cardId));
        }