Example #1
0
            public override void ProcessResults()
            {
                foreach (var attacker in Result)
                {
                    var combatCost = attacker.Card.CombatCost;
                    if (attacker.Card.CanAttack && (combatCost == 0 || D.Controller.HasMana(combatCost)))
                    {
                        // pay for each attacker seperately
                        // if there are some attackers which are
                        // already tapped for mana, because we used them
                        // to pay combatcost for others, then they will
                        // not be added.
                        if (combatCost > 0)
                        {
                            D.Controller.Consume(combatCost.Colorless(),
                                                 ManaUsage.Any);
                        }

                        Combat.AddAttacker(attacker.Card, attacker.Planeswalker);
                    }
                }

                Publish(new AttackersDeclaredEvent(Combat.Attackers));
            }