public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Rain of Filth") .ManaCost("{B}") .Type("Instant") .Text("Until end of turn, lands you control gain 'Sacrifice this land: Add {B} to your mana pool.'") .FlavorText("When I say it rained, it was not small drops, but a thick, greasy drool pouring from the heavens.") .Cast(p => { p.Effect = () => new ApplyModifiersToPermanents( selector: (e, c) => c.Is().Land, controlledBy: ControlledBy.SpellOwner, modifiers: () => { var mp = new ActivatedAbilityParameters { Cost = new Sacrifice(), Text = "Sacrifice this land: Add {B} to your mana pool.", Effect = () => new AddManaToPool("{B}".Parse()), UsesStack = false, }; mp.TimingRule(new WhenYouNeedAdditionalMana()); return new AddActivatedAbility(new ActivatedAbility(mp)); }); p.TimingRule(new OnYourTurn(Step.Upkeep)); }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Rain of Filth") .ManaCost("{B}") .Type("Instant") .Text("Until end of turn, lands you control gain 'Sacrifice this land: Add {B} to your mana pool.'") .FlavorText("When I say it rained, it was not small drops, but a thick, greasy drool pouring from the heavens.") .Cast(p => { p.Effect = () => new ApplyModifiersToPermanents( selector: (c, ctx) => c.Is().Land&& ctx.You == c.Controller, modifier: () => { var mp = new ActivatedAbilityParameters { Cost = new Sacrifice(), Text = "Sacrifice this land: Add {B} to your mana pool.", Effect = () => new AddManaToPool("{B}".Parse()), UsesStack = false, }; mp.TimingRule(new WhenYouNeedAdditionalMana()); return new AddActivatedAbility(new ActivatedAbility(mp)); }); p.TimingRule(new OnYourTurn(Step.Upkeep)); })); }
public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Gaea's Embrace") .ManaCost("{2}{G}{G}") .Type("Enchantment - Aura") .Text( "Enchanted creature gets +3/+3 and has trample.{EOL}{G}: Regenerate enchanted creature.") .FlavorText("The forest rose to the battle, not to save the people but to save itself.") .Cast(p => { p.Effect = () => new Attach( () => { var ap = new ActivatedAbilityParameters { Text = "{G}: Regenerate enchanted creature.", Cost = new PayMana(Mana.Green, ManaUsage.Abilities), Effect = () => new RegenerateOwner() }; ap.TimingRule(new RegenerateSelfTimingRule()); return new AddActivatedAbility(new ActivatedAbility(ap)); }, () => new AddPowerAndToughness(3, 3), () => new AddStaticAbility(Static.Trample) ).SetTags(EffectTag.IncreasePower, EffectTag.IncreaseToughness); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Hermetic Study") .ManaCost("{1}{U}") .Type("Enchantment Aura") .Text( "Enchanted creature has '{T}: This creature deals 1 damage to target creature or player.'") .FlavorText("Books can be replaced; a prize student cannot. Be patient.") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{T}: This creature deals 1 damage to target creature or player.", Cost = new Tap(), Effect = () => new DealDamageToTargets(1), }; ap.TargetSelector.AddEffect(trg => trg.Is.CreatureOrPlayer().On.Battlefield()); ap.TargetingRule(new EffectDealDamage(1)); ap.TimingRule(new TargetRemovalTimingRule(removalTag: EffectTag.DealDamage)); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnSecondMain()); p.TargetingRule(new EffectRankBy(c => c.Score, ControlledBy.SpellOwner)); })); }
public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Hermetic Study") .ManaCost("{1}{U}") .Type("Enchantment Aura") .Text( "Enchanted creature has '{T}: This creature deals 1 damage to target creature or player.'") .FlavorText("Books can be replaced; a prize student cannot. Be patient.") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{T}: This creature deals 1 damage to target creature or player.", Cost = new Tap(), Effect = () => new DealDamageToTargets(1), }; ap.TargetSelector.AddEffect(trg => trg.Is.CreatureOrPlayer().On.Battlefield()); ap.TargetingRule(new EffectDealDamage(1)); ap.TimingRule(new TargetRemovalTimingRule(removalTag: EffectTag.DealDamage)); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnSecondMain()); p.TargetingRule(new EffectRankBy(c => c.Score, ControlledBy.SpellOwner)); }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Gaea's Embrace") .ManaCost("{2}{G}{G}") .Type("Enchantment - Aura") .Text( "Enchanted creature gets +3/+3 and has trample.{EOL}{G}: Regenerate enchanted creature.") .FlavorText("The forest rose to the battle, not to save the people but to save itself.") .Cast(p => { p.Effect = () => new Attach( () => { var ap = new ActivatedAbilityParameters { Text = "{G}: Regenerate enchanted creature.", Cost = new PayMana(Mana.Green), Effect = () => new RegenerateOwner() }; ap.TimingRule(new RegenerateSelfTimingRule()); return new AddActivatedAbility(new ActivatedAbility(ap)); }, () => new AddPowerAndToughness(3, 3), () => new AddSimpleAbility(Static.Trample) ).SetTags(EffectTag.IncreasePower, EffectTag.IncreaseToughness); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); })); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Burning Anger") .ManaCost("{4}{R}") .Type("Enchantment — Aura") .Text( "Enchant creature{EOL}Enchanted creature has \"{T}: This creature deals damage equal to its power to target creature or player.\"") .FlavorText("\"With rage as your forge, your hammer can smite anything.\"") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{T}: This creature deals damage equal to its power to target creature or player.", Cost = new Tap(), Effect = () => new DealDamageToTargets(P(e => e.Source.OwningCard.Power.GetValueOrDefault())) }; ap.TargetSelector.AddEffect(trg => trg.Is.CreatureOrPlayer().On.Battlefield()); ap.TargetingRule(new EffectDealDamage(tp => tp.Card.Power.GetValueOrDefault())); ap.TimingRule(new Any(new TargetRemovalTimingRule(removalTag: EffectTag.DealDamage), new OnSecondMain())); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect( trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnSecondMain()); p.TargetingRule(new EffectOrCostRankBy(x => - x.Power.GetValueOrDefault(), ControlledBy.SpellOwner)); })); }
public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Shiv's Embrace") .ManaCost("{2}{R}{R}") .Type("Enchantment - Aura") .Text( "Enchanted creature gets +2/+2 and has flying.{EOL}{R}: Enchanted creature gets +1/+0 until end of turn.") .FlavorText("Wear the foe's form to best it in battle. So sayeth the bey.") .Cast(p => { p.Effect = () => new Attach( () => { var ap = new ActivatedAbilityParameters { Text = "{R}: Enchanted creature gets +1/+0 until end of turn.", Cost = new PayMana(Mana.Red, ManaUsage.Abilities, supportsRepetitions: true), Effect = () => new ApplyModifiersToSelf( () => new AddPowerAndToughness(1, 0) {UntilEot = true}).SetTags(EffectTag.IncreasePower) }; ap.TimingRule(new PumpOwningCardTimingRule(1, 0)); ap.RepetitionRule(new RepeatMaxTimes()); return new AddActivatedAbility(new ActivatedAbility(ap)); }, () => new AddPowerAndToughness(2, 2), () => new AddStaticAbility(Static.Flying)).SetTags(EffectTag.IncreasePower, EffectTag.IncreaseToughness); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Spawning Pool") .Type("Land") .Text( "Spawning Pool enters the battlefield tapped.{EOL}{T}: Add {B} to your mana pool.{EOL}{1}{B}: Spawning Pool becomes a 1/1 black Skeleton creature with '{B}': Regenerate this creature' until end of turn. It's still a land.") .Cast(p => p.Effect = () => new CastPermanent(tap: true)) .ManaAbility(p => { p.Text = "{T}: Add {B} to your mana pool."; p.ManaAmount(Mana.Black); p.Priority = ManaSourcePriorities.OnlyIfNecessary; }) .ActivatedAbility(p => { p.Text = "{1}{B}: Spawning Pool becomes a 1/1 black Skeleton creature with '{B}': Regenerate this creature' until end of turn. It's still a land."; p.Cost = new PayMana("{1}{B}".Parse()); p.Effect = () => new ApplyModifiersToSelf( () => new ChangeToCreature( power: 1, toughness: 1, colors: L(CardColor.Black), type: t => t.Add(baseTypes: "creature", subTypes: "skeleton")) { UntilEot = true }, () => { var ap = new ActivatedAbilityParameters { Text = "{B}: Regenerate this creature.", Cost = new PayMana(Mana.Black), Effect = () => new RegenerateOwner() }; ap.TimingRule(new RegenerateSelfTimingRule()); return new AddActivatedAbility(new ActivatedAbility(ap)) { UntilEot = true }; }); p.TimingRule(new WhenStackIsEmpty()); p.TimingRule(new WhenCardHas(c => !c.Is().Creature)); p.TimingRule(new WhenYouHaveMana(3)); p.TimingRule(new Any(new BeforeYouDeclareAttackers(), new AfterOpponentDeclaresAttackers())); })); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Mercurial Pretender") .ManaCost("{4}{U}") .Type("Creature - Shapeshifter") .Text( "You may have Mercurial Pretender enter the battlefield as a copy of any creature you control except it gains \"{2}{U}{U}: Return this creature to its owner's hand.\"") .FlavorText("The king went off to find himself. Imagine his terror when he succeeded.") .Power(0) .Toughness(0) .Cast(p => p.TimingRule(new WhenPermanentCountIs(1, c => c.Is().Creature))) .TriggeredAbility(p => { p.Text = "You may have Mercurial Pretender enter the battlefield as a copy of any creature you control except it gains \"{2}{U}{U}: Return this creature to its owner's hand.\""; p.Trigger(new OnZoneChanged(to: Zone.Battlefield)); p.UsesStack = false; p.Effect = () => new CompoundEffect( new BecomeCopyOfTargetCard(), new ApplyModifiersToSelf(() => { var ap = new ActivatedAbilityParameters { Text = "{2}{U}{U}: Return this creature to its owner's hand.", Cost = new PayMana("{2}{U}{U}".Parse()), Effect = () => new Effects.ReturnToHand(returnOwningCard: true) }; ap.TimingRule(new WhenOwningCardWillBeDestroyed()); ap.TimingRule(new WhenNoOtherInstanceOfSpellIsOnStack()); return new AddActivatedAbility(new ActivatedAbility(ap)); }) ); p.TargetSelector.AddEffect( trg => // should not be able to target itself because this // will cause infinite loop as the trigger of the // copy will trigger again trg.Is.Creature(ControlledBy.SpellOwner, canTargetSelf: false).On.Battlefield(), trg => trg.MustBeTargetable = false); p.TargetingRule(new EffectOrCostRankBy(x => - x.Score)); })); }
public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Spawning Pool") .Type("Land") .Text( "Spawning Pool enters the battlefield tapped.{EOL}{T}: Add {B} to your mana pool.{EOL}{1}{B}: Spawning Pool becomes a 1/1 black Skeleton creature with '{B}': Regenerate this creature' until end of turn. It's still a land.") .Cast(p => p.Effect = () => new PutIntoPlay(tap: true)) .ManaAbility(p => { p.Text = "{T}: Add {B} to your mana pool."; p.ManaAmount(Mana.Black); p.Priority = ManaSourcePriorities.OnlyIfNecessary; }) .ActivatedAbility(p => { p.Text = "{1}{B}: Spawning Pool becomes a 1/1 black Skeleton creature with '{B}': Regenerate this creature' until end of turn. It's still a land."; p.Cost = new PayMana("{1}{B}".Parse(), ManaUsage.Abilities); p.Effect = () => new ApplyModifiersToSelf( () => new ChangeToCreature( power: 1, toughness: 1, colors: L(CardColor.Black), type: "Land Creature Skeleton") {UntilEot = true}, () => { var ap = new ActivatedAbilityParameters { Text = "{B}: Regenerate this creature.", Cost = new PayMana(Mana.Black, ManaUsage.Abilities), Effect = () => new RegenerateOwner() }; ap.TimingRule(new RegenerateSelfTimingRule()); return new AddActivatedAbility(new ActivatedAbility(ap)) {UntilEot = true}; }); p.TimingRule(new WhenStackIsEmpty()); p.TimingRule(new WhenCardHas(c => !c.Is().Creature)); p.TimingRule(new WhenYouHaveMana(3)); p.TimingRule(new Any(new BeforeYouDeclareAttackers(), new AfterOpponentDeclaresAttackers())); }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Archery Training") .ManaCost("{W}") .Type("Enchantment Aura") .Text( "At the beginning of your upkeep, you may put an arrow counter on Archery Training.{EOL}Enchanted creature has '{T}: This creature deals X damage to target attacking or blocking creature, where X is the number of arrow counters on Archery Training.'") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{T}: This creature deals X damage to target attacking or blocking creature, where X is the number of arrow counters on Archery Training.", Cost = new Tap(), Effect = () => new DealDamageToTargets(P(e => e.Source.OwningCard.Attachments .First(x => x.Name == "Archery Training") .CountersCount(CounterType.Arrow))) }; ap.TargetSelector.AddEffect(trg => trg.Is.AttackerOrBlocker().On.Battlefield()); ap.TimingRule(new OnStep(Step.DeclareBlockers)); ap.TargetingRule(new EffectDealDamage(tp => tp.Card.Attachments .First(x => x.Name == "Archery Training") .CountersCount(CounterType.Arrow))); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }) .TriggeredAbility(p => { p.Text = "At the beginning of your upkeep, you may put an arrow counter on Archery Training."; p.Trigger(new OnStepStart(Step.Upkeep)); p.Effect = () => new ApplyModifiersToSelf(() => new AddCounters(() => new SimpleCounter(CounterType.Arrow), 1)); p.TriggerOnlyIfOwningCardIsInPlay = true; })); }
public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Archery Training") .ManaCost("{W}") .Type("Enchantment Aura") .Text( "At the beginning of your upkeep, you may put an arrow counter on Archery Training.{EOL}Enchanted creature has '{T}: This creature deals X damage to target attacking or blocking creature, where X is the number of arrow counters on Archery Training.'") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{T}: This creature deals X damage to target attacking or blocking creature, where X is the number of arrow counters on Archery Training.", Cost = new Tap(), Effect = () => new DealDamageToTargets(P(e => e.Source.OwningCard.Attachments .First(x => x.Name == "Archery Training") .CountersCount(CounterType.Arrow))) }; ap.TargetSelector.AddEffect(trg => trg.Is.AttackerOrBlocker().On.Battlefield()); ap.TimingRule(new OnStep(Step.DeclareBlockers)); ap.TargetingRule(new EffectDealDamage(tp => tp.Card.Attachments .First(x => x.Name == "Archery Training") .CountersCount(CounterType.Arrow))); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }) .TriggeredAbility(p => { p.Text = "At the beginning of your upkeep, you may put an arrow counter on Archery Training."; p.Trigger(new OnStepStart(Step.Upkeep)); p.Effect = () => new ApplyModifiersToSelf(() => new AddCounters(() => new SimpleCounter(CounterType.Arrow), 1)); p.TriggerOnlyIfOwningCardIsInPlay = true; }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Fiery Mantle") .ManaCost("{1}{R}") .Type("Enchantment - Aura") .Text( "Enchant creature{EOL}{R}: Enchanted creature gets +1/+0 until end of turn.{EOL}When Fiery Mantle is put into a graveyard from the battlefield, return Fiery Mantle to its owner's hand.") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{R}: Enchanted creature gets +1/+0 until end of turn.", Cost = new PayMana(Mana.Red, ManaUsage.Abilities, supportsRepetitions: true), Effect = () => new ApplyModifiersToSelf(() => new AddPowerAndToughness(1, 0) { UntilEot = true }) }; ap.TimingRule(new PumpOwningCardTimingRule(1, 0)); ap.RepetitionRule(new RepeatMaxTimes()); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }) .TriggeredAbility(p => { p.Text = "When Fiery Mantle is put into a graveyard from the battlefield, return Fiery Mantle to its owner's hand."; p.Trigger(new OnZoneChanged(@from: Zone.Battlefield, to: Zone.Graveyard)); p.Effect = () => new ReturnToHand(returnOwningCard: true); })); }
public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Fortitude") .ManaCost("{1}{G}") .Type("Enchantment Aura") .Text( "Sacrifice a Forest: Regenerate enchanted creature.{EOL}When Fortitude is put into a graveyard from the battlefield, return Fortitude to its owner's hand.") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "Sacrifice a Forest: Regenerate enchanted creature.", Cost = new Sacrifice(), Effect = () => new RegenerateOwner() }; ap.TargetSelector.AddCost(trg => trg .Is.Card(x => x.Is("forest"), ControlledBy.SpellOwner) .On.Battlefield()); ap.TimingRule(new RegenerateSelfTimingRule()); ap.TargetingRule(new CostSacrificeToRegenerate()); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }) .TriggeredAbility(p => { p.Text = "When Fortitude is put into a graveyard from the battlefield, return Fortitude to its owner's hand."; p.Trigger(new OnZoneChanged(@from: Zone.Battlefield, to: Zone.Graveyard)); p.Effect = () => new ReturnToHand(returnOwningCard: true); }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Fortitude") .ManaCost("{1}{G}") .Type("Enchantment Aura") .Text( "Sacrifice a Forest: Regenerate enchanted creature.{EOL}When Fortitude is put into a graveyard from the battlefield, return Fortitude to its owner's hand.") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "Sacrifice a Forest: Regenerate enchanted creature.", Cost = new Sacrifice(), Effect = () => new RegenerateOwner() }; ap.TargetSelector.AddCost(trg => trg .Is.Card(x => x.Is("forest"), ControlledBy.SpellOwner) .On.Battlefield()); ap.TimingRule(new RegenerateSelfTimingRule()); ap.TargetingRule(new CostSacrificeToRegenerate()); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }) .TriggeredAbility(p => { p.Text = "When Fortitude is put into a graveyard from the battlefield, return Fortitude to its owner's hand."; p.Trigger(new OnZoneChanged(@from: Zone.Battlefield, to: Zone.Graveyard)); p.Effect = () => new ReturnToHand(returnOwningCard: true); })); }
public override IEnumerable<CardTemplate> GetCards() { yield return Card .Named("Fiery Mantle") .ManaCost("{1}{R}") .Type("Enchantment - Aura") .Text( "Enchant creature{EOL}{R}: Enchanted creature gets +1/+0 until end of turn.{EOL}When Fiery Mantle is put into a graveyard from the battlefield, return Fiery Mantle to its owner's hand.") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{R}: Enchanted creature gets +1/+0 until end of turn.", Cost = new PayMana(Mana.Red, ManaUsage.Abilities, supportsRepetitions: true), Effect = () => new ApplyModifiersToSelf(() => new AddPowerAndToughness(1, 0) {UntilEot = true}) }; ap.TimingRule(new PumpOwningCardTimingRule(1, 0)); ap.RepetitionRule(new RepeatMaxTimes()); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); }) .TriggeredAbility(p => { p.Text = "When Fiery Mantle is put into a graveyard from the battlefield, return Fiery Mantle to its owner's hand."; p.Trigger(new OnZoneChanged(@from: Zone.Battlefield, to: Zone.Graveyard)); p.Effect = () => new ReturnToHand(returnOwningCard: true); }); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Dragonrage") .ManaCost("{2}{R}") .Type("Instant") .Text("Add {R} to your mana pool for each attacking creature you control. Until end of turn, attacking creatures you control gain \"{R}: This creature gets +1/+0 until end of turn.\"") .FlavorText("\"Dragons in the skies of Tarkir—for the first time, it feels like my home.\"{EOL}—Sarkhan Vol") .Cast(p => { p.Effect = () => new CompoundEffect( new AddManaToPool(P(e => Mana.Colored(ManaColor.Red, e.Controller.Battlefield.Creatures.Count(x => x.IsAttacker)))), new ApplyModifiersToPermanents( selector: (c, ctx) => c.Is().Creature&& c.IsAttacker && ctx.You == c.Controller, modifier: () => { var ap = new ActivatedAbilityParameters { Text = "{R}: This creature gets +1/+0 until end of turn.", Cost = new PayMana(Mana.Red, supportsRepetitions: true), Effect = () => new ApplyModifiersToSelf( () => new AddPowerAndToughness(1, 0) { UntilEot = true }).SetTags(EffectTag.IncreasePower), }; ap.TimingRule(new AfterYouDeclareAttackers()); ap.RepetitionRule(new RepeatMaxTimes()); return new AddActivatedAbility(new ActivatedAbility(ap)); })); p.TimingRule(new AfterYouDeclareAttackers()); })); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Shiv's Embrace") .ManaCost("{2}{R}{R}") .Type("Enchantment - Aura") .Text( "Enchanted creature gets +2/+2 and has flying.{EOL}{R}: Enchanted creature gets +1/+0 until end of turn.") .FlavorText("Wear the foe's form to best it in battle. So sayeth the bey.") .Cast(p => { p.Effect = () => new Attach( () => { var ap = new ActivatedAbilityParameters { Text = "{R}: Enchanted creature gets +1/+0 until end of turn.", Cost = new PayMana(Mana.Red, supportsRepetitions: true), Effect = () => new ApplyModifiersToSelf( () => new AddPowerAndToughness(1, 0) { UntilEot = true }).SetTags(EffectTag.IncreasePower) }; ap.TimingRule(new PumpOwningCardTimingRule(1, 0)); ap.RepetitionRule(new RepeatMaxTimes()); return new AddActivatedAbility(new ActivatedAbility(ap)); }, () => new AddPowerAndToughness(2, 2), () => new AddSimpleAbility(Static.Flying)).SetTags(EffectTag.IncreasePower, EffectTag.IncreaseToughness); p.TargetSelector.AddEffect(trg => trg.Is.Creature().On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectCombatEnchantment()); })); }
public override IEnumerable <CardTemplate> GetCards() { yield return(Card .Named("Caustic Tar") .ManaCost("{4}{B}{B}") .Type("Enchantment — Aura") .Text("Enchant land{EOL}Enchanted land has \"{T}: Target player loses 3 life.\"") .FlavorText( "A forest fire can rejuvenate the land, but the tar's vile consumption leaves the land forever ruined.") .Cast(p => { p.Effect = () => new Attach(() => { var ap = new ActivatedAbilityParameters { Text = "{T}: Target player loses 3 life.", Cost = new Tap(), Effect = () => new ChangeLife(-3, P(e => e.Target.Player())) }; ap.TargetSelector.AddEffect(trg => trg.Is.Player()); ap.TimingRule(new Any( new OnEndOfOpponentsTurn(), new WhenOwningCardWillBeDestroyed())); ap.TargetingRule(new EffectOpponent()); return new AddActivatedAbility(new ActivatedAbility(ap)); }); p.TargetSelector.AddEffect(trg => trg.Is.Card(c => c.Is().Land).On.Battlefield()); p.TimingRule(new OnFirstMain()); p.TargetingRule(new EffectLandEnchantment(ControlledBy.SpellOwner)); })); }