diff --git a/Mage.Sets/src/mage/cards/a/AetherMembrane.java b/Mage.Sets/src/mage/cards/a/AetherMembrane.java index 1d48dff350..e133385d27 100644 --- a/Mage.Sets/src/mage/cards/a/AetherMembrane.java +++ b/Mage.Sets/src/mage/cards/a/AetherMembrane.java @@ -3,7 +3,7 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -36,7 +36,7 @@ public final class AetherMembrane extends CardImpl { // Whenever Aether Membrane blocks a creature, return that creature to its owner's hand at end of combat. Effect effect = new ReturnToHandTargetEffect(); effect.setText("return that creature to its owner's hand at end of combat"); - this.addAbility(new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect)), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect)), false, true)); } public AetherMembrane(final AetherMembrane card) { diff --git a/Mage.Sets/src/mage/cards/a/Aetherplasm.java b/Mage.Sets/src/mage/cards/a/Aetherplasm.java index 29862c661d..2c0b020b4d 100644 --- a/Mage.Sets/src/mage/cards/a/Aetherplasm.java +++ b/Mage.Sets/src/mage/cards/a/Aetherplasm.java @@ -3,7 +3,7 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; @@ -35,7 +35,7 @@ public final class Aetherplasm extends CardImpl { this.toughness = new MageInt(1); // Whenever Aetherplasm blocks a creature, you may return Aetherplasm to its owner's hand. If you do, you may put a creature card from your hand onto the battlefield blocking that creature. - this.addAbility(new BlocksTriggeredAbility(new DoIfCostPaid(new AetherplasmEffect(), new ReturnToHandFromBattlefieldSourceCost()), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new DoIfCostPaid(new AetherplasmEffect(), new ReturnToHandFromBattlefieldSourceCost()), false, true)); } public Aetherplasm(final Aetherplasm card) { diff --git a/Mage.Sets/src/mage/cards/a/AgelessSentinels.java b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java index 5c2d0489a2..d893d50db0 100644 --- a/Mage.Sets/src/mage/cards/a/AgelessSentinels.java +++ b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java @@ -4,7 +4,7 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; @@ -41,7 +41,7 @@ public final class AgelessSentinels extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Ageless Sentinels blocks, it becomes a Bird Giant, and it loses defender. - Ability ability = new BlocksTriggeredAbility(new AgelessSentinelsEffect(), false, false, true); + Ability ability = new BlocksSourceTriggeredAbility(new AgelessSentinelsEffect(), false, false, true); Effect effect = new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.WhileOnBattlefield); effect.setText("and it loses defender"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/a/AlabornZealot.java b/Mage.Sets/src/mage/cards/a/AlabornZealot.java index 20f2a13a39..fdaa9dbce5 100644 --- a/Mage.Sets/src/mage/cards/a/AlabornZealot.java +++ b/Mage.Sets/src/mage/cards/a/AlabornZealot.java @@ -4,7 +4,7 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DestroySourceEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.constants.SubType; @@ -27,7 +27,7 @@ public final class AlabornZealot extends CardImpl { this.toughness = new MageInt(1); // When Alaborn Zealot blocks a creature, destroy that creature and Alaborn Zealot. - Ability ability = new BlocksTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); + Ability ability = new BlocksSourceTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); ability.addEffect(new DestroySourceEffect().setText("and {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BrimazKingOfOreskos.java b/Mage.Sets/src/mage/cards/b/BrimazKingOfOreskos.java index b04efc6f44..f68cddc798 100644 --- a/Mage.Sets/src/mage/cards/b/BrimazKingOfOreskos.java +++ b/Mage.Sets/src/mage/cards/b/BrimazKingOfOreskos.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.VigilanceAbility; @@ -44,7 +44,7 @@ public final class BrimazKingOfOreskos extends CardImpl { this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new CatSoldierCreatureToken(), 1, false, true), false)); // Whenever Brimaz blocks a creature, create a 1/1 white Cat Soldier creature token with vigilance blocking that creature. - this.addAbility(new BlocksTriggeredAbility(new BrimazKingOfOreskosEffect(), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new BrimazKingOfOreskosEffect(), false, true)); } public BrimazKingOfOreskos(final BrimazKingOfOreskos card) { diff --git a/Mage.Sets/src/mage/cards/c/CinderWall.java b/Mage.Sets/src/mage/cards/c/CinderWall.java index d5112e8a0c..652621bfa0 100644 --- a/Mage.Sets/src/mage/cards/c/CinderWall.java +++ b/Mage.Sets/src/mage/cards/c/CinderWall.java @@ -3,7 +3,7 @@ package mage.cards.c; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroySourceEffect; @@ -29,7 +29,7 @@ public final class CinderWall extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // When Cinder Wall blocks, destroy it at end of combat. - this.addAbility(new BlocksTriggeredAbility( + this.addAbility(new BlocksSourceTriggeredAbility( new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroySourceEffect())), false, false, true )); diff --git a/Mage.Sets/src/mage/cards/e/ElderLandWurm.java b/Mage.Sets/src/mage/cards/e/ElderLandWurm.java index a7b44841b0..a9625cd30c 100644 --- a/Mage.Sets/src/mage/cards/e/ElderLandWurm.java +++ b/Mage.Sets/src/mage/cards/e/ElderLandWurm.java @@ -3,7 +3,7 @@ package mage.cards.e; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; import mage.constants.SubType; import mage.abilities.keyword.DefenderAbility; @@ -34,7 +34,7 @@ public final class ElderLandWurm extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // When Elder Land Wurm blocks, it loses defender. - this.addAbility(new BlocksTriggeredAbility(new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), false, false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), false, false, true)); } public ElderLandWurm(final ElderLandWurm card) { diff --git a/Mage.Sets/src/mage/cards/e/EliteJavelineer.java b/Mage.Sets/src/mage/cards/e/EliteJavelineer.java index 129d5706e4..29b0a1c900 100644 --- a/Mage.Sets/src/mage/cards/e/EliteJavelineer.java +++ b/Mage.Sets/src/mage/cards/e/EliteJavelineer.java @@ -4,7 +4,7 @@ package mage.cards.e; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -28,7 +28,7 @@ public final class EliteJavelineer extends CardImpl { this.toughness = new MageInt(2); // Whenever Elite Javelineer blocks, it deals 1 damage to target attacking creature. - Ability ability = new BlocksTriggeredAbility(new DamageTargetEffect(1, "it"), false); + Ability ability = new BlocksSourceTriggeredAbility(new DamageTargetEffect(1, "it"), false); ability.addTarget(new TargetCreaturePermanent(new FilterAttackingCreature())); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java b/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java index 08f1dc039e..920d519e4b 100644 --- a/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java +++ b/Mage.Sets/src/mage/cards/f/FolkOfAnHavva.java @@ -3,7 +3,7 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -24,7 +24,7 @@ public final class FolkOfAnHavva extends CardImpl { this.toughness = new MageInt(1); // Whenever Folk of An-Havva blocks, it gets +2/+0 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(2, 0, Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(2, 0, Duration.EndOfTurn), false)); } public FolkOfAnHavva(final FolkOfAnHavva card) { diff --git a/Mage.Sets/src/mage/cards/f/FortressCyclops.java b/Mage.Sets/src/mage/cards/f/FortressCyclops.java index e78c2bec72..41f1f83540 100644 --- a/Mage.Sets/src/mage/cards/f/FortressCyclops.java +++ b/Mage.Sets/src/mage/cards/f/FortressCyclops.java @@ -4,7 +4,7 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class FortressCyclops extends CardImpl { // Whenever Fortress Cyclops attacks, it gets +3/+0 until end of turn. this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(3,0, Duration.EndOfTurn), false)); // Whenever Fortress Cyclops blocks, it gets +0/+3 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(0,3, Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(0,3, Duration.EndOfTurn), false)); } public FortressCyclops(final FortressCyclops card) { diff --git a/Mage.Sets/src/mage/cards/g/GiantBadger.java b/Mage.Sets/src/mage/cards/g/GiantBadger.java index 1eb8d9cc1f..80d488ef30 100644 --- a/Mage.Sets/src/mage/cards/g/GiantBadger.java +++ b/Mage.Sets/src/mage/cards/g/GiantBadger.java @@ -3,7 +3,7 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class GiantBadger extends CardImpl { this.toughness = new MageInt(2); // Whenever Giant Badger blocks, it gets +2/+2 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); } public GiantBadger(final GiantBadger card) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinSnowman.java b/Mage.Sets/src/mage/cards/g/GoblinSnowman.java index 95e4b91b56..7b1d5fb59d 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSnowman.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSnowman.java @@ -4,7 +4,7 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.Effect; @@ -37,7 +37,7 @@ public final class GoblinSnowman extends CardImpl { //Whenever Goblin Snowman blocks, prevent all combat damage that would be dealt to and dealt by it this turn. Effect effect = new PreventCombatDamageBySourceEffect(Duration.EndOfTurn); effect.setText("prevent all combat damage that would be dealt to"); - Ability ability = new BlocksTriggeredAbility(effect, false); + Ability ability = new BlocksSourceTriggeredAbility(effect, false); effect = new PreventCombatDamageToSourceEffect(Duration.EndOfTurn); effect.setText("and dealt by it this turn"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java b/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java index 2b1fd5997f..ed0b05a3d9 100644 --- a/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java +++ b/Mage.Sets/src/mage/cards/g/GoldenglowMoth.java @@ -4,7 +4,7 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -28,7 +28,7 @@ public final class GoldenglowMoth extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever Goldenglow Moth blocks, you may gain 4 life. - this.addAbility(new BlocksTriggeredAbility(new GainLifeEffect(4), true)); + this.addAbility(new BlocksSourceTriggeredAbility(new GainLifeEffect(4), true)); } diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java b/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java index 91acad470f..32c68a8102 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfTheGateless.java @@ -3,7 +3,7 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; @@ -35,7 +35,7 @@ public final class GuardianOfTheGateless extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(0))); // Whenever Guardian of the Gateless blocks, it gets +1/+1 until end of turn for each creature it's blocking. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn),false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn),false)); } public GuardianOfTheGateless(final GuardianOfTheGateless card) { diff --git a/Mage.Sets/src/mage/cards/h/HordeAmbusher.java b/Mage.Sets/src/mage/cards/h/HordeAmbusher.java index 74e88895dc..c307275a88 100644 --- a/Mage.Sets/src/mage/cards/h/HordeAmbusher.java +++ b/Mage.Sets/src/mage/cards/h/HordeAmbusher.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; import mage.abilities.costs.common.RevealTargetFromHandCost; import mage.abilities.effects.Effect; @@ -42,7 +42,7 @@ public final class HordeAmbusher extends CardImpl { this.toughness = new MageInt(2); // Whenever Horde Ambusher blocks, it deals 1 damage to you. - this.addAbility(new BlocksTriggeredAbility(new DamageControllerEffect(1, "it"), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new DamageControllerEffect(1, "it"), false)); // Morph - Reveal a red card in your hand. this.addAbility(new MorphAbility(this, new RevealTargetFromHandCost(new TargetCardInHand(filter)))); diff --git a/Mage.Sets/src/mage/cards/i/InfernalMedusa.java b/Mage.Sets/src/mage/cards/i/InfernalMedusa.java index b3f0ab1912..17feafab97 100644 --- a/Mage.Sets/src/mage/cards/i/InfernalMedusa.java +++ b/Mage.Sets/src/mage/cards/i/InfernalMedusa.java @@ -4,7 +4,7 @@ package mage.cards.i; import java.util.UUID; import mage.MageInt; import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -37,7 +37,7 @@ public final class InfernalMedusa extends CardImpl { // Whenever Infernal Medusa blocks a creature, destroy that creature at end of combat. Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect()), true); effect.setText("destroy that creature at end of combat"); - this.addAbility(new BlocksTriggeredAbility(effect, false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(effect, false, true)); // Whenever Infernal Medusa becomes blocked by a non-Wall creature, destroy that creature at end of combat. this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(effect, filter, false)); } diff --git a/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java b/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java index 296dc6b042..74927798a1 100644 --- a/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java +++ b/Mage.Sets/src/mage/cards/j/JarethLeonineTitan.java @@ -4,7 +4,7 @@ package mage.cards.j; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.BoostSourceEffect; @@ -33,7 +33,7 @@ public final class JarethLeonineTitan extends CardImpl { this.toughness = new MageInt(7); // Whenever Jareth, Leonine Titan blocks, it gets +7/+7 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(7,7,Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(7,7,Duration.EndOfTurn), false)); // {W}: Jareth gains protection from the color of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainProtectionFromColorSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{W}")); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java b/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java index 3d664ff200..5f9df7e850 100644 --- a/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java +++ b/Mage.Sets/src/mage/cards/k/KaijinOfTheVanishingTouch.java @@ -3,7 +3,7 @@ package mage.cards.k; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -33,7 +33,7 @@ public final class KaijinOfTheVanishingTouch extends CardImpl { // Whenever Kaijin of the Vanishing Touch blocks a creature, return that creature to its owner's hand at end of combat. Effect effect = new ReturnToHandTargetEffect(); effect.setText("return that creature to its owner's hand at end of combat"); - this.addAbility(new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect)), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect)), false, true)); } public KaijinOfTheVanishingTouch(final KaijinOfTheVanishingTouch card) { diff --git a/Mage.Sets/src/mage/cards/l/LabyrinthMinotaur.java b/Mage.Sets/src/mage/cards/l/LabyrinthMinotaur.java index 6567d25fe9..bd4f03fe83 100644 --- a/Mage.Sets/src/mage/cards/l/LabyrinthMinotaur.java +++ b/Mage.Sets/src/mage/cards/l/LabyrinthMinotaur.java @@ -3,7 +3,7 @@ package mage.cards.l; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -24,7 +24,7 @@ public final class LabyrinthMinotaur extends CardImpl { this.toughness = new MageInt(4); // Whenever Labyrinth Minotaur blocks a creature, that creature doesn't untap during its controller's next untap step. - this.addAbility(new BlocksTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect("that creature"), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect("that creature"), false, true)); } public LabyrinthMinotaur(final LabyrinthMinotaur card) { diff --git a/Mage.Sets/src/mage/cards/l/LoyalSentry.java b/Mage.Sets/src/mage/cards/l/LoyalSentry.java index f66d1d2cda..f47dd8240e 100644 --- a/Mage.Sets/src/mage/cards/l/LoyalSentry.java +++ b/Mage.Sets/src/mage/cards/l/LoyalSentry.java @@ -4,7 +4,7 @@ package mage.cards.l; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DestroySourceEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; @@ -27,7 +27,7 @@ public final class LoyalSentry extends CardImpl { this.toughness = new MageInt(1); // When Loyal Sentry blocks a creature, destroy that creature and Loyal Sentry. - Ability ability = new BlocksTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); + Ability ability = new BlocksSourceTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature"), false, true, true); ability.addEffect(new DestroySourceEffect().setText("and {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MartonStromgald.java b/Mage.Sets/src/mage/cards/m/MartonStromgald.java index 1bfecf2a85..401fc91185 100644 --- a/Mage.Sets/src/mage/cards/m/MartonStromgald.java +++ b/Mage.Sets/src/mage/cards/m/MartonStromgald.java @@ -4,7 +4,7 @@ package mage.cards.m; import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; @@ -45,7 +45,7 @@ public final class MartonStromgald extends CardImpl { // Whenever Marton Stromgald blocks, other blocking creatures get +1/+1 until end of turn for each blocking creature other than Marton Stromgald. PermanentsOnBattlefieldCount blockingValue = new PermanentsOnBattlefieldCount(blockingFilter); - this.addAbility(new BlocksTriggeredAbility(new BoostAllEffect(blockingValue, blockingValue, Duration.EndOfTurn, new FilterBlockingCreature(), true, null, true), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostAllEffect(blockingValue, blockingValue, Duration.EndOfTurn, new FilterBlockingCreature(), true, null, true), false)); } diff --git a/Mage.Sets/src/mage/cards/m/Meglonoth.java b/Mage.Sets/src/mage/cards/m/Meglonoth.java index b7ed9bca89..e3c97e2fdb 100644 --- a/Mage.Sets/src/mage/cards/m/Meglonoth.java +++ b/Mage.Sets/src/mage/cards/m/Meglonoth.java @@ -2,7 +2,7 @@ package mage.cards.m; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.VigilanceAbility; @@ -35,7 +35,7 @@ public final class Meglonoth extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Whenever Meglonoth blocks a creature, Meglonoth deals damage to that creature's controller equal to Meglonoth's power. - this.addAbility(new BlocksTriggeredAbility(new MeglonothEffect(), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new MeglonothEffect(), false, true)); } diff --git a/Mage.Sets/src/mage/cards/p/PrideGuardian.java b/Mage.Sets/src/mage/cards/p/PrideGuardian.java index d4e266bf77..bd7be654b3 100644 --- a/Mage.Sets/src/mage/cards/p/PrideGuardian.java +++ b/Mage.Sets/src/mage/cards/p/PrideGuardian.java @@ -4,7 +4,7 @@ package mage.cards.p; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; @@ -27,7 +27,7 @@ public final class PrideGuardian extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // Whenever Pride Guardian blocks, you gain 3 life. - this.addAbility(new BlocksTriggeredAbility(new GainLifeEffect(3), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new GainLifeEffect(3), false)); } public PrideGuardian(final PrideGuardian card) { diff --git a/Mage.Sets/src/mage/cards/p/PsychicMembrane.java b/Mage.Sets/src/mage/cards/p/PsychicMembrane.java index 9f4a65873c..7ad3a00ebb 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicMembrane.java +++ b/Mage.Sets/src/mage/cards/p/PsychicMembrane.java @@ -3,7 +3,7 @@ package mage.cards.p; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; @@ -26,7 +26,7 @@ public final class PsychicMembrane extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // Whenever Psychic Membrane blocks, you may draw a card. - this.addAbility(new BlocksTriggeredAbility(new DrawCardSourceControllerEffect(1), true)); + this.addAbility(new BlocksSourceTriggeredAbility(new DrawCardSourceControllerEffect(1), true)); } public PsychicMembrane(final PsychicMembrane card) { diff --git a/Mage.Sets/src/mage/cards/r/RootSpider.java b/Mage.Sets/src/mage/cards/r/RootSpider.java index c9b87b45d8..0f6db8144b 100644 --- a/Mage.Sets/src/mage/cards/r/RootSpider.java +++ b/Mage.Sets/src/mage/cards/r/RootSpider.java @@ -4,7 +4,7 @@ package mage.cards.r; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; @@ -32,7 +32,7 @@ public final class RootSpider extends CardImpl { effect.setText("it gets +1/+0"); Effect effect2 = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); effect2.setText("and gains first strike until end of turn"); - Ability ability = new BlocksTriggeredAbility(effect, false); + Ability ability = new BlocksSourceTriggeredAbility(effect, false); ability.addEffect(effect2); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RoyalTrooper.java b/Mage.Sets/src/mage/cards/r/RoyalTrooper.java index a8c21ee051..9bc01da220 100644 --- a/Mage.Sets/src/mage/cards/r/RoyalTrooper.java +++ b/Mage.Sets/src/mage/cards/r/RoyalTrooper.java @@ -3,7 +3,7 @@ package mage.cards.r; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; @@ -28,7 +28,7 @@ public final class RoyalTrooper extends CardImpl { // Whenever Royal Trooper blocks, it gets +2/+2 until end of turn. Effect effect = new BoostSourceEffect(2, 2, Duration.EndOfTurn); effect.setText("it gets +2/+2 until end of turn"); - this.addAbility(new BlocksTriggeredAbility(effect, false)); + this.addAbility(new BlocksSourceTriggeredAbility(effect, false)); } public RoyalTrooper(final RoyalTrooper card) { diff --git a/Mage.Sets/src/mage/cards/s/SereneMaster.java b/Mage.Sets/src/mage/cards/s/SereneMaster.java index 1ecadfcca9..c667e9acad 100644 --- a/Mage.Sets/src/mage/cards/s/SereneMaster.java +++ b/Mage.Sets/src/mage/cards/s/SereneMaster.java @@ -4,7 +4,7 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; @@ -38,7 +38,7 @@ public final class SereneMaster extends CardImpl { this.toughness = new MageInt(2); // Whenever Serene Master blocks, exchange its power and the power of target creature it's blocking until end of combat. - this.addAbility(new BlocksTriggeredAbility(new SereneMasterEffect(), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new SereneMasterEffect(), false)); } diff --git a/Mage.Sets/src/mage/cards/s/ShieldSphere.java b/Mage.Sets/src/mage/cards/s/ShieldSphere.java index 8ae70ed6a1..d6b0cb0834 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldSphere.java +++ b/Mage.Sets/src/mage/cards/s/ShieldSphere.java @@ -3,7 +3,7 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; @@ -27,7 +27,7 @@ public final class ShieldSphere extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); // Whenever Shield Sphere blocks, put a -0/-1 counter on it. - this.addAbility(new BlocksTriggeredAbility(new AddCountersSourceEffect(new BoostCounter(0, -1)), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new AddCountersSourceEffect(new BoostCounter(0, -1)), false)); } public ShieldSphere(final ShieldSphere card) { diff --git a/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java b/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java index 6ba6f40eb1..15d8431d12 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java +++ b/Mage.Sets/src/mage/cards/s/ShieldedAetherThief.java @@ -4,7 +4,7 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.PayEnergyCost; import mage.abilities.costs.common.TapSourceCost; @@ -35,7 +35,7 @@ public final class ShieldedAetherThief extends CardImpl { this.addAbility(FlashAbility.getInstance()); // Whenever Shield Aether Thief blocks, you get {E}. - this.addAbility(new BlocksTriggeredAbility(new GetEnergyCountersControllerEffect(1), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new GetEnergyCountersControllerEffect(1), false, true)); // {T}, Pay {E}{E}{E}: Draw a card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/ShuDefender.java b/Mage.Sets/src/mage/cards/s/ShuDefender.java index 8499b97a5b..e1d7797958 100644 --- a/Mage.Sets/src/mage/cards/s/ShuDefender.java +++ b/Mage.Sets/src/mage/cards/s/ShuDefender.java @@ -3,7 +3,7 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class ShuDefender extends CardImpl { this.toughness = new MageInt(2); // Whenever Shu Defender blocks, it gets +0/+2 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(0, 2, Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(0, 2, Duration.EndOfTurn), false)); } public ShuDefender(final ShuDefender card) { diff --git a/Mage.Sets/src/mage/cards/s/Spincrusher.java b/Mage.Sets/src/mage/cards/s/Spincrusher.java index f65975bc5d..4008a7ae3b 100644 --- a/Mage.Sets/src/mage/cards/s/Spincrusher.java +++ b/Mage.Sets/src/mage/cards/s/Spincrusher.java @@ -4,7 +4,7 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; @@ -29,7 +29,7 @@ public final class Spincrusher extends CardImpl { this.toughness = new MageInt(2); // Whenever Spincrusher blocks, put a +1/+1 counter on it. - this.addAbility(new BlocksTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false)); // Remove a +1/+1 counter from Spincrusher: Spincrusher can't be blocked this turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedSourceEffect(Duration.EndOfTurn), diff --git a/Mage.Sets/src/mage/cards/s/StoicEphemera.java b/Mage.Sets/src/mage/cards/s/StoicEphemera.java index 1ad37291ac..4dec043ad8 100644 --- a/Mage.Sets/src/mage/cards/s/StoicEphemera.java +++ b/Mage.Sets/src/mage/cards/s/StoicEphemera.java @@ -3,7 +3,7 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -31,7 +31,7 @@ public final class StoicEphemera extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Stoic Ephemera blocks, sacrifice it at end of combat. - this.addAbility(new BlocksTriggeredAbility( + this.addAbility(new BlocksSourceTriggeredAbility( new CreateDelayedTriggeredAbilityEffect( new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect()) ), false, false, true diff --git a/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java b/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java index cdfef87438..e4e48e7443 100644 --- a/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java +++ b/Mage.Sets/src/mage/cards/s/SustainerOfTheRealm.java @@ -3,7 +3,7 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -28,7 +28,7 @@ public final class SustainerOfTheRealm extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever Sustainer of the Realm blocks, it gets +0/+2 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(0, 2, Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(0, 2, Duration.EndOfTurn), false)); } public SustainerOfTheRealm(final SustainerOfTheRealm card) { diff --git a/Mage.Sets/src/mage/cards/t/TownSentry.java b/Mage.Sets/src/mage/cards/t/TownSentry.java index ab9e6a8b32..8c8a75f529 100644 --- a/Mage.Sets/src/mage/cards/t/TownSentry.java +++ b/Mage.Sets/src/mage/cards/t/TownSentry.java @@ -3,7 +3,7 @@ package mage.cards.t; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class TownSentry extends CardImpl { this.toughness = new MageInt(2); // Whenever Town Sentry blocks, it gets +0/+2 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(0, 2, Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(0, 2, Duration.EndOfTurn), false)); } public TownSentry(final TownSentry card) { diff --git a/Mage.Sets/src/mage/cards/v/VertigoSpawn.java b/Mage.Sets/src/mage/cards/v/VertigoSpawn.java index 7e45c18f00..511858b0e8 100644 --- a/Mage.Sets/src/mage/cards/v/VertigoSpawn.java +++ b/Mage.Sets/src/mage/cards/v/VertigoSpawn.java @@ -4,7 +4,7 @@ package mage.cards.v; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.keyword.DefenderAbility; @@ -29,7 +29,7 @@ public final class VertigoSpawn extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // Whenever Vertigo Spawn blocks a creature, tap that creature. That creature doesn't untap during its controller's next untap step. - Ability ability = new BlocksTriggeredAbility(new TapTargetEffect("that creature"), false, true); + Ability ability = new BlocksSourceTriggeredAbility(new TapTargetEffect("that creature"), false, true); ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("that creature")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java b/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java index 767a5efa0b..f5e4389ef6 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java +++ b/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java @@ -3,7 +3,7 @@ package mage.cards.w; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.BandingAbility; import mage.abilities.keyword.DefenderAbility; @@ -47,7 +47,7 @@ public final class WallOfCaltrops extends CardImpl { } } -class WallOfCaltropsAbility extends BlocksTriggeredAbility { +class WallOfCaltropsAbility extends BlocksSourceTriggeredAbility { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Wall creature"); diff --git a/Mage.Sets/src/mage/cards/w/WallOfDust.java b/Mage.Sets/src/mage/cards/w/WallOfDust.java index 8010b59211..5a5c40947c 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfDust.java +++ b/Mage.Sets/src/mage/cards/w/WallOfDust.java @@ -3,7 +3,7 @@ package mage.cards.w; import mage.MageInt; import mage.MageObjectReference; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.RestrictionEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; @@ -32,7 +32,7 @@ public final class WallOfDust extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // Whenever Wall of Dust blocks a creature, that creature can't attack during its controller's next turn. - this.addAbility(new BlocksTriggeredAbility(new WallOfDustRestrictionEffect(), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new WallOfDustRestrictionEffect(), false, true)); } private WallOfDust(final WallOfDust card) { diff --git a/Mage.Sets/src/mage/cards/w/WallOfFrost.java b/Mage.Sets/src/mage/cards/w/WallOfFrost.java index 662f9913a7..56577ae0d9 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfFrost.java +++ b/Mage.Sets/src/mage/cards/w/WallOfFrost.java @@ -3,7 +3,7 @@ package mage.cards.w; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; @@ -27,7 +27,7 @@ public final class WallOfFrost extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // Whenever Wall of Frost blocks a creature, that creature doesn't untap during its controller's next untap step. - this.addAbility(new BlocksTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect("that creature"), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect("that creature"), false, true)); } public WallOfFrost(final WallOfFrost card) { diff --git a/Mage.Sets/src/mage/cards/w/WallOfJunk.java b/Mage.Sets/src/mage/cards/w/WallOfJunk.java index 0cf96fd25f..248ed1d654 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfJunk.java +++ b/Mage.Sets/src/mage/cards/w/WallOfJunk.java @@ -3,7 +3,7 @@ package mage.cards.w; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -33,7 +33,7 @@ public final class WallOfJunk extends CardImpl { Effect effect = new CreateDelayedTriggeredAbilityEffect( new AtTheEndOfCombatDelayedTriggeredAbility(new ReturnToHandSourceEffect(true))); effect.setText("return it to its owner's hand at end of combat"); - this.addAbility(new BlocksTriggeredAbility(effect, false, false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(effect, false, false, true)); } public WallOfJunk(final WallOfJunk card) { diff --git a/Mage.Sets/src/mage/cards/w/WallOfTears.java b/Mage.Sets/src/mage/cards/w/WallOfTears.java index ae45f14dec..0abba7d085 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTears.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTears.java @@ -3,7 +3,7 @@ package mage.cards.w; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; @@ -32,7 +32,7 @@ public final class WallOfTears extends CardImpl { // Whenever Wall of Tears blocks a creature, return that creature to its owner's hand at end of combat. Effect effect = new ReturnToHandTargetEffect(); effect.setText("return that creature to its owner's hand at end of combat"); - this.addAbility(new BlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect)), false, true)); + this.addAbility(new BlocksSourceTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect)), false, true)); } public WallOfTears(final WallOfTears card) { diff --git a/Mage.Sets/src/mage/cards/w/WoollyRazorback.java b/Mage.Sets/src/mage/cards/w/WoollyRazorback.java index c94e6f42ab..101a29b030 100644 --- a/Mage.Sets/src/mage/cards/w/WoollyRazorback.java +++ b/Mage.Sets/src/mage/cards/w/WoollyRazorback.java @@ -4,7 +4,7 @@ package mage.cards.w; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceHasCounterCondition; @@ -48,7 +48,7 @@ public final class WoollyRazorback extends CardImpl { new SourceHasCounterCondition(CounterType.ICE), "and it has defender")); this.addAbility(ability); // Whenever Woolly Razorback blocks, remove an ice counter from it. - this.addAbility(new BlocksTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ICE.createInstance()), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ICE.createInstance()), false)); } public WoollyRazorback(final WoollyRazorback card) { diff --git a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java index 8f038cb3a2..f26d0579c6 100644 --- a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java +++ b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java @@ -5,7 +5,7 @@ import java.util.Set; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class YdwenEfreet extends CardImpl { this.toughness = new MageInt(6); // Whenever Ydwen Efreet blocks, flip a coin. If you lose the flip, remove Ydwen Efreet from combat and it can't block this turn. Creatures it was blocking that had become blocked by only Ydwen Efreet this combat become unblocked. - this.addAbility(new BlocksTriggeredAbility(new YdwenEfreetEffect(), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new YdwenEfreetEffect(), false)); } public YdwenEfreet(final YdwenEfreet card) { diff --git a/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java b/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java index a6a5bea417..881fc50d9f 100644 --- a/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java +++ b/Mage.Sets/src/mage/cards/z/ZephyrSpirit.java @@ -3,7 +3,7 @@ package mage.cards.z; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -24,7 +24,7 @@ public final class ZephyrSpirit extends CardImpl { this.toughness = new MageInt(6); // When Zephyr Spirit blocks, return it to its owner's hand. - this.addAbility(new BlocksTriggeredAbility( + this.addAbility(new BlocksSourceTriggeredAbility( new ReturnToHandSourceEffect(true).setText("return it to its owner's hand"), false, false, true )); diff --git a/Mage.Sets/src/mage/cards/z/ZhaoZilongTigerGeneral.java b/Mage.Sets/src/mage/cards/z/ZhaoZilongTigerGeneral.java index c23c81f669..19c52545c1 100644 --- a/Mage.Sets/src/mage/cards/z/ZhaoZilongTigerGeneral.java +++ b/Mage.Sets/src/mage/cards/z/ZhaoZilongTigerGeneral.java @@ -3,7 +3,7 @@ package mage.cards.z; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.HorsemanshipAbility; import mage.cards.CardImpl; @@ -29,7 +29,7 @@ public final class ZhaoZilongTigerGeneral extends CardImpl { // Horsemanship this.addAbility(HorsemanshipAbility.getInstance()); // Whenever Zhao Zilong, Tiger General blocks, it gets +1/+1 until end of turn. - this.addAbility(new BlocksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); } public ZhaoZilongTigerGeneral(final ZhaoZilongTigerGeneral card) { diff --git a/Mage/src/main/java/mage/abilities/common/BlocksSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BlocksSourceTriggeredAbility.java new file mode 100644 index 0000000000..4d1b2a88ff --- /dev/null +++ b/Mage/src/main/java/mage/abilities/common/BlocksSourceTriggeredAbility.java @@ -0,0 +1,67 @@ + +package mage.abilities.common; + +import mage.constants.Zone; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author North + */ +public class BlocksSourceTriggeredAbility extends TriggeredAbilityImpl { + + private boolean setTargetPointer; + private boolean once = false; + + public BlocksSourceTriggeredAbility(Effect effect, boolean optional) { + this(effect, optional, false); + } + + public BlocksSourceTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) { + this(effect, optional, setTargetPointer, false); + } + + public BlocksSourceTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer, boolean once) { + super(Zone.BATTLEFIELD, effect, optional); + this.setTargetPointer = setTargetPointer; + this.once = once; + } + + public BlocksSourceTriggeredAbility(final BlocksSourceTriggeredAbility ability) { + super(ability); + this.setTargetPointer = ability.setTargetPointer; + this.once = ability.once; + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.BLOCKER_DECLARED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getSourceId().equals(this.getSourceId())) { + if (setTargetPointer) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getTargetId())); + } + } + return true; + } + return false; + } + + @Override + public String getRule() { + return "When" + (once ? "" : "ever") + " {this} blocks" + (setTargetPointer ? " a creature, " : ", ") + super.getRule(); + } + + @Override + public BlocksSourceTriggeredAbility copy() { + return new BlocksSourceTriggeredAbility(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java b/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java index c2d50814b8..2e52c6e8cb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java @@ -1,7 +1,7 @@ package mage.game.permanent.token; import mage.MageInt; -import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.common.BlocksSourceTriggeredAbility; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.constants.CardType; import mage.constants.SubType; @@ -20,7 +20,7 @@ public final class MesmerizingBenthidToken extends TokenImpl { subtype.add(SubType.ILLUSION); power = new MageInt(0); toughness = new MageInt(2); - this.addAbility(new BlocksTriggeredAbility( + this.addAbility(new BlocksSourceTriggeredAbility( new DontUntapInControllersNextUntapStepTargetEffect("that creature"), false, true ));