Example #1
0
        public HuaShen()
        {
            acquiredSkill = null;
            var trigger = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) =>
            {
                AcquireHeroCard(p, HeroTag);
                AcquireHeroCard(p, HeroTag);
                Run(p, e, a);
            },
                TriggerCondition.OwnerIsSource
                )
            {
                AskForConfirmation = false
            };
            var trigger2 = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) => { return(Game.CurrentGame.Decks[Owner, HuaShenDeck].Count > 0); },
                Run,
                TriggerCondition.OwnerIsSource
                );

            Triggers.Add(GameEvent.PlayerGameStartAction, trigger);
            Triggers.Add(GameEvent.PhaseProceedEvents[TurnPhase.BeforeStart], trigger2);
            Triggers.Add(GameEvent.PhasePostEnd, trigger2);

            IsAutoInvoked = false;
            DeckCleanup.Add(HuaShenDeck);
        }
Example #2
0
        public ZuiXiang()
        {
            var trigger = new AutoNotifyPassiveSkillTrigger(
                this,
                Run,
                TriggerCondition.OwnerIsSource
                )
            {
                AskForConfirmation = false, IsAutoNotify = false
            };
            var trigger2 = new AutoNotifyPassiveSkillTrigger(
                this,
                CardUseStopper,
                TriggerCondition.OwnerIsSource
                )
            {
                AskForConfirmation = false, IsAutoNotify = false
            };
            var trigger3 = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) => { return(a.ReadonlyCard != null); },
                CardEffectStopper,
                TriggerCondition.OwnerIsTarget
                )
            {
                AskForConfirmation = false, IsAutoNotify = false
            };

            Triggers.Add(GameEvent.PhaseBeginEvents[TurnPhase.Start], trigger);
            Triggers.Add(GameEvent.PlayerCanUseCard, trigger2);
            Triggers.Add(GameEvent.PlayerCanPlayCard, trigger2);
            Triggers.Add(GameEvent.CardUsageTargetValidating, trigger3);
            IsSingleUse = true;
            DeckCleanup.Add(ZuiXiangDeck);
        }
Example #3
0
        public TunTian()
        {
            var trigger = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) => { return(Game.CurrentGame.PhasesOwner != p); },
                Run,
                TriggerCondition.OwnerIsSource
                )
            {
                IsAutoNotify = false
            };

            Triggers.Add(GameEvent.CardsLost, trigger);
            var trigger2 = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) => { var args = a as AdjustmentEventArgs; args.AdjustmentAmount = -Game.CurrentGame.Decks[p, TianDeck].Count; },
                TriggerCondition.OwnerIsSource
                )
            {
                IsAutoNotify = false, AskForConfirmation = false
            };

            Triggers.Add(GameEvent.PlayerDistanceAdjustment, trigger2);
            IsAutoInvoked = true;
            DeckCleanup.Add(TianDeck);
        }
Example #4
0
        public QiXing()
        {
            var trigger = new AutoNotifyPassiveSkillTrigger(
                this,
                GameStart,
                TriggerCondition.OwnerIsSource
                )
            {
                AskForConfirmation = false
            };
            var trigger2 = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) => { return(Game.CurrentGame.Decks[Owner, QiXing.QiXingDeck].Count > 0); },
                AfterDraw,
                TriggerCondition.OwnerIsSource
                );
            var trigger3 = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) => { p[Player.DealAdjustment] += 7; },
                TriggerCondition.OwnerIsSource
                )
            {
                AskForConfirmation = false, IsAutoNotify = false
            };

            Triggers.Add(GameEvent.PlayerGameStartAction, trigger);
            Triggers.Add(GameEvent.PhaseEndEvents[TurnPhase.Draw], trigger2);
            Triggers.Add(GameEvent.StartGameDeal, trigger3);
            IsAutoInvoked = false;
            DeckCleanup.Add(QiXingDeck);
        }
Example #5
0
        public QuanJi()
        {
            var trigger = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) =>
            {
                return(Game.CurrentGame.Decks[p, QuanDeck].Count > 0);
            },
                (p, e, a) =>
            {
                var args = a as AdjustmentEventArgs;
                args.AdjustmentAmount += Game.CurrentGame.Decks[p, QuanDeck].Count;
            },
                TriggerCondition.OwnerIsSource
                )
            {
                AskForConfirmation = false, IsAutoNotify = false
            };

            var trigger2 = new AutoNotifyPassiveSkillTrigger(
                this,
                Run,
                TriggerCondition.OwnerIsTarget
                )
            {
                AskForConfirmation = false
            };

            Triggers.Add(GameEvent.PlayerHandCardCapacityAdjustment, trigger);
            Triggers.Add(GameEvent.AfterDamageInflicted, trigger2);
            IsAutoInvoked = true;
            DeckCleanup.Add(QuanDeck);
        }
Example #6
0
 public YinLing()
 {
     MaxCards   = 1;
     MinCards   = 1;
     MaxPlayers = 1;
     MinPlayers = 1;
     Discarding = true;
     DeckCleanup.Add(JinDeck);
 }
Example #7
0
 public ChunLao()
 {
     MaxCards   = 1;
     MinCards   = 1;
     MaxPlayers = 0;
     Helper.OtherDecksUsed.Add(ChunDeck);
     Discarding         = true;
     LinkedPassiveSkill = new ChunLaoPassiveSkill();
     (LinkedPassiveSkill as ChunLaoPassiveSkill).ParentSkill = this;
     OwnerOnly = false;
     DeckCleanup.Add(ChunDeck);
 }
Example #8
0
        public XingWu()
        {
            var tagClear = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) => { p[CardSuitUsed] = 0; },
                TriggerCondition.OwnerIsSource
                )
            {
                IsAutoNotify = false, AskForConfirmation = false
            };

            Triggers.Add(GameEvent.PhaseBeforeStart, tagClear);

            var cardUsed = new AutoNotifyPassiveSkillTrigger(
                this,
                (p, e, a) =>
            {
                var card         = a.ReadonlyCard;
                p[CardSuitUsed] |= 1 << (int)card.SuitColor;
            },
                TriggerCondition.OwnerIsSource
                )
            {
                IsAutoNotify = false, AskForConfirmation = false
            };

            Triggers.Add(GameEvent.PlayerUsedCard, cardUsed);

            var trigger = new AutoNotifyUsagePassiveSkillTrigger(
                this,
                (p, e, a) => { return(p.HandCards().Count > 0); },
                (p, e, a, cards, players) =>
            {
                NotifySkillUse();
                Game.CurrentGame.HandleCardTransfer(p, p, XingWuDeck, cards, HeroTag);
                Game.CurrentGame.PlayerAcquiredCard(p, cards);
                List <Card> XingWuCards = Game.CurrentGame.Decks[p, XingWuDeck];
                if (XingWuCards.Count >= 3)
                {
                    Game.CurrentGame.HandleCardDiscard(p, XingWuCards);
                    List <Player> aPlayers = Game.CurrentGame.AlivePlayers;
                    if (!aPlayers.Any(pl => pl.IsMale))
                    {
                        return;
                    }
                    ISkill skill;
                    List <Card> nCards;
                    List <Player> nPlayers;
                    if (!p.AskForCardUsage(new CardUsagePrompt("XingWuChoicePlayer"), new XingWuChoicePlayer(), out skill, out nCards, out nPlayers))
                    {
                        nPlayers.Add((from m in aPlayers where m.IsMale select m).First());
                    }
                    Player target = nPlayers.First();
                    NotifySkillUse(nPlayers);
                    Game.CurrentGame.DoDamage(p, target, 2, DamageElement.None, null, null);
                    Game.CurrentGame.HandleCardDiscard(target, target.Equipments());
                }
            },
                TriggerCondition.OwnerIsSource,
                new XingWuVerifier()
                )
            {
                AskForConfirmation = false, IsAutoNotify = false
            };

            Triggers.Add(GameEvent.PhaseBeginEvents[TurnPhase.Discard], trigger);
            IsAutoInvoked = null;
            DeckCleanup.Add(XingWuDeck);
        }