Exemple #1
0
        public void HandlePlayerMulligan(string cardId)
        {
            if (string.IsNullOrEmpty(cardId))
            {
                return;
            }
            LogEvent("PlayerMulligan", cardId);
            TurnTimer.Instance.MulliganDone(ActivePlayer.Player);
            _game.PlayerMulligan(cardId);

            //without this update call the overlay deck does not update properly after having Card implement INotifyPropertyChanged
            Helper.MainWindow.Overlay.ListViewPlayer.Items.Refresh();
            Helper.MainWindow.PlayerWindow.ListViewPlayer.Items.Refresh();

            _game.AddPlayToCurrentGame(PlayType.PlayerMulligan, 0, cardId);
            GameEvents.OnPlayerMulligan.Execute(GameV2.GetCardFromId(cardId));
        }