void Run(Player Owner, GameEvent gameEvent, GameEventArgs eventArgs) { int answer = 0; List<OptionPrompt> JiLeiQuestion = new List<OptionPrompt>(); JiLeiQuestion.Add(new OptionPrompt("JiBen")); JiLeiQuestion.Add(new OptionPrompt("JinNang")); JiLeiQuestion.Add(new OptionPrompt("ZhuangBei")); JiLeiQuestion.Add(Prompt.NoChoice); if (Game.CurrentGame.UiProxies[Owner].AskForMultipleChoice( new MultipleChoicePrompt("JiLei", eventArgs.Source), JiLeiQuestion, out answer)) { Trace.Assert(answer >= 0 && answer <= 3); if (answer != 3) { NotifySkillUse(new List<Player>()); eventArgs.Source[JiLeiInEffect] = 1; JiLeiImplementation trigger = new JiLeiImplementation(eventArgs.Source, answer); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanDiscardCard, trigger); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanUseCard, trigger); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanPlayCard, trigger); JiLeiRemoval trigger2 = new JiLeiRemoval(eventArgs.Source, trigger); Game.CurrentGame.RegisterTrigger(GameEvent.PhaseEndEvents[TurnPhase.End], trigger2); Game.CurrentGame.NotificationProxy.NotifyLogEvent(new LogEvent("JiLei", eventArgs.Source, JiLeiQuestion[answer]), new List<Player>() { Owner, eventArgs.Source }); } } }
void Run(Player Owner, GameEvent gameEvent, GameEventArgs eventArgs) { int answer = 0; List <OptionPrompt> JiLeiQuestion = new List <OptionPrompt>(); JiLeiQuestion.Add(new OptionPrompt("JiBen")); JiLeiQuestion.Add(new OptionPrompt("JinNang")); JiLeiQuestion.Add(new OptionPrompt("ZhuangBei")); JiLeiQuestion.Add(Prompt.NoChoice); if (Game.CurrentGame.UiProxies[Owner].AskForMultipleChoice( new MultipleChoicePrompt("JiLei", eventArgs.Source), JiLeiQuestion, out answer)) { Trace.Assert(answer >= 0 && answer <= 3); if (answer != 3) { NotifySkillUse(new List <Player>()); eventArgs.Source[JiLeiInEffect] = 1; JiLeiImplementation trigger = new JiLeiImplementation(eventArgs.Source, answer); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanDiscardCard, trigger); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanUseCard, trigger); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanPlayCard, trigger); JiLeiRemoval trigger2 = new JiLeiRemoval(eventArgs.Source, trigger); Game.CurrentGame.RegisterTrigger(GameEvent.PhasePostEnd, trigger2); Game.CurrentGame.NotificationProxy.NotifyLogEvent(new LogEvent("JiLei", eventArgs.Source, JiLeiQuestion[answer]), new List <Player>() { Owner, eventArgs.Source }); } } }