public override void ChooseCardEffect(Card card, Game game, Player choosingPlayer, string description, out BoardChoices.CardPlayInfo cardPlayInfo) { Random rand = new Random(); cardPlayInfo = new BoardChoices.CardPlayInfo(); List <CardTemplate.CardEffectPair> pairs = card.Template.SelectionEvents; if (game.CurState.StateType == GameState.GameStateType.JurySelection) { pairs = card.Template.SelectionEvents; } else if (game.CurState.StateType == GameState.GameStateType.TrialInChief) { pairs = card.Template.TrialEvents; } else if (game.CurState.StateType == GameState.GameStateType.Summation) { pairs = card.Template.SummationEvents; } int idx = rand.Next() % pairs.Count; cardPlayInfo.eventIdx = idx; }
public override void ChooseCardEffect(Card cardToPlay, Game game, Player choosingPlayer, string description, out BoardChoices.CardPlayInfo cardPlayInfo) { ChoiceHandlerDelegator.Instance.TriggerChoice(this, choosingPlayer, new ChooseCardEffectInputHandler(cardToPlay, description)); waitForInput.WaitOne(); cardPlayInfo = new BoardChoices.CardPlayInfo(); if (passedParams != null) { int idx = (int)passedParams[2]; cardPlayInfo.eventIdx = idx; } passedParams = null; }