Exemplo n.º 1
0
 public void Play(IMinion minion, int index = 0, IMinion target = null)
 {
     OnMinionSummon(minion, index);
     PlayedMinions.Insert(index, minion);
     for (int j = 0; j < minion.Level; j++)
     {
         minion.OnPlayed(new TriggerParams()
         {
             Activator = minion, Index = index, Target = target, Board = this, Player = Player
         });
     }
 }
Exemplo n.º 2
0
        public void Summon(string minionName, int index, Direction direction = Direction.Right, int amount = 1)
        {
            for (int i = 0; i < amount; i++)
            {
                if (IsFull)
                {
                    return;
                }

                var summoned = Pool.Instance.GetFreshCopy(minionName);
                PlayedMinions.Insert(index + (int)direction, summoned);
                OnMinionSummon(summoned, index);
            }
        }
Exemplo n.º 3
0
        private void ActivateSummonAura(int index, Direction direction, IMinion summoned)
        {
            int auraLevel = BoardAuras.Where(a => a.Value == AuraType.Summon).Select(b => b.Key.Level).DefaultIfEmpty().Max();

            for (int j = 0; j < auraLevel; j++)
            {
                if (IsFull)
                {
                    break;
                }
                var copy = summoned.Clone();
                PlayedMinions.Insert(index + (int)direction, copy);
            }
        }
Exemplo n.º 4
0
        public void Play(IMinion minion, int index = 0, IMinion target = null)
        {
            OnMinionSummon(minion, index);
            minion.OnApplyAura(new TriggerParams()
            {
                Activator = minion, Index = index, Board = this, Player = Player
            });
            int auraLevel = BoardAuras.Where(a => a.Value == AuraType.BattleCry).Select(b => b.Key.Level).DefaultIfEmpty().Max() + 1;

            PlayedMinions.Insert(index, minion);
            for (int j = 0; j < auraLevel; j++)
            {
                minion.OnPlayed(new TriggerParams()
                {
                    Activator = minion, Index = index, Target = target, Board = this, Player = Player
                });
            }
        }