diff --git a/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java b/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java index f32c943231..701c872a7a 100644 --- a/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java +++ b/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java @@ -55,7 +55,7 @@ public final class BushiTenderfoot extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public BushiTenderfoot(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/c/CrushingPain.java b/Mage.Sets/src/mage/cards/c/CrushingPain.java index ae21dadc94..abf8dcdb68 100644 --- a/Mage.Sets/src/mage/cards/c/CrushingPain.java +++ b/Mage.Sets/src/mage/cards/c/CrushingPain.java @@ -48,7 +48,7 @@ public final class CrushingPain extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public CrushingPain (UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/f/FatalBlow.java b/Mage.Sets/src/mage/cards/f/FatalBlow.java index 90c20e320d..b20be2d69f 100644 --- a/Mage.Sets/src/mage/cards/f/FatalBlow.java +++ b/Mage.Sets/src/mage/cards/f/FatalBlow.java @@ -19,7 +19,7 @@ public final class FatalBlow extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public FatalBlow(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetCutthroat.java b/Mage.Sets/src/mage/cards/f/FathomFleetCutthroat.java index 42cc110b35..605e0be90a 100644 --- a/Mage.Sets/src/mage/cards/f/FathomFleetCutthroat.java +++ b/Mage.Sets/src/mage/cards/f/FathomFleetCutthroat.java @@ -24,7 +24,7 @@ public final class FathomFleetCutthroat extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); filter.add(TargetController.OPPONENT.getControllerPredicate()); } diff --git a/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java b/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java index 0b867e664e..68c4c442ad 100644 --- a/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java +++ b/Mage.Sets/src/mage/cards/f/FinalStingFaerie.java @@ -24,7 +24,7 @@ public final class FinalStingFaerie extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public FinalStingFaerie(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/g/GiantShark.java b/Mage.Sets/src/mage/cards/g/GiantShark.java index 9ebb586001..cadec3245c 100644 --- a/Mage.Sets/src/mage/cards/g/GiantShark.java +++ b/Mage.Sets/src/mage/cards/g/GiantShark.java @@ -29,7 +29,7 @@ public final class GiantShark extends CardImpl { static { filter.add(SubType.ISLAND.getPredicate()); - filter2.add(new WasDealtDamageThisTurnPredicate()); + filter2.add(WasDealtDamageThisTurnPredicate.instance); } public GiantShark(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/h/HoodedAssassin.java b/Mage.Sets/src/mage/cards/h/HoodedAssassin.java index 45b6f8dc6c..08bef9541f 100644 --- a/Mage.Sets/src/mage/cards/h/HoodedAssassin.java +++ b/Mage.Sets/src/mage/cards/h/HoodedAssassin.java @@ -26,7 +26,7 @@ public final class HoodedAssassin extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public HoodedAssassin(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/Inflame.java b/Mage.Sets/src/mage/cards/i/Inflame.java index 680e649523..04df231935 100644 --- a/Mage.Sets/src/mage/cards/i/Inflame.java +++ b/Mage.Sets/src/mage/cards/i/Inflame.java @@ -18,7 +18,7 @@ public final class Inflame extends CardImpl { private static final FilterCreaturePermanent FILTER = new FilterCreaturePermanent("creature dealt damage this turn"); static { - FILTER.add(new WasDealtDamageThisTurnPredicate()); + FILTER.add(WasDealtDamageThisTurnPredicate.instance); } public Inflame(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java b/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java index b58f943700..c9b8deed98 100644 --- a/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java +++ b/Mage.Sets/src/mage/cards/i/InitiateOfBlood.java @@ -56,7 +56,7 @@ public final class InitiateOfBlood extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public InitiateOfBlood(UUID ownerId, CardSetInfo setInfo) { @@ -94,7 +94,7 @@ class GokaTheUnjust extends TokenImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } GokaTheUnjust() { diff --git a/Mage.Sets/src/mage/cards/j/JarlOfTheForsaken.java b/Mage.Sets/src/mage/cards/j/JarlOfTheForsaken.java new file mode 100644 index 0000000000..f56ad93371 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JarlOfTheForsaken.java @@ -0,0 +1,63 @@ +package mage.cards.j; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.ForetellAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; +import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class JarlOfTheForsaken extends CardImpl { + + private static final FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent( + "creature or planeswalker an opponent controls that was dealt damage this turn" + ); + + static { + filter.add(TargetController.OPPONENT.getControllerPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); + } + + public JarlOfTheForsaken(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // When Jarl of the Forsaken enters the battlefield, destroy target creature or planeswalker an opponent controls that was dealt damage this turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + + // Foretell {1}{B} + this.addAbility(new ForetellAbility(this, "{1}{B}")); + } + + private JarlOfTheForsaken(final JarlOfTheForsaken card) { + super(card); + } + + @Override + public JarlOfTheForsaken copy() { + return new JarlOfTheForsaken(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LurkingDeadeye.java b/Mage.Sets/src/mage/cards/l/LurkingDeadeye.java index a4b1aae857..3c2c3cdb55 100644 --- a/Mage.Sets/src/mage/cards/l/LurkingDeadeye.java +++ b/Mage.Sets/src/mage/cards/l/LurkingDeadeye.java @@ -25,7 +25,7 @@ public final class LurkingDeadeye extends CardImpl { = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public LurkingDeadeye(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/OgreSiegebreaker.java b/Mage.Sets/src/mage/cards/o/OgreSiegebreaker.java index 5d1eadf111..b2401e8896 100644 --- a/Mage.Sets/src/mage/cards/o/OgreSiegebreaker.java +++ b/Mage.Sets/src/mage/cards/o/OgreSiegebreaker.java @@ -25,7 +25,7 @@ public final class OgreSiegebreaker extends CardImpl { = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public OgreSiegebreaker(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/Opportunist.java b/Mage.Sets/src/mage/cards/o/Opportunist.java index 9e53c0354d..f99bf5baeb 100644 --- a/Mage.Sets/src/mage/cards/o/Opportunist.java +++ b/Mage.Sets/src/mage/cards/o/Opportunist.java @@ -25,7 +25,7 @@ public final class Opportunist extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public Opportunist(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java b/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java index be18cf835e..97505a03c1 100644 --- a/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java +++ b/Mage.Sets/src/mage/cards/o/OrzhovEuthanist.java @@ -23,7 +23,7 @@ public final class OrzhovEuthanist extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public OrzhovEuthanist(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/v/VraskasFinisher.java b/Mage.Sets/src/mage/cards/v/VraskasFinisher.java index dbd0e90316..2b0fbf1b20 100644 --- a/Mage.Sets/src/mage/cards/v/VraskasFinisher.java +++ b/Mage.Sets/src/mage/cards/v/VraskasFinisher.java @@ -26,7 +26,7 @@ public final class VraskasFinisher extends CardImpl { ); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); filter.add(TargetController.OPPONENT.getControllerPredicate()); } diff --git a/Mage.Sets/src/mage/cards/w/WitchsMist.java b/Mage.Sets/src/mage/cards/w/WitchsMist.java index 6d6a5ce940..61fe5019ff 100644 --- a/Mage.Sets/src/mage/cards/w/WitchsMist.java +++ b/Mage.Sets/src/mage/cards/w/WitchsMist.java @@ -24,7 +24,7 @@ public final class WitchsMist extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn"); static { - filter.add(new WasDealtDamageThisTurnPredicate()); + filter.add(WasDealtDamageThisTurnPredicate.instance); } public WitchsMist(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 743b87679c..4611bd90e2 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -181,6 +181,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Invasion of the Giants", 215, Rarity.UNCOMMON, mage.cards.i.InvasionOfTheGiants.class)); cards.add(new SetCardInfo("Iron Verdict", 17, Rarity.COMMON, mage.cards.i.IronVerdict.class)); cards.add(new SetCardInfo("Island", 395, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Jarl of the Forsaken", 100, Rarity.COMMON, mage.cards.j.JarlOfTheForsaken.class)); cards.add(new SetCardInfo("Jaspera Sentinel", 178, Rarity.COMMON, mage.cards.j.JasperaSentinel.class)); cards.add(new SetCardInfo("Jorn, God of Winter", 179, Rarity.RARE, mage.cards.j.JornGodOfWinter.class)); cards.add(new SetCardInfo("Kardur's Vicious Return", 217, Rarity.UNCOMMON, mage.cards.k.KardursViciousReturn.class)); diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java index 8ed898e82a..fb86199f0b 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/WasDealtDamageThisTurnPredicate.java @@ -1,4 +1,3 @@ - package mage.filter.predicate.permanent; import mage.filter.predicate.Predicate; @@ -6,10 +5,10 @@ import mage.game.Game; import mage.game.permanent.Permanent; /** - * * @author North */ -public class WasDealtDamageThisTurnPredicate implements Predicate { +public enum WasDealtDamageThisTurnPredicate implements Predicate { + instance; @Override public boolean apply(Permanent input, Game game) {