Пример #1
0
        public override IEnumerable <CardTemplate> GetCards()
        {
            yield return(Card
                         .Named("Exhaustion")
                         .ManaCost("{2}{U}")
                         .Type("Sorcery")
                         .Text("Creatures and lands target opponent controls don't untap during his or her next untap step.")
                         .FlavorText(
                             "The mage felt as though he'd been in the stasis suit for days. Upon his return, he found it was months.")
                         .Cast(p =>
            {
                p.Effect = () => new ApplyModifiersToPlayer(
                    selector: e => e.Controller.Opponent,
                    modifiers: () =>
                {
                    var cp = new ContinuousEffectParameters
                    {
                        Modifier = () => new AddStaticAbility(Static.DoesNotUntap),
                        CardFilter = (card, effect) =>
                                     card.Controller == effect.SourceEffect.Controller.Opponent &&
                                     (card.Is().Creature || card.Is().Land)
                    };

                    var modifier = new AddContiniousEffect(new ContinuousEffect(cp));

                    modifier.AddLifetime(new EndOfStep(
                                             Step.Untap,
                                             l => l.Modifier.SourceCard.Controller.IsActive));

                    return modifier;
                });

                p.TimingRule(new OnSecondMain());
            }));
        }
        public override void ProcessResults(ChosenOptions results)
        {
            var chosenType = (string)results.Options[0];

            var sp = new StaticAbilityParameters();

            sp.Modifier(() =>
            {
                var cp = new ContinuousEffectParameters
                {
                    Modifier = () => new AddPowerAndToughness(_power, _toughness),
                    Selector = (card, effect) => card.Is().Creature&& card.Is(chosenType) && IsValidController(card)
                };

                return(new AddContiniousEffect(new ContinuousEffect(cp)));
            });

            var modifier = new AddStaticAbility(new StaticAbility(sp));

            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this
            };

            Source.OwningCard.AddModifier(modifier, mp);
        }
Пример #3
0
    public override IEnumerable<CardTemplate> GetCards()
    {
      yield return Card
        .Named("Falter")
        .ManaCost("{1}{R}")
        .Type("Instant")
        .Text("Creatures without flying can't block this turn.")
        .FlavorText("Like a sleeping dragon, Shiv stirs and groans at times.")
        .Cast(p =>
          {
            p.Effect = () => new ApplyModifiersToPlayer(              
              selector: e => e.Controller,
              modifiers: () =>
                {
                  var pr = new ContinuousEffectParameters
                    {
                      Modifier = () => new AddStaticAbility(Static.CannotBlock),
                      CardFilter = (card, effect) =>
                        (card.Is().Creature && !card.Has().Flying),
                    };

                  return new AddContiniousEffect(new ContinuousEffect(pr)) {UntilEot = true};
                });
            
            p.TimingRule(new OnYourTurn(Step.BeginningOfCombat));
          });
    }
Пример #4
0
    public override IEnumerable<CardTemplate> GetCards()
    {
      yield return Card
        .Named("Exhaustion")
        .ManaCost("{2}{U}")
        .Type("Sorcery")
        .Text("Creatures and lands target opponent controls don't untap during his or her next untap step.")
        .FlavorText(
          "The mage felt as though he'd been in the stasis suit for days. Upon his return, he found it was months.")
        .Cast(p =>
          {
            p.Effect = () => new ApplyModifiersToPlayer(
              selector: e => e.Controller.Opponent,
              modifiers: () =>
                {
                  var cp = new ContinuousEffectParameters
                    {
                      Modifier = () => new AddStaticAbility(Static.DoesNotUntap),
                      CardFilter = (card, effect) =>
                        card.Controller == effect.SourceEffect.Controller.Opponent &&
                          (card.Is().Creature || card.Is().Land)
                    };

                  var modifier = new AddContiniousEffect(new ContinuousEffect(cp));

                  modifier.AddLifetime(new EndOfStep(
                    Step.Untap, 
                    l => l.Modifier.SourceCard.Controller.IsActive));
                  
                  return modifier;
                });

            p.TimingRule(new OnSecondMain());
          });
    }
Пример #5
0
        public override IEnumerable <CardTemplate> GetCards()
        {
            yield return(Card
                         .Named("Bubbling Muck")
                         .ManaCost("{B}")
                         .Type("Sorcery")
                         .Text(
                             "Until end of turn, whenever a player taps a Swamp for mana, that player adds {B} to his or her mana pool (in addition to the mana the land produces).")
                         .FlavorText("The muck claims a hundred living things for each meager treasure it spews forth.")
                         .Cast(p =>
            {
                p.Effect = () => new ApplyModifiersToPlayer(
                    e => e.Controller,
                    () =>
                {
                    var cp = new ContinuousEffectParameters
                    {
                        Modifier = () => new IncreaseManaOutput(Mana.Black),
                        CardFilter = (card, _) => card.Is("swamp")
                    };

                    return new AddContiniousEffect(new ContinuousEffect(cp))
                    {
                        UntilEot = true
                    };
                });
            }));
        }
Пример #6
0
        public override IEnumerable <CardTemplate> GetCards()
        {
            yield return(Card
                         .Named("Falter")
                         .ManaCost("{1}{R}")
                         .Type("Instant")
                         .Text("Creatures without flying can't block this turn.")
                         .FlavorText("Like a sleeping dragon, Shiv stirs and groans at times.")
                         .Cast(p =>
            {
                p.Effect = () => new ApplyModifiersToPlayer(
                    selector: e => e.Controller,
                    modifiers: () =>
                {
                    var pr = new ContinuousEffectParameters
                    {
                        Modifier = () => new AddStaticAbility(Static.CannotBlock),
                        CardFilter = (card, effect) =>
                                     (card.Is().Creature&& !card.Has().Flying),
                    };

                    return new AddContiniousEffect(new ContinuousEffect(pr))
                    {
                        UntilEot = true
                    };
                });

                p.TimingRule(new OnYourTurn(Step.BeginningOfCombat));
            }));
        }
Пример #7
0
    public override IEnumerable<CardTemplate> GetCards()
    {
      yield return Card
        .Named("Bubbling Muck")
        .ManaCost("{B}")
        .Type("Sorcery")
        .Text(
          "Until end of turn, whenever a player taps a Swamp for mana, that player adds {B} to his or her mana pool (in addition to the mana the land produces).")
        .FlavorText("The muck claims a hundred living things for each meager treasure it spews forth.")
        .Cast(p =>
          {
            p.Effect = () => new ApplyModifiersToPlayer(
              e => e.Controller,
              () =>
                {
                  var cp = new ContinuousEffectParameters
                    {
                      Modifier = () => new IncreaseManaOutput(Mana.Black),
                      CardFilter = (card, _) => card.Is("swamp")
                    };

                  return new AddContiniousEffect(new ContinuousEffect(cp)) {UntilEot = true};
                });
          });
    }
Пример #8
0
        public override IEnumerable <CardTemplate> GetCards()
        {
            yield return(Card
                         .Named("Barrage of Boulders")
                         .ManaCost("{2}{R}")
                         .Type("Sorcery")
                         .Text("Barrage of Boulders deals 1 damage to each creature you don't control.{EOL}{I}Ferocious{/I} — If you control a creature with power 4 or greater, creatures can't block this turn.")
                         .FlavorText("Crude tactics can be effective nonetheless.")
                         .Cast(p =>
            {
                p.Effect = () => new FerociousEffect(
                    L(new DealDamageToCreaturesAndPlayers(
                          amountCreature: 1,
                          filterCreature: (effect, card) => card.Controller != effect.Source.OwningCard.Controller)),

                    L(new ApplyModifiersToPlayer(
                          selector: e => e.Controller,
                          modifiers: () =>
                {
                    var pr = new ContinuousEffectParameters
                    {
                        Selector = (card, effect) => card.Is().Creature,
                        Modifier = () => new AddSimpleAbility(Static.CannotBlock)
                    };

                    return new AddContiniousEffect(new ContinuousEffect(pr))
                    {
                        UntilEot = true
                    };
                })));

                p.TimingRule(new OnMainStepsOfYourTurn());
            }));
        }
        public override void ProcessResults(ChosenOptions results)
        {
            var chosenType = (string)results.Options[0];

              var cp = new ContinuousEffectParameters
            {
              Modifier = () => new AddPowerAndToughness(-1, -1),
              CardFilter = (card, effect) => card.Is().Creature && card.Is(chosenType)
            };

              var modifier = new AddContiniousEffect(
            new ContinuousEffect(cp));

              var mp = new ModifierParameters
            {
              SourceCard = Source.OwningCard,
              SourceEffect = this
            };

              Source.OwningCard.AddModifier(modifier, mp);
        }
Пример #10
0
        public override void ProcessResults(ChosenOptions results)
        {
            var chosenType = (string)results.Options[0];

            var cp = new ContinuousEffectParameters
            {
                Modifier   = () => new AddPowerAndToughness(-1, -1),
                CardFilter = (card, effect) => card.Is().Creature&& card.Is(chosenType)
            };

            var modifier = new AddContiniousEffect(
                new ContinuousEffect(cp));


            var mp = new ModifierParameters
            {
                SourceCard   = Source.OwningCard,
                SourceEffect = this
            };

            Source.OwningCard.AddModifier(modifier, mp);
        }
Пример #11
0
    public override IEnumerable<CardTemplate> GetCards()
    {
      yield return Card
        .Named("Thran Weaponry")
        .ManaCost("{4}")
        .Type("Artifact")
        .Text(
          "{Echo} {4}{EOL}You may choose not to untap Thran Weaponry during your untap step.{EOL}{2},{T}: All creatures get +2/+2 for as long as Thran Weaponry remains tapped.")
        .MayChooseToUntap()
        .Echo("{4}")
        .ActivatedAbility(p =>
          {
            p.Text = "{2},{T}: All creatures get +2/+2 for as long as Thran Weaponry remains tapped.";
            p.Cost = new AggregateCost(
              new PayMana(2.Colorless(), ManaUsage.Abilities),
              new Tap());

            p.Effect = () => new ApplyModifiersToPlayer(
              selector: e => e.Controller,
              modifiers: () =>
                {
                  var cp = new ContinuousEffectParameters
                    {
                      Modifier = () => new AddPowerAndToughness(2, 2),
                      CardFilter = (card, _) => card.Is().Creature
                    };
                  
                  var effect = new ContinuousEffect(cp);

                  var modifier = new AddContiniousEffect(effect);
                  modifier.AddLifetime(new ModifierSourceGetsUntapedLifetime());
                  
                  return modifier;
                });
            
            p.TimingRule(new OnYourTurn(Step.DeclareBlockers));
          });
    }
Пример #12
0
        public override IEnumerable <CardTemplate> GetCards()
        {
            yield return(Card
                         .Named("Thran Weaponry")
                         .ManaCost("{4}")
                         .Type("Artifact")
                         .Text(
                             "{Echo} {4}{EOL}You may choose not to untap Thran Weaponry during your untap step.{EOL}{2},{T}: All creatures get +2/+2 for as long as Thran Weaponry remains tapped.")
                         .MayChooseToUntap()
                         .Echo("{4}")
                         .ActivatedAbility(p =>
            {
                p.Text = "{2},{T}: All creatures get +2/+2 for as long as Thran Weaponry remains tapped.";
                p.Cost = new AggregateCost(
                    new PayMana(2.Colorless(), ManaUsage.Abilities),
                    new Tap());

                p.Effect = () => new ApplyModifiersToPlayer(
                    selector: e => e.Controller,
                    modifiers: () =>
                {
                    var cp = new ContinuousEffectParameters
                    {
                        Modifier = () => new AddPowerAndToughness(2, 2),
                        CardFilter = (card, _) => card.Is().Creature
                    };

                    var effect = new ContinuousEffect(cp);

                    var modifier = new AddContiniousEffect(effect);
                    modifier.AddLifetime(new ModifierSourceGetsUntapedLifetime());

                    return modifier;
                });

                p.TimingRule(new OnYourTurn(Step.DeclareBlockers));
            }));
        }
Пример #13
0
        public override IEnumerable <CardTemplate> GetCards()
        {
            yield return(Card
                         .Named("Garruk, Apex Predator")
                         .ManaCost("{5}{B}{G}")
                         .Type("Planeswalker Garruk")
                         .Text("{+1}: Destroy another target planeswalker.{EOL}" +
                               "{+1}: Create a 3/3 black Beast creature token with deathtouch.{EOL}" +
                               "{-3}: Destroy target creature. You gain life equal to its toughness.{EOL}" +
                               "{-8}: Target opponent gets an emblem with 'Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn.'")
                         .Loyality(5)
                         .ActivatedAbility(p =>
            {
                p.Text = "{+1}: Destroy another target planeswalker.";

                p.Cost = new AddCountersCost(CounterType.Loyality, 1);
                p.Effect = () => new DestroyTargetPermanents();
                p.TargetSelector.AddEffect(trg => trg.Is.Card(c => c.Is().Planeswalker).On.Battlefield());
                p.TargetingRule(new EffectDestroy());
                p.TimingRule(new OnFirstMain());

                p.ActivateAsSorcery = true;
            })
                         .ActivatedAbility(p =>
            {
                p.Text = "{+1}: Create a 3/3 black Beast creature token with deathtouch.";
                p.Cost = new AddCountersCost(CounterType.Loyality, 1);

                p.Effect = () => new CreateTokens(
                    count: 1,
                    token: Card
                    .Named("Beast")
                    .Power(3)
                    .Toughness(3)
                    .Type("Token Creature - Beast")
                    .Colors(CardColor.Black)
                    .SimpleAbilities(Static.Deathtouch));

                p.TimingRule(new OnFirstMain());
                p.ActivateAsSorcery = true;
            })
                         .ActivatedAbility(p =>
            {
                p.Text = "{-3}: Destroy target creature. You gain life equal to its toughness.";

                p.Cost = new RemoveCounters(CounterType.Loyality, 3);
                p.Effect = () => new CompoundEffect(
                    new DestroyTargetPermanents(),
                    new ChangeLife(
                        amount: P(e => e.Target.Card().Toughness.GetValueOrDefault()),
                        whos: P(e => e.Controller)));

                p.TargetSelector.AddEffect(trg => trg.Is.Card(c => c.Is().Creature).On.Battlefield());
                p.TargetingRule(new EffectDestroy());
                p.TimingRule(new OnFirstMain());

                p.ActivateAsSorcery = true;
            })
                         .ActivatedAbility(p =>
            {
                p.Text =
                    "{-8}: Target opponent gets an emblem with 'Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn.'";

                p.Cost = new RemoveCounters(CounterType.Loyality, 8);

                p.Effect = () => new CreateEmblem(
                    text: "Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn.",
                    score: -600,
                    controller: P(e => e.Controller.Opponent),
                    modifiers: () =>
                {
                    var cp = new ContinuousEffectParameters
                    {
                        Modifier = () =>
                        {
                            var tp = new TriggeredAbility.Parameters
                            {
                                Text = "Whenever this creature attacks, it gets +5/+5 and gains trample until end of turn.",
                                Effect = () => new ApplyModifiersToSelf(
                                    () => new AddPowerAndToughness(5, 5)
                                {
                                    UntilEot = true
                                },
                                    () => new AddSimpleAbility(Static.Trample)
                                {
                                    UntilEot = true
                                })
                            };

                            tp.Trigger(new WhenThisAttacks(ap => ap.Attacker.Planeswalker == null));
                            return new AddTriggeredAbility(new TriggeredAbility(tp));
                        },

                        Selector = (card, ctx) => card.Controller != ctx.EffectOwner && card.Is().Creature
                    };

                    var effect = new ContinuousEffect(cp);
                    return new AddContiniousEffect(effect);
                });

                p.TimingRule(new OnFirstMain());
                p.ActivateAsSorcery = true;
            }));
        }