示例#1
0
        public CounterThatSpell(DynParam <Effect> spell, DynParam <int> doNotCounterCost = null)
        {
            _spell            = spell;
            _doNotCounterCost = doNotCounterCost;

            RegisterDynamicParameters(_doNotCounterCost, _spell);
        }
示例#2
0
        public ApplyModifiersToCard(DynParam <Card> card, params CardModifierFactory[] modifiers)
        {
            _card = card;
            _modifiers.AddRange(modifiers);

            RegisterDynamicParameters(card);
        }
示例#3
0
        public PayManaOrSacrifice(DynParam <IManaAmount> amount, string message = null)
        {
            _amount  = amount;
            _message = message ?? "Pay mana?";

            RegisterDynamicParameters(amount);
        }
示例#4
0
        public DestroyPermanent(DynParam <Card> permanent)
        {
            _permanent = permanent;
            SetTags(EffectTag.Destroy);

            RegisterDynamicParameters(permanent);
        }
        public TargetPlayerSacrificesPermanents(DynParam <int> count, Func <Card, bool> filter, string text)
        {
            _count  = count;
            _filter = filter;
            _text   = text;

            RegisterDynamicParameters(_count);
        }
示例#6
0
        public PayManaOrLooseLife(int lifeAmount, IManaAmount manaAmount, DynParam <Player> player)
        {
            _lifeAmount = lifeAmount;
            _manaAmount = manaAmount;
            _player     = player;

            RegisterDynamicParameters(player);
        }
示例#7
0
 public PayManaThen(DynParam <ManaAmount> amount, Effect effect, Parameters parameters = null)
     : base(effect, parameters ?? new Parameters {
     Message = "Pay mana?"
 })
 {
     _amount = amount;
     RegisterDynamicParameters(_amount);
 }
示例#8
0
        public DealDamageToTargets(DynParam <int> amount, bool gainLife = false)
        {
            _amount   = amount;
            _gainLife = gainLife;

            RegisterDynamicParameters(amount);
            SetTags(EffectTag.DealDamage);
        }
示例#9
0
 public PayLifeThen(DynParam <int> amount, Effect effect, Parameters parameters = null)
     : base(effect, parameters ?? new Parameters {
     Message = "Pay life?"
 })
 {
     _amount = amount;
     RegisterDynamicParameters(_amount);
 }
示例#10
0
        public Put11CountersOnTargets(DynParam <int> count)
        {
            _count = count;

            RegisterDynamicParameters(_count);

            SetTags(EffectTag.IncreasePower, EffectTag.IncreaseToughness);
        }
示例#11
0
        public CounterTargetSpell(DynParam <int> doNotCounterCost = null, int?controllerLifeloss = null,
                                  bool tapLandsAndEmptyManaPool   = false)
        {
            _controllerLifeloss       = controllerLifeloss;
            _doNotCounterCost         = doNotCounterCost;
            _tapLandsAndEmptyManaPool = tapLandsAndEmptyManaPool;

            RegisterDynamicParameters(doNotCounterCost);
        }
示例#12
0
        public DealDamageToTargets(DynParam <int> amount, bool gainLife = false, DynParam <bool> canBePrevented = null)
        {
            _amount         = amount;
            _gainLife       = gainLife;
            _canBePrevented = canBePrevented ?? true;

            RegisterDynamicParameters(amount, canBePrevented);
            SetTags(EffectTag.DealDamage);
        }
        public PlayersSacrificePermanents(DynParam <int> count, string text, Func <Card, bool> validator = null,
                                          Func <Effect, Player, bool> playerFilter = null)
        {
            _count        = count;
            _validator    = validator ?? delegate { return(true); };
            _text         = text;
            _playerFilter = playerFilter ?? delegate { return(true); };

            RegisterDynamicParameters(count);
        }
        public PlayerSacrificePermanents(DynParam <int> count, DynParam <Player> player,
                                         Func <Card, bool> filter, string text)
        {
            _count  = count;
            _player = player;
            _filter = filter;
            _text   = text;

            RegisterDynamicParameters(_player, _count);
        }
示例#15
0
        public PlayerSelectPermanentsAndSacrificeRest(DynParam <int> toUpCount, DynParam <Player> player,
                                                      Func <Card, bool> filter, string text)
        {
            _toUpCount = toUpCount;
            _player    = player;
            _filter    = filter;
            _text      = text;

            RegisterDynamicParameters(_player, _toUpCount);
        }
示例#16
0
        public OpponentDiscardsCards(DynParam <int> randomCount   = null, DynParam <int> selectedCount = null,
                                     bool youChooseDiscardedCards = false, Func <Card, bool> filter    = null)
        {
            _randomCount   = randomCount ?? 0;
            _selectedCount = selectedCount ?? 0;

            _filter = filter ?? delegate { return(true); };
            _youChooseDiscardedCards = youChooseDiscardedCards;

            RegisterDynamicParameters(randomCount, selectedCount);
        }
示例#17
0
        public CreateEmblem(
            string text,
            int score,
            DynParam <Player> controller,
            params ModifierFactory[] modifiers
            )
        {
            _text       = text;
            _score      = score;
            _controller = controller;
            _modifiers.AddRange(modifiers);

            RegisterDynamicParameters(controller);
        }
示例#18
0
        public SearchLibraryPutToZone(Zone zone, Action <Card> afterPutToZone = null,
                                      int maxCount = 1, int minCount        = 0, Func <Effect, Card, bool> validator = null,
                                      string text  = null, bool revealCards = true, DynParam <Player> player         = null)
        {
            _validator      = validator ?? delegate { return(true); };
            _player         = player ?? new DynParam <Player>((e, g) => e.Controller, EvaluateAt.OnResolve);
            _text           = text ?? "Search your library for a card.";
            _zone           = zone;
            _afterPutToZone = afterPutToZone ?? delegate { };
            _revealCards    = revealCards;
            _maxCount       = maxCount;
            _minCount       = minCount;

            RegisterDynamicParameters(_player);
        }
示例#19
0
        public CreateTokens(
            DynParam <int> count,
            CardTemplate token,
            EffectAction <Card> afterTokenComesToPlay   = null,
            DynParam <Player> tokenController           = null,
            EffectAction <CardTemplate> tokenParameters = null)
        {
            _afterTokenComesToPlay = afterTokenComesToPlay ?? delegate { };
            _tokenController       = tokenController;
            _setTokenParameters    = tokenParameters ?? delegate { };

            _count = count;
            _tokenFactories.Add(token);

            RegisterDynamicParameters(count, tokenController);
        }
示例#20
0
        public DestroyAllPermanents(
            Func <Effect, int, Card, bool> filter,
            DynParam <int> countOnInit,
            bool allowToRegenerate = true)
        {
            _countOnInit       = countOnInit;
            _allowToRegenerate = allowToRegenerate;
            _filter            = filter;

            SetTags(EffectTag.Destroy);

            if (!allowToRegenerate)
            {
                SetTags(EffectTag.CannotRegenerate);
            }

            RegisterDynamicParameters(countOnInit);
        }
        public PreventNextXDamageToTargets(DynParam <int> amount)
        {
            _amount = amount;

            RegisterDynamicParameters(amount);
        }
示例#22
0
 public CreateTokens(params CardTemplate[] tokens)
 {
     _tokenFactories.AddRange(tokens);
     _afterTokenComesToPlay = delegate { };
     _count = 1;
 }
示例#23
0
 public DestroyAttachedAttachments(DynParam <Card> permanent, CardSelector filter = null)
 {
     _permanent = permanent;
     _filter    = filter ?? delegate { return(true); };
     RegisterDynamicParameters(permanent);
 }
示例#24
0
 public DestroyAttachedAuras(DynParam <Card> permanent)
 {
     _permanent = permanent;
     RegisterDynamicParameters(permanent);
 }
示例#25
0
        public ReturnToHand(DynParam <Card> card)
        {
            _card = card;

            RegisterDynamicParameters(card);
        }