void Run1(Player Owner, GameEvent gameEvent, GameEventArgs eventArgs) { MultipleChoicePrompt prompt; List<OptionPrompt> options = new List<OptionPrompt>(); OptionPrompt option1 = new OptionPrompt("MouKuiMoPai"); int i = 0; foreach (var target in eventArgs.Targets) { options.Clear(); options.Add(OptionPrompt.NoChoice); options.Add(option1); options.Add(new OptionPrompt("MouKuiQiZhi", target)); bool isNaked = target.HandCards().Count + target.Equipments().Count == 0; prompt = isNaked ? new MultipleChoicePrompt("MouKuiDrawCardOnly") : new MultipleChoicePrompt("MouKui"); int answer = 0; Owner.AskForMultipleChoice(prompt, isNaked ? OptionPrompt.YesNoChoices : options, out answer); if (answer == 0) { i++; continue; } MouKuiEffect = 0; NotifySkillUse(); if (answer == 1) { Game.CurrentGame.DrawCards(Owner, 1); } else { Card theCard = Game.CurrentGame.SelectACardFrom(target, Owner, new CardChoicePrompt("MouKui", target, Owner), "QiPaiDui"); Game.CurrentGame.HandleCardDiscard(target, new List<Card>() { theCard }); } eventArgs.ReadonlyCard[MouKuiCheck[target]] |= (1 << i); i++; } }
public void NotifyMultipleChoiceResult(Player p, OptionPrompt answer) { Application.Current.Dispatcher.Invoke((ThreadStart)delegate() { gameLogs.AppendMultipleChoiceLog(p, PromptFormatter.Format(answer)); }); }
public void NotifyMultipleChoiceResult(Player p, OptionPrompt answer) { }
public void NotifyMultipleChoiceResult(Player p, OptionPrompt answer) { if (ViewModelBase.IsDetached) return; Application.Current.Dispatcher.Invoke((ThreadStart)delegate() { gameLogs.AppendMultipleChoiceLog(p, LogFormatter.Translate(answer)); }); }
public void NotifyMultipleChoiceResult(Player p, OptionPrompt answer) { }