Esempio n. 1
0
        /// <summary>
        /// Replaces an entity in this zone to new entity and returns the old entity.
        /// The position of the new entity is the same position the old entity had.
        /// </summary>
        /// <param name="oldEntity">The entity to be replaced.</param>
        /// <param name="newEntity">The new entity.</param>
        /// <returns></returns>
        public void Replace(Minion oldEntity, Minion newEntity)
        {
            int pos = oldEntity.ZonePosition;

            Entities[pos]           = newEntity;
            newEntity.ZonePosition  = pos;
            newEntity[GameTag.ZONE] = (int)Type;
            newEntity.Zone          = this;

            // Remove old Entity
            RemoveAura(oldEntity);
            for (int i = 0; i < Auras.Count; i++)
            {
                Auras[i].EntityRemoved(oldEntity);
            }
            oldEntity.ActivatedTrigger?.Remove();
            if (oldEntity.Card.Untouchable && --_untouchableCount == 0)
            {
                _hasUntouchables = false;
            }

            Controller.SetasideZone.Add(oldEntity);

            // Add new Entity
            newEntity.OrderOfPlay = Game.NextOop;
            ActivateAura(newEntity);
            if (newEntity.Card.Untouchable)
            {
                ++_untouchableCount;
                _hasUntouchables = true;
            }

            Auras.ForEach(p => p.ToBeUpdated = true);
        }
Esempio n. 2
0
 /// <summary>
 /// Get total damage, after adding/subtracting all modifiers (is not used for DoT)
 /// </summary>
 public int GetFinalDamage(DamageSchool school, int dmg, Spell spell = null)
 {
     if (spell != null)
     {
         dmg = Auras.GetModifiedInt(SpellModifierType.SpellPower, spell, dmg);
     }
     return(dmg);
 }
Esempio n. 3
0
 public void Refresh()
 {
     foreach (Aura aura in Auras.FindAll(x => x.Ticks <= 0))
     {
         Auras.Remove(aura);
         OnAuraExpired(aura);
     }
 }
Esempio n. 4
0
 private void Start()
 {
     Auras.Fetch();
     Skills.Fetch();
     Equipments.Fetch();
     Complices.Fetch();
     Resources.Fetch();
 }
Esempio n. 5
0
 public void SortEntries()
 {
     if (Auras != null)
     {
         Auras.Sort((x, y) => x.SortID - y.SortID);
     }
     //if (CharacterAuras != null)
     //CharacterAuras.Sort((x, y) => x.SortID - y.SortID);
 }
Esempio n. 6
0
        public void Write(WorldPacket data)
        {
            data.WritePackedGuid(GUID);
            data.WriteInt32(ModelId);
            data.WriteInt32(CurrentHealth);
            data.WriteInt32(MaxHealth);
            data.WriteUInt32(Auras.Count);
            Auras.ForEach(p => p.Write(data));

            data.WriteBits(Name.GetByteCount(), 8);
            data.FlushBits();
            data.WriteString(Name);
        }
Esempio n. 7
0
        public bool Tick()
        {
            Auras = GetAuras();

            if (Auras == null || !Auras.Any())
            {
                return(false);
            }

            if (Buffs != null)
            {
                if (BuffsToKeepActive?.Count > 0)
                {
                    foreach (KeyValuePair <string, CastFunction> keyValuePair in BuffsToKeepActive)
                    {
                        if (!Buffs.Any(e => e.SpellId != 0 && e.Name.Equals(keyValuePair.Key, StringComparison.OrdinalIgnoreCase)) &&
                            keyValuePair.Value())
                        {
                            return(true);
                        }
                    }
                }

                if (Buffs.Any() && DispellBuffs != null)
                {
                    DispellBuffs();
                }
            }

            if (Debuffs != null)
            {
                if (DebuffsToKeepActive?.Count > 0)
                {
                    foreach (KeyValuePair <string, CastFunction> keyValuePair in DebuffsToKeepActive)
                    {
                        if (!Debuffs.Any(e => e.SpellId != 0 && e.Name.Equals(keyValuePair.Key, StringComparison.OrdinalIgnoreCase)) &&
                            keyValuePair.Value())
                        {
                            return(true);
                        }
                    }
                }

                if (Debuffs.Any() && DispellDebuffs != null)
                {
                    // DispellDebuffs();
                }
            }

            return(false);
        }
Esempio n. 8
0
        //internal override void ChangeEntity(Minion oldEntity, Minion newEntity)
        //{
        //	if (oldEntity.Untouchable)
        //		if (!newEntity.Untouchable && --_untouchableCount == 0)
        //			_hasUntouchables = false;

        //	base.ChangeEntity(oldEntity, newEntity);
        //}

        /// <summary>
        /// Replaces an entity in this zone to new entity and returns the old entity.
        /// The position of the new entity is the same position the old entity had.
        /// </summary>
        /// <param name="oldEntity">The entity to be replaced.</param>
        /// <param name="newEntity">The new entity.</param>
        /// <returns></returns>
        public void Replace(Minion oldEntity, Minion newEntity)
        {
            int pos = oldEntity.ZonePosition;

            // Remove old Entity
            RemoveAura(oldEntity);
            for (int i = 0; i < Auras.Count; i++)
            {
                Auras[i].EntityRemoved(oldEntity);
            }
            oldEntity.ActivatedTrigger?.Remove();
            if (oldEntity.Card.Untouchable && --_untouchableCount == 0)
            {
                _hasUntouchables = false;
            }
            oldEntity.ZonePosition = 0;
            oldEntity.Controller.SetasideZone.Add(oldEntity);

            // Add new Entity
            newEntity.OrderOfPlay = Game.NextOop;
            _entities[pos]        = newEntity;
            if (newEntity.Game.History)
            {
                newEntity[GameTag.ZONE] = (int)Type;
            }
            newEntity.Zone         = this;
            newEntity.ZonePosition = pos;
            ActivateAura(newEntity);
            if (newEntity.Card.Untouchable)
            {
                ++_untouchableCount;
                _hasUntouchables = true;
            }
            Auras.ForEach(a => a.EntityAdded(newEntity));
            AdjacentAuras.ForEach(a => a.BoardChanged = true);
            if (!newEntity.HasCharge)
            {
                if (newEntity.IsRush)
                {
                    newEntity.AttackableByRush = true;
                    Game.RushMinions.Add(newEntity.Id);
                }
                else
                {
                    newEntity.IsExhausted = true;
                }
            }
        }
Esempio n. 9
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()
                }
            });
        }
Esempio n. 10
0
        public Composite Build()
        {
            Auras = new Auras();
            Helpers.ResetAll += Auras.Reset;

            return
                new Decorator(ret => !StyxWoW.Me.Mounted && StyxWoW.Me.CurrentTarget != null,
                              new PrioritySelector(ret => StyxWoW.Me.CurrentTarget.IsWithinMeleeRange,
                                                   new Action(delegate { return Helpers.ResetFail(); }),
                                                   AutoAttack(),
                                                   Spells.Cast(Spells.GARROTE, ret => StyxWoW.Me.IsStealthed),
                                                   Spells.Cast(Spells.REDIRECT,
                                                               ret => StyxWoW.Me.ComboPoints < StyxWoW.Me.RawComboPoints),
                                                   Spells.Cast(Spells.FAN_OF_KNIVES,
                                                               ret =>
                                                               RogueAssassin.Settings.FOK && Helpers.AOEIsSafe
                                                               && !Helpers.TargetIsBoss
                                                               &&
                                                               Helpers.NearbyEnemies.Count()
                                                               >= RogueAssassin.Settings.FOKMinTargets),
                                                   Spells.Cast(Spells.SLICE_AND_DICE,
                                                               ret =>
                                                               StyxWoW.Me.ComboPoints > 0 && Auras.SliceAndDice == null),
                                                   Spells.Cast(Spells.ENVENOM,
                                                               ret =>
                                                               StyxWoW.Me.ComboPoints > 0 && Auras.SliceAndDice != null
                                                               &&
                                                               (Auras.SliceAndDice.TimeLeft.Seconds < 2
                                                                ||
                                                                StyxWoW.Me.GetAllAuras().Find(
                                                                    a => a.SpellId == Spells.COLD_BLOOD)
                                                                != null)),
                                                   Rupture(),
                                                   Spells.CastFocus(Spells.TRICKS_OF_THE_TRADE,
                                                                    ret => Helpers.FocusReadyForTricks),
                                                   CoolDowns(),
                                                   ComboPoint(),
                                                   Spells.CastStatus(Spells.ENVENOM,
                                                                     ret =>
                                                                     StyxWoW.Me.ComboPoints > 3
                                                                     &&
                                                                     ((Auras.Envenom == null
                                                                       && Helpers.CurrentEnergy >= 90)
                                                                      || Helpers.CurrentEnergy > 105))));
        }
Esempio n. 11
0
        private static void Paladin(IDictionary <string, List <Enchantment> > cards)
        {
            // ---------------------------------------- SPELL - PALADIN
            // [BRM_001] Solemn Vigil - COST:5
            // - Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: Draw 2 cards. Costs (1) less for each minion that died this turn.
            // --------------------------------------------------------
            cards.Add("BRM_001", 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 EnqueueTask(2, new DrawTask())
                },
            });

            // --------------------------------------- MINION - PALADIN
            // [BRM_018] Dragon Consort - COST:5 [ATK:5/HP:5]
            // - Race: dragon, Set: fp2, Rarity: rare
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> The next Dragon you play costs (2) less.
            // --------------------------------------------------------
            // GameTag:
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("BRM_018", new List <Enchantment> {
                // TODO [BRM_018] Dragon Consort && Test: Dragon Consort_BRM_018
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = null,
                },
            });
        }
Esempio n. 12
0
        private static void Druid(IDictionary <string, List <Enchantment> > cards)
        {
            // ----------------------------------------- MINION - DRUID
            // [BRM_009] Volcanic Lumberer - COST:9 [ATK:7/HP:8]
            // - Set: fp2, Rarity: rare
            // --------------------------------------------------------
            // Text: <b>Taunt</b>
            //       Costs (1) less for each minion that died this turn.
            // --------------------------------------------------------
            // GameTag:
            // - TAUNT = 1
            // --------------------------------------------------------
            cards.Add("BRM_009", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.SELF,
                    Activation = EnchantmentActivation.HAND_ZONE,
                    Enchant    = Auras.CostFunc(
                        owner => - (owner.Controller.NumFriendlyMinionsThatDiedThisTurn +
                                    owner.Controller.Opponent.NumFriendlyMinionsThatDiedThisTurn))
                }
            });

            // ----------------------------------------- MINION - DRUID
            // [BRM_010] Druid of the Flame - COST:3 [ATK:2/HP:2]
            // - Set: fp2, Rarity: common
            // --------------------------------------------------------
            // Text: <b>Choose One -</b> Transform into a 5/2 minion; or a 2/5 minion.
            // --------------------------------------------------------
            // GameTag:
            // - CHOOSE_ONE = 1
            // --------------------------------------------------------
            cards.Add("BRM_010", new List <Enchantment> {
                new Enchantment
                {
                    // CHOOSE_ONE, Choose Both option
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = new TransformTask("OG_044b", EntityType.SOURCE)
                }
            });
        }
Esempio n. 13
0
 public bool HasAura(int spellId)
 {
     return(Auras.Any(a => a.SpellId == spellId));
 }
Esempio n. 14
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)))
                },
            });
        }
Esempio n. 15
0
 public bool HasBuffByName(string name)
 => Auras.Any(e => e.Name == name);
Esempio n. 16
0
 public bool HasAura(Spell spell)
 {
     return(Auras.Any(aura => aura.Id == spell.Id));
 }
Esempio n. 17
0
 public bool HasAura(string name)
 {
     return(Auras.Exists(a => a == name));
 }
Esempio n. 18
0
        private static void Neutral(IDictionary <string, List <Enchantment> > cards)
        {
            // --------------------------------------- MINION - NEUTRAL
            // [EX1_016] Sylvanas Windrunner - COST:6 [ATK:5/HP:5]
            // - Set: hof, Rarity: legendary
            // --------------------------------------------------------
            // Text: <b>Deathrattle:</b> Take
            //       control of a random
            //       enemy minion.
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - DEATHRATTLE = 1
            // --------------------------------------------------------
            cards.Add("EX1_016", new List <Enchantment> {
                new Enchantment
                {
                    Activation = EnchantmentActivation.DEATHRATTLE,
                    SingleTask = ComplexTask.Create(
                        new RandomTask(1, EntityType.OP_MINIONS),
                        new ControlTask(EntityType.STACK))
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [EX1_062] Old Murk-Eye - COST:4 [ATK:2/HP:4]
            // - Race: murloc, Fac: neutral, Set: hof, Rarity: legendary
            // --------------------------------------------------------
            // Text: <b>Charge</b>. Has +1 Attack for each other Murloc on the battlefield.
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - CHARGE = 1
            // --------------------------------------------------------
            cards.Add("EX1_062", new List <Enchantment> {
                // TODO [EX1_062] Old Murk-Eye && Test: Old Murk-Eye_EX1_062
                new Enchantment
                {
                    //Activation = null,
                    //SingleTask = null,
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [EX1_112] Gelbin Mekkatorque - COST:6 [ATK:6/HP:6]
            // - Fac: alliance, Set: hof, Rarity: legendary
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> Summon an AWESOME invention.
            // --------------------------------------------------------
            // Entourage: Mekka1, Mekka2, Mekka3, Mekka4
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("EX1_112", new List <Enchantment> {
                // TODO [EX1_112] Gelbin Mekkatorque && Test: Gelbin Mekkatorque_EX1_112
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = null,
                },
            });

            // --------------------------------------- MINION - NEUTRAL
            // [EX1_284] Azure Drake - COST:5 [ATK:4/HP:4]
            // - Race: dragon, Fac: neutral, Set: hof, Rarity: rare
            // --------------------------------------------------------
            // Text: <b>Spell Damage +1</b>. <b>Battlecry:</b> Draw a card.
            // --------------------------------------------------------
            // GameTag:
            // - SPELLPOWER = 1
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("EX1_284", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.HERO,
                    Activation = EnchantmentActivation.BOARD,
                    Enchant    = Auras.SpellPowerDamage(1)
                },
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = new DrawTask()
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [EX1_298] Ragnaros the Firelord - COST:8 [ATK:8/HP:8]
            // - Race: elemental, Fac: neutral, Set: hof, Rarity: legendary
            // --------------------------------------------------------
            // Text: Can't attack. At the end of your turn, deal 8 damage to a random enemy.
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - CANT_ATTACK = 1
            // --------------------------------------------------------
            cards.Add("EX1_298", new List <Enchantment> {
                new Enchantment
                {
                    Area       = EnchantmentArea.CONTROLLER,
                    Activation = EnchantmentActivation.BOARD,
                    Trigger    = new TriggerBuilder().Create()
                                 .EnableConditions(SelfCondition.IsInZone(Zone.PLAY), SelfCondition.IsNotSilenced)
                                 .TriggerEffect(GameTag.TURN_START, -1)
                                 .SingleTask(ComplexTask.DamageRandomTargets(1, EntityType.ENEMIES, 8))
                                 .Build()
                }
            });

            // --------------------------------------- MINION - NEUTRAL
            // [NEW1_016] Captain's Parrot - COST:2 [ATK:1/HP:1]
            // - Race: beast, Set: hof, Rarity: epic
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> Draw a Pirate from your deck.
            // --------------------------------------------------------
            // GameTag:
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("NEW1_016", new List <Enchantment> {
                // TODO [NEW1_016] Captain's Parrot && Test: Captain's Parrot_NEW1_016
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = null,
                },
            });

            // --------------------------------------- MINION - NEUTRAL
            // [PRO_001] Elite Tauren Chieftain - COST:5 [ATK:5/HP:5]
            // - Set: hof, Rarity: legendary
            // --------------------------------------------------------
            // Text: <b>Battlecry:</b> Give both players the power to ROCK! (with a Power Chord card)
            // --------------------------------------------------------
            // Entourage: PRO_001a, PRO_001b, PRO_001c
            // --------------------------------------------------------
            // GameTag:
            // - ELITE = 1
            // - BATTLECRY = 1
            // --------------------------------------------------------
            cards.Add("PRO_001", new List <Enchantment> {
                // TODO [PRO_001] Elite Tauren Chieftain && Test: Elite Tauren Chieftain_PRO_001
                new Enchantment
                {
                    Activation = EnchantmentActivation.BATTLECRY,
                    SingleTask = null,
                },
            });
        }
Esempio n. 19
0
 private async Task<bool> CastAura(Abilities spellId, Auras auraId = Auras.None)
 {
     return await CastAura((uint)spellId, (int)auraId);
 }
Esempio n. 20
0
 public bool HasBuffById(int spellId)
 {
     return(Auras != null && Auras.Any(e => e.SpellId == spellId));
 }
Esempio n. 21
0
 public void AddToQueue(Aura aura)
 {
     Auras.Add(aura);
 }
Esempio n. 22
0
 public bool HasBuffByName(string name)
 {
     return(Auras != null && Auras.Any(e => e.Name == name));
 }
Esempio n. 23
0
 public bool HasBuffByName(string auraName)
 {
     return(Auras != null && Auras.Any(e => e.Name.Equals(auraName, StringComparison.OrdinalIgnoreCase)));
 }