Exemplo n.º 1
0
            private bool IsLureAbilitySatisfied(ChosenBlockers chosen, List <Card> lureAttackers)
            {
                if (lureAttackers.Count == 0)
                {
                    return(true);
                }

                return(D.Controller.Battlefield.Creatures.All(creature =>
                {
                    if (lureAttackers.Any(attacker => attacker.CanBeBlockedBy(creature)))
                    {
                        return chosen.Any(
                            x => x.Blocker == creature &&
                            lureAttackers.Any(y => y == x.Attacker));
                    }

                    return true;
                }));
            }
Exemplo n.º 2
0
            private bool IsLureAbilitySatisfied(ChosenBlockers chosen, List <Card> lureAttackers, int availableMana)
            {
                if (lureAttackers.Count == 0)
                {
                    return(true);
                }

                return(D.Controller.Battlefield.Creatures.All(blockerCandidate =>
                {
                    if (lureAttackers.Any(attacker => attacker.CanBeBlockedBy(blockerCandidate)))
                    {
                        var isAlreadyAssignedToALureAttacker = chosen.Any(x =>
                                                                          x.Blocker == blockerCandidate && lureAttackers.Any(y => y == x.Attacker));

                        return isAlreadyAssignedToALureAttacker || blockerCandidate.CombatCost > availableMana;
                    }

                    return true;
                }));
            }