public void Run(Player owner, GameEvent gameEvent, GameEventArgs eventArgs) { Trigger tri = new Trigger(); int answer = 0; List<OptionPrompt> JiangChiQuestion = new List<OptionPrompt>(); JiangChiQuestion.Add(Prompt.NoChoice); JiangChiQuestion.Add(new OptionPrompt("JiangChi1")); JiangChiQuestion.Add(new OptionPrompt("JiangChi2")); owner.AskForMultipleChoice(new MultipleChoicePrompt("JiangChi"), JiangChiQuestion, out answer); if (answer == 0) { return; } NotifySkillUse(new List<Player>()); if (answer == 1) { owner[Player.DealAdjustment]++; tri = new JiangChi1(owner); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanUseCard, tri); Game.CurrentGame.RegisterTrigger(GameEvent.PlayerCanPlayCard, tri); } else { owner[Sha.AdditionalShaUsable]++; owner[Player.DealAdjustment]--; tri = new JiangChi2(owner); Game.CurrentGame.RegisterTrigger(Sha.PlayerShaTargetValidation, tri); } Trigger triRemoval = new JiangChiRemoval(owner, tri, answer == 1); Game.CurrentGame.RegisterTrigger(GameEvent.PhasePostEnd, triRemoval); }
public TianYiRemoval(Player p, Trigger win, Trigger lose) { Owner = p; winTrigger = win; loseTrigger = lose; }
public ZhuiKongRemoval(Player t, Trigger trigger) { Owner = t; this.trigger = trigger; }
public ShiChouRemoval(Player target, Player source, Trigger protect, Trigger drawCards) { Owner = target; this.source = source; protectTrigger = protect; drawCardsTrigger = drawCards; Priority = int.MaxValue; }
public DawuRemoval(Player p, Trigger trigger) { qixingOwner = p; dawuProtect = trigger; }
public QiaoShuiWinRemoval(Player p, Trigger win) { Owner = p; winTrigger = win; }
public ZhiChiRemoval(Player triggerOwner, Player skillOwner, Trigger trigger) { this.skillOwner = skillOwner; Owner = triggerOwner; protectTrigger = trigger; }
public KuangFengRemoval(Player p, Trigger trigger) { qixingOwner = p; kuangfengDamage = trigger; }
public XianZhenWinRemoval(Player p, Player target, Trigger trigger, Trigger trigger2, Trigger trigger3) { Owner = p; this.trigger = trigger; this.trigger2 = trigger2; this.trigger3 = trigger3; this.target = target; }
public DawuRemoval(Player p, Trigger trigger, List<Player> dawuTargets) { qixingOwner = p; dawuProtect = trigger; this.dawuTargets = dawuTargets; }
public XianZhenLoseRemoval(Player p, Trigger trigger) { Owner = p; this.trigger = trigger; }
public TianYiRemoval(Player p, Trigger lose) { Owner = p; loseTrigger = lose; }
public QianXiEffectRemoval(Player player, Player target, Trigger trigger) { Owner = player; this.target = target; this.trigger = trigger; }
public void UnregisterTrigger(GameEvent gameEvent, Trigger trigger) { if (trigger == null) { return; } if (triggers.ContainsKey(gameEvent)) { Trace.Assert(triggers[gameEvent].Contains(trigger)); triggers[gameEvent].Remove(trigger); } }
public KuangFengRemoval(Player p, Trigger trigger, KuangFeng kuangfeng) { qixingOwner = p; kuangfengDamage = trigger; skill = kuangfeng; }
public void RegisterTrigger(GameEvent gameEvent, Trigger trigger) { if (trigger == null) { return; } if (!triggers.ContainsKey(gameEvent)) { triggers[gameEvent] = new List<Trigger>(); } triggers[gameEvent].Add(trigger); }
public JiangChiRemoval(Player p, Trigger t, bool ChoiceFirst) { Owner = p; trigger = t; isJiangChi1 = ChoiceFirst; }
public DawuRemoval(Player p, Trigger trigger, DaWu dawu) { qixingOwner = p; dawuProtect = trigger; skill = dawu; }
public QiaoShuiRemoval(Player p, Trigger lose) { Owner = p; loseTrigger = lose; }