Пример #1
0
 public static Trigger FriendlySpellTargetingMe(ISimpleTask task)
 {
     return(new TriggerBuilder().Create()
            .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
            .ApplyConditions(RelaCondition.IsOther(SelfCondition.IsSpell), RelaCondition.IsTargetingMe, RelaCondition.IsFriendly)
            .FastExecution(true)
            .TriggerEffect(GameTag.JUST_PLAYED, 1)
            .SingleTask(task)
            .Build());
 }
Пример #2
0
        //public static Enchant CthunAttack(int amount)
        //{
        //    return new Enchant
        //    {
        //        TurnsActive = -1,
        //        EnableConditions = new List<SelfCondition>
        //        {
        //            SelfCondition.IsInZone(Zone.SETASIDE, Zone.HAND, Zone.PLAY),
        //            SelfCondition.IsNotSilenced,
        //        },
        //        Effects = new Dictionary<GameTag, int>
        //        {
        //            [GameTag.ATK] = amount,
        //        },
        //    };
        //}

        //public static Enchant CthunHealth(int amount)
        //{
        //    return new Enchant
        //    {
        //        TurnsActive = -1,
        //        EnableConditions = new List<SelfCondition>
        //        {
        //            SelfCondition.IsInZone(Zone.SETASIDE, Zone.HAND, Zone.PLAY),
        //            SelfCondition.IsNotSilenced,
        //        },
        //        Effects = new Dictionary<GameTag, int>
        //        {
        //            [GameTag.HEALTH] = amount
        //        },
        //        // Health Retention task ...
        //        RemovalTask = new HealthRetentionTask(amount, EntityType.SOURCE)
        //    };
        //}

        public static Enchant OnlyOpponentTurn(GameTag tag, int amount, bool oneTurnActive = false)
        {
            return(new Enchant
            {
                TurnsActive = oneTurnActive ? 0 : -1,
                EnableConditions = SelfBuffConditions,
                ApplyConditions = new List <RelaCondition> {
                    RelaCondition.IsMe(SelfCondition.IsNotCurrentPlayer)
                },
                Effects = new Dictionary <GameTag, int>
                {
                    [tag] = amount,
                }
            });
        }
Пример #3
0
        private static void Mage(IDictionary <string, List <Enchantment> > cards)
        {
            // ------------------------------------------- SPELL - MAGE
            // [BRM_003] Dragon's Breath - COST:5
            // - Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: Deal $4 damage. Costs (1) less for each minion that died this turn. *spelldmg
            // --------------------------------------------------------
            // PlayReq:
            // - REQ_TARGET_TO_PLAY = 0
            // --------------------------------------------------------
            cards.Add("BRM_003", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.SELF,
                    Activation = EnchantmentActivation.HAND_ZONE,
                    Enchant    = Auras.CostFunc(
                        owner => - (owner.Controller.NumFriendlyMinionsThatDiedThisTurn +
                                    owner.Controller.Opponent.NumFriendlyMinionsThatDiedThisTurn))
                },
                new Enchantment
                {
                    Activation = EnchantmentActivation.SPELL,
                    SingleTask = new DamageTask(4, EntityType.TARGET, true)
                }
            });

            // ------------------------------------------ MINION - MAGE
            // [BRM_002] Flamewaker - COST:3 [ATK:2/HP:4]
            // - Set: fp2, Rarity: rare
            // --------------------------------------------------------
            // Text: After you cast a spell, deal 2 damage randomly split among all enemies.
            // --------------------------------------------------------
            cards.Add("BRM_002", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.GRAVEYARD_AND_SECRET,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
                                 .ApplyConditions(RelaCondition.IsOther(SelfCondition.IsSpell))
                                 .TriggerEffect(GameTag.JUST_PLAYED, -1)
                                 .SingleTask(new EnqueueTask(2, ComplexTask.DamageRandomTargets(1, EntityType.ENEMIES, 1)))
                                 .Build()
                }
            });
        }
Пример #4
0
        private static void Warlock(IDictionary <string, List <Enchantment> > cards)
        {
            // ---------------------------------------- SPELL - WARLOCK
            // [BRM_005] Demonwrath - COST:3
            // - Set: fp2, Rarity: rare
            // --------------------------------------------------------
            // Text: Deal $2 damage to all non-Demon minions. *spelldmg
            // --------------------------------------------------------
            // GameTag:
            // - AFFECTED_BY_SPELL_POWER = 1
            // --------------------------------------------------------
            cards.Add("BRM_005", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.SPELL,
                    SingleTask = ComplexTask.Create(
                        new IncludeTask(EntityType.ALLMINIONS),
                        new FilterStackTask(SelfCondition.IsNotRace(Race.DEMON)),
                        new DamageTask(2, EntityType.STACK, true))
                },
            });

            // --------------------------------------- MINION - WARLOCK
            // [BRM_006] Imp Gang Boss - COST:3 [ATK:2/HP:4]
            // - Race: demon, Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: Whenever this minion takes damage, summon a 1/1 Imp.
            // --------------------------------------------------------
            cards.Add("BRM_006", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.SELF,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
                                 .ApplyConditions(RelaCondition.IsOther(SelfCondition.IsTagValue(GameTag.TO_BE_DESTROYED, 0)))
                                 .TriggerEffect(GameTag.DAMAGE, 1)
                                 .SingleTask(new SummonTask("BRM_006t", SummonSide.RIGHT))
                                 .Build()
                }
            });
        }
Пример #5
0
 public static Enchant TillTagChangeActive(GameTag changeTriggerTag, SelfCondition applyCondiction, GameTag tag, int value, Func <object, int> func = null, bool oneTurnActive = false, ISimpleTask removalTask = null)
 {
     return(new Enchant()
     {
         TurnsActive = oneTurnActive ? 0 : -1,
         RemoveTriggerTags =
         {
             changeTriggerTag
         },
         ApplyConditions =
         {
             RelaCondition.IsOther(applyCondiction)
         },
         Effects = new Dictionary <GameTag, int>
         {
             [tag] = value
         },
         FixedValueFunc = func,
         RemovalTask = removalTask
     });
 }
Пример #6
0
        private static void Warrior(IDictionary <string, List <Enchantment> > cards)
        {
            // ---------------------------------------- SPELL - WARRIOR
            // [BRM_015] Revenge - COST:2
            // - Set: fp2, Rarity: rare
            // --------------------------------------------------------
            // Text: Deal $1 damage to all minions. If you have 12 or less Health, deal $3 damage instead. *spelldmg
            // --------------------------------------------------------
            cards.Add("BRM_015", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.SPELL,
                    SingleTask = ComplexTask.Create(
                        new ConditionTask(EntityType.HERO, SelfCondition.IsHealth(12, RelaSign.LEQ))),
                },
            });

            // --------------------------------------- MINION - WARRIOR
            // [BRM_016] Axe Flinger - COST:4 [ATK:2/HP:5]
            // - Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: Whenever this minion takes damage, deal 2 damage to the enemy hero.
            // --------------------------------------------------------
            cards.Add("BRM_016", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.SELF,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
                                 .ApplyConditions(RelaCondition.IsOther(SelfCondition.IsTagValue(GameTag.TO_BE_DESTROYED, 0)))
                                 .TriggerEffect(GameTag.DAMAGE, 1)
                                 .SingleTask(new DamageTask(2, EntityType.OP_HERO))
                                 .Build()
                }
            });
        }
Пример #7
0
 public ConditionTask(EntityType entityType, params SelfCondition[] selfConditions)
 {
     SelfConditions = selfConditions;
     RelaConditions = new RelaCondition[] { };
     Type           = entityType;
 }
Пример #8
0
        private static void Neutral(IDictionary <string, List <Enchantment> > cards)
        {
            // --------------------------------------- MINION - NEUTRAL
            // [BRM_019] Grim Patron - COST:5 [ATK:3/HP:3]
            // - Set: fp2, Rarity: rare
            // --------------------------------------------------------
            // Text: Whenever this minion survives damage, summon another Grim Patron.
            // --------------------------------------------------------
            cards.Add("BRM_019", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.SELF,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
                                 .ApplyConditions(RelaCondition.IsOther(SelfCondition.IsTagValue(GameTag.TO_BE_DESTROYED, 0)))
                                 .TriggerEffect(GameTag.DAMAGE, 1)
                                 .SingleTask(new SummonTask("BRM_019", SummonSide.RIGHT))
                                 .Build()
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_020] Dragonkin Sorcerer - COST:4 [ATK:3/HP:5]
            // - Race: dragon, Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: Whenever <b>you</b> target this minion with a spell, gain +1/+1.
            // --------------------------------------------------------
            cards.Add("BRM_020", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.HAND,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = Triggers.FriendlySpellTargetingMe(new BuffTask(Buffs.AttackHealth(1), EntityType.SOURCE))
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_022] Dragon Egg - COST:1 [ATK:0/HP:2]
            // - Set: fp2, Rarity: rare
            // --------------------------------------------------------
            // Text: Whenever this minion takes damage, summon a 2/1 Whelp.
            // --------------------------------------------------------
            cards.Add("BRM_022", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.SELF,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
                                 .TriggerEffect(GameTag.DAMAGE, 1)
                                 .SingleTask(new SummonTask("BRM_004t", SummonSide.RIGHT))
                                 .Build()
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_024] Drakonid Crusher - COST:6 [ATK:6/HP:6]
            // - Race: dragon, Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> If your opponent has 15 or less Health, gain +3/+3.
            // --------------------------------------------------------
            // GameTag:
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("BRM_024", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = ComplexTask.Create(
                        new ConditionTask(EntityType.OP_HERO, SelfCondition.IsHealth(15, RelaSign.LEQ)),
                        new FlagTask(true, new BuffTask(Buffs.AttackHealth(2), EntityType.SOURCE)))
                },
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_025] Volcanic Drake - COST:6 [ATK:6/HP:4]
            // - Race: dragon, Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: Costs (1) less for each minion that died this turn.
            // --------------------------------------------------------
            cards.Add("BRM_025", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.SELF,
                    Activation = EnchantmentActivation.HAND_ZONE,
                    Enchant    = Auras.CostFunc(
                        owner => - (owner.Controller.NumFriendlyMinionsThatDiedThisTurn +
                                    owner.Controller.Opponent.NumFriendlyMinionsThatDiedThisTurn))
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_026] Hungry Dragon - COST:4 [ATK:5/HP:6]
            // - Race: dragon, Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> Summon a random 1-Cost minion for your opponent.
            // --------------------------------------------------------
            // GameTag:
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("BRM_026", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = ComplexTask.Create(
                        new RandomMinionTask(GameTag.COST, 1),
                        new SummonOpTask()),
                },
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_027] Majordomo Executus - COST:9 [ATK:9/HP:7]
            // - Set: fp2, Rarity: legendary
            // --------------------------------------------------------
            // Text: <b>Deathrattle:</b> Replace your hero with Ragnaros, the Firelord.
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - DEATHRATTLE = 1
            // --------------------------------------------------------
            cards.Add("BRM_027", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.DEATHRATTLE,
                    SingleTask = new ReplaceHeroTask("BRM_027h", "BRM_027p"),
                },
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_028] Emperor Thaurissan - COST:6 [ATK:5/HP:5]
            // - Set: fp2, Rarity: legendary
            // --------------------------------------------------------
            // Text: At the end of your turn, reduce the Cost of cards in your hand by (1).
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // --------------------------------------------------------
            cards.Add("BRM_028", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.CONTROLLER,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
                                 .TriggerEffect(GameTag.TURN_START, -1)
                                 .SingleTask(new BuffTask(Buffs.Cost(-1), EntityType.HAND))
                                 .Build()
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_029] Rend Blackhand - COST:7 [ATK:8/HP:4]
            // - Set: fp2, Rarity: legendary
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> If you're holding a Dragon, destroy a <b>Legendary</b> minion.
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - BATTLECRY = 1
            // --------------------------------------------------------
            // PlayReq:
            // - REQ_MINION_TARGET = 0
            // - REQ_TARGET_IF_AVAILABLE_AND_DRAGON_IN_HAND = 0
            // - REQ_LEGENDARY_TARGET = 0
            // --------------------------------------------------------
            cards.Add("BRM_029", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = new DestroyTask(EntityType.TARGET)
                },
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_030] Nefarian - COST:9 [ATK:8/HP:8]
            // - Race: dragon, Set: fp2, Rarity: legendary
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> Add 2 random spells to your hand <i>(from your opponent's class)</i>.
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("BRM_030", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    SingleTask = new EnqueueTask(2, ComplexTask.Create(
                                                     new RandomCardTask(EntityType.OP_HERO),
                                                     new AddStackTo(EntityType.HAND))),
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_031] Chromaggus - COST:8 [ATK:6/HP:8]
            // - Race: dragon, Set: fp2, Rarity: legendary
            // --------------------------------------------------------
            // Text: Whenever you draw a card, put another copy into your hand.
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // --------------------------------------------------------
            cards.Add("BRM_031", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.CONTROLLER,
                    Activation = EnchantmentActivation.BOARD_ZONE,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsNotDead, SelfCondition.IsNotSilenced)
                                 .TriggerEffect(GameTag.LAST_CARD_DRAWN, 0)
                                 .SingleTask(ComplexTask.Create(
                                                 new IncludeTask(EntityType.SOURCE),
                                                 new FuncPlayablesTask(p =>
                    {
                        Controller controller = p[0].Controller;
                        return(new List <IPlayable> {
                            controller.Game.IdEntityDic[controller.LastCardDrawn]
                        });
                    }),
                                                 new CopyTask(EntityType.STACK, 1),
                                                 new AddStackTo(EntityType.HAND)))
                                 .Build()
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_033] Blackwing Technician - COST:3 [ATK:2/HP:4]
            // - Fac: neutral, Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> If you're holding a Dragon, gain +1/+1.
            // --------------------------------------------------------
            // GameTag:
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("BRM_033", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = ComplexTask.Create(
                        new ConditionTask(EntityType.SOURCE, SelfCondition.IsDragonInHand),
                        new FlagTask(true, new BuffTask(Buffs.AttackHealth(1), EntityType.SOURCE)))
                },
            });

            // --------------------------------------- MINION - NEUTRAL
            // [BRM_034] Blackwing Corruptor - COST:5 [ATK:5/HP:4]
            // - Fac: neutral, Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> If you're holding a Dragon, deal 3 damage.
            // --------------------------------------------------------
            // GameTag:
            // - BATTLECRY = 1
            // --------------------------------------------------------
            // PlayReq:
            // - REQ_TARGET_IF_AVAILABLE_AND_DRAGON_IN_HAND = 0
            // --------------------------------------------------------
            cards.Add("BRM_034", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = ComplexTask.Create(
                        new ConditionTask(EntityType.SOURCE, SelfCondition.IsDragonInHand),
                        new FlagTask(true, new DamageTask(3, EntityType.TARGET)))
                },
            });
        }