Exemplo n.º 1
0
        protected void DoCardAttack(Player attacker, Player defender, int pos)
        {
            if (attacker.Hand[pos].Delay > 0)
            {
                return;
            }

            foreach (Skill skill in attacker.Hand[pos].Skills.Where(s => s.Category == SkillCat.Activated))
            {
                foreach (Card card in this.CardsForSkill(attacker, skill, attacker.Hand[pos]))
                {
                    card.TakeSkill(skill);
                }
            }

            if (defender.Hand.Count > pos)
            {
                defender.Hand[pos].TakeAttack(attacker.Hand[pos]);
            }
            else
            {
                defender.TakeAttack(attacker.Hand[pos]);
            }
        }
Exemplo n.º 2
0
        protected void DoCardAttack(Player attacker, Player defender, int pos)
        {
            if (attacker.Hand[pos].Delay > 0) return;

            foreach (Skill skill in attacker.Hand[pos].Skills.Where(s => s.Category == SkillCat.Activated))
            {
                foreach (Card card in this.CardsForSkill(attacker, skill, attacker.Hand[pos]))
                {
                    card.TakeSkill(skill);
                }
            }

            if (defender.Hand.Count > pos)
            {
                defender.Hand[pos].TakeAttack(attacker.Hand[pos]);
            }
            else
            {
                defender.TakeAttack(attacker.Hand[pos]);
            }
        }