diff --git a/Mage.Sets/src/mage/cards/k/KirolAttentiveFirstYear.java b/Mage.Sets/src/mage/cards/k/KirolAttentiveFirstYear.java new file mode 100644 index 00000000000..7d867994bc1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KirolAttentiveFirstYear.java @@ -0,0 +1,48 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.CopyTargetStackObjectEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.StaticFilters; +import mage.target.TargetStackObject; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KirolAttentiveFirstYear extends CardImpl { + + public KirolAttentiveFirstYear(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R/W}{R/W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Tap two untapped creatures you control: Copy target triggered ability you control. You may choose new targets for the copy. Activate only once each turn. + Ability ability = new LimitedTimesPerTurnActivatedAbility( + new CopyTargetStackObjectEffect(), new TapTargetCost(2, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES) + ); + ability.addTarget(new TargetStackObject(StaticFilters.FILTER_CONTROLLED_TRIGGERED_ABILITY)); + this.addAbility(ability); + } + + private KirolAttentiveFirstYear(final KirolAttentiveFirstYear card) { + super(card); + } + + @Override + public KirolAttentiveFirstYear copy() { + return new KirolAttentiveFirstYear(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MisterFantastic.java b/Mage.Sets/src/mage/cards/m/MisterFantastic.java index 078d6278575..60178f8b45a 100644 --- a/Mage.Sets/src/mage/cards/m/MisterFantastic.java +++ b/Mage.Sets/src/mage/cards/m/MisterFantastic.java @@ -16,11 +16,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; -import mage.constants.TargetController; -import mage.filter.FilterStackObject; -import mage.filter.predicate.Predicate; -import mage.game.Game; -import mage.game.stack.StackObject; +import mage.filter.StaticFilters; import mage.target.TargetStackObject; import java.util.UUID; @@ -30,13 +26,6 @@ import java.util.UUID; */ public final class MisterFantastic extends CardImpl { - private static final FilterStackObject filter = new FilterStackObject("triggered ability you control"); - - static { - filter.add(MisterFantasticPredicate.instance); - filter.add(TargetController.YOU.getControllerPredicate()); - } - public MisterFantastic(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); @@ -63,7 +52,7 @@ public final class MisterFantastic extends CardImpl { .setText("copy target triggered ability you control twice"), new ManaCostsImpl<>("{R}{G}{W}{U}")); ability.addCost(new TapSourceCost()); ability.addEffect(new CopyTargetStackObjectEffect().setText("You may choose new targets for the copies.")); - ability.addTarget(new TargetStackObject(filter)); + ability.addTarget(new TargetStackObject(StaticFilters.FILTER_CONTROLLED_TRIGGERED_ABILITY)); this.addAbility(ability); } @@ -76,12 +65,3 @@ public final class MisterFantastic extends CardImpl { return new MisterFantastic(this); } } - -enum MisterFantasticPredicate implements Predicate { - instance; - - @Override - public boolean apply(StackObject input, Game game) { - return input instanceof Ability && ((Ability) input).isTriggeredAbility(); - } -} diff --git a/Mage.Sets/src/mage/cards/s/StrionicResonator.java b/Mage.Sets/src/mage/cards/s/StrionicResonator.java index c521659aad9..72a9a53b6c0 100644 --- a/Mage.Sets/src/mage/cards/s/StrionicResonator.java +++ b/Mage.Sets/src/mage/cards/s/StrionicResonator.java @@ -8,11 +8,7 @@ import mage.abilities.effects.common.CopyTargetStackObjectEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.TargetController; -import mage.filter.FilterStackObject; -import mage.filter.predicate.Predicate; -import mage.game.Game; -import mage.game.stack.StackObject; +import mage.filter.StaticFilters; import mage.target.TargetStackObject; import java.util.UUID; @@ -22,20 +18,13 @@ import java.util.UUID; */ public final class StrionicResonator extends CardImpl { - private static final FilterStackObject filter = new FilterStackObject("triggered ability you control"); - - static { - filter.add(StrionicResonatorPredicate.instance); - filter.add(TargetController.YOU.getControllerPredicate()); - } - public StrionicResonator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // {2}, {T}: Copy target triggered ability you control. You may choose new targets for the copy. Ability ability = new SimpleActivatedAbility(new CopyTargetStackObjectEffect(), new ManaCostsImpl<>("{2}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetStackObject(filter)); + ability.addTarget(new TargetStackObject(StaticFilters.FILTER_CONTROLLED_TRIGGERED_ABILITY)); this.addAbility(ability); } @@ -48,12 +37,3 @@ public final class StrionicResonator extends CardImpl { return new StrionicResonator(this); } } - -enum StrionicResonatorPredicate implements Predicate { - instance; - - @Override - public boolean apply(StackObject input, Game game) { - return input instanceof Ability && ((Ability) input).isTriggeredAbility(); - } -} diff --git a/Mage.Sets/src/mage/sets/LorwynEclipsed.java b/Mage.Sets/src/mage/sets/LorwynEclipsed.java index 4d749f626e3..969265c371e 100644 --- a/Mage.Sets/src/mage/sets/LorwynEclipsed.java +++ b/Mage.Sets/src/mage/sets/LorwynEclipsed.java @@ -45,6 +45,8 @@ public final class LorwynEclipsed extends ExpansionSet { cards.add(new SetCardInfo("Hallowed Fountain", 347, Rarity.RARE, mage.cards.h.HallowedFountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("High Perfect Morcant", 229, Rarity.RARE, mage.cards.h.HighPerfectMorcant.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("High Perfect Morcant", 373, Rarity.RARE, mage.cards.h.HighPerfectMorcant.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Kirol, Attentive First-Year", 231, Rarity.RARE, mage.cards.k.KirolAttentiveFirstYear.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Kirol, Attentive First-Year", 374, Rarity.RARE, mage.cards.k.KirolAttentiveFirstYear.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Morningtide's Light", 27, Rarity.MYTHIC, mage.cards.m.MorningtidesLight.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Morningtide's Light", 301, Rarity.MYTHIC, mage.cards.m.MorningtidesLight.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mutable Explorer", 186, Rarity.RARE, mage.cards.m.MutableExplorer.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 83ff2fb5d20..a33b7706d82 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -8,6 +8,7 @@ import mage.filter.common.*; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.*; import mage.filter.predicate.other.AnotherTargetPredicate; +import mage.filter.predicate.other.TriggeredAbilityPredicate; import mage.filter.predicate.permanent.*; /** @@ -978,6 +979,14 @@ public final class StaticFilters { FILTER_SPELL_OR_ABILITY_A.setLockedFilter(true); } + public static final FilterStackObject FILTER_CONTROLLED_TRIGGERED_ABILITY = new FilterStackObject("triggered ability you control"); + + static { + FILTER_CONTROLLED_TRIGGERED_ABILITY.add(TriggeredAbilityPredicate.instance); + FILTER_CONTROLLED_TRIGGERED_ABILITY.add(TargetController.YOU.getControllerPredicate()); + FILTER_CONTROLLED_TRIGGERED_ABILITY.setLockedFilter(true); + } + public static final FilterCreatureSpell FILTER_SPELL_A_CREATURE = new FilterCreatureSpell("a creature spell"); static { diff --git a/Mage/src/main/java/mage/filter/predicate/other/TriggeredAbilityPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/TriggeredAbilityPredicate.java new file mode 100644 index 00000000000..3b1f80fd693 --- /dev/null +++ b/Mage/src/main/java/mage/filter/predicate/other/TriggeredAbilityPredicate.java @@ -0,0 +1,18 @@ +package mage.filter.predicate.other; + +import mage.abilities.Ability; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.game.stack.StackObject; + +/** + * @author TheElk801 + */ +public enum TriggeredAbilityPredicate implements Predicate { + instance; + + @Override + public boolean apply(StackObject input, Game game) { + return input instanceof Ability && ((Ability) input).isTriggeredAbility(); + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 859390925d5..2d0e6b6687c 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -60835,6 +60835,7 @@ Deceit|Lorwyn Eclipsed|212|M|{4}{U/B}{U/B}|Creature - Elemental Incarnation|5|5| Emptiness|Lorwyn Eclipsed|222|M|{4}{W/B}{W/B}|Creature - Elemental Incarnation|3|5|When this creature enters, if {W}{W} was spent to cast it, return target creature card with mana value 3 or less from your graveyard to the battlefield.$When this creature enters, if {B}{B} was spent to cast it, put three -1/-1 counters on up to one target creature.$Evoke {W/B}{W/B}| Figure of Fable|Lorwyn Eclipsed|224|R|{G/W}|Creature - Kithkin|1|1|{G/W}: This creature becomes a Kithkin Scout with base power and toughness 2/3.${1}{G/W}{G/W}: If this creature is a Scout, it becomes a Kithkin Soldier with base power and toughness 4/5.${3}{G/W}{G/W}{G/W}: If this creature is a Soldier, it becomes a Kithkin Avatar with base power and toughness 7/8 and protection from each of your opponents.| High Perfect Morcant|Lorwyn Eclipsed|229|R|{2}{B}{G}|Legendary Creature - Elf Noble|4|4|Whenever High Perfect Morcant or another Elf you control enters, each opponent blights 1.$Tap three untapped Elves you control: Proliferate. Activate only as a sorcery.| +Kirol, Attentive First-Year|Lorwyn Eclipsed|231|R|{1}{R/W}{R/W}|Legendary Creature - Vampire Cleric|3|3|Tap two untapped creatures you control: Copy target triggered ability you control. You may choose new targets for the copy. Activate only once each turn.| Blood Crypt|Lorwyn Eclipsed|262|R||Land - Swamp Mountain|||({T}: Add {B} or {R}.)$As this land enters, you may pay 2 life. If you don't, it enters tapped.| Hallowed Fountain|Lorwyn Eclipsed|265|R||Land - Plains Island|||({T}: Add {W} or {U}.)$As this land enters, you may pay 2 life. If you don't, it enters tapped.| Overgrown Tomb|Lorwyn Eclipsed|266|R||Land - Swamp Forest|||({T}: Add {B} or {G}.)$As this land enters, you may pay 2 life. If you don't, it enters tapped.| @@ -60866,6 +60867,7 @@ Bitterbloom Bearer|Lorwyn Eclipsed|352|M|{B}{B}|Creature - Faerie Rogue|1|1|Flas Formidable Speaker|Lorwyn Eclipsed|366|R|{2}{G}|Creature - Elf Druid|2|4|When this creature enters, you may discard a card. If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle.${1}, {T}: Untap another target permanent.| Figure of Fable|Lorwyn Eclipsed|372|R|{G/W}|Creature - Kithkin|1|1|{G/W}: This creature becomes a Kithkin Scout with base power and toughness 2/3.${1}{G/W}{G/W}: If this creature is a Scout, it becomes a Kithkin Soldier with base power and toughness 4/5.${3}{G/W}{G/W}{G/W}: If this creature is a Soldier, it becomes a Kithkin Avatar with base power and toughness 7/8 and protection from each of your opponents.| High Perfect Morcant|Lorwyn Eclipsed|373|R|{2}{B}{G}|Legendary Creature - Elf Noble|4|4|Whenever High Perfect Morcant or another Elf you control enters, each opponent blights 1.$Tap three untapped Elves you control: Proliferate. Activate only as a sorcery.| +Kirol, Attentive First-Year|Lorwyn Eclipsed|374|R|{1}{R/W}{R/W}|Legendary Creature - Vampire Cleric|3|3|Tap two untapped creatures you control: Copy target triggered ability you control. You may choose new targets for the copy. Activate only once each turn.| Greymond, Avacyn's Stalwart|Secret Lair Drop|143|M|{2}{W}{W}|Legendary Creature - Human Soldier|3|4|As Greymond, Avacyn's Stalwart enters, choose two abilities from among first strike, vigilance, and lifelink.$Humans you control have each of the chosen abilities.$As long as you control four or more Humans, Humans you control get +2/+2.| Hansk, Slayer Zealot|Secret Lair Drop|144|M|{2}{R}{G}|Legendary Creature - Human Archer|4|4|At the beginning of your upkeep, target opponent creates three Walker tokens.${T}: Hansk, Slayer Zealot deals 2 damage to target creature.$Whenever a Zombie an opponent controls dies, draw a card.| Gregor, Shrewd Magistrate|Secret Lair Drop|145|M|{1}{W}{U}|Legendary Creature - Human Advisor|1|3|Skulk$Whenever Gregor, Shrewd Magistrate deals combat damage to a player, draw cards equal to its power.|