diff --git a/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java b/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java index 16d5b40c37e..d8d9a07c62a 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java +++ b/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java @@ -116,7 +116,7 @@ class OrzhovCharmReturnToHandEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent target = game.getPermanent(getTargetPointer().getFirst(game, source)); if (target != null) { - LinkedList attachments = new LinkedList(); + LinkedList attachments = new LinkedList<>(); attachments.addAll(target.getAttachments()); for (UUID attachmentId : attachments) { Permanent attachment = game.getPermanent(attachmentId); diff --git a/Mage.Sets/src/mage/sets/tempest/MoggFanatic.java b/Mage.Sets/src/mage/sets/tempest/MoggFanatic.java index 882b7000539..718a66c3f67 100644 --- a/Mage.Sets/src/mage/sets/tempest/MoggFanatic.java +++ b/Mage.Sets/src/mage/sets/tempest/MoggFanatic.java @@ -50,9 +50,11 @@ public class MoggFanatic extends CardImpl { super(ownerId, 190, "Mogg Fanatic", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); this.expansionSetCode = "TMP"; this.subtype.add("Goblin"); - this.color.setRed(true); + this.power = new MageInt(1); this.toughness = new MageInt(1); + + // Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/lrw/BurrentonForgeTenderTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/lrw/BurrentonForgeTenderTest.java index c573565ef06..ef9adf61740 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/lrw/BurrentonForgeTenderTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/lrw/BurrentonForgeTenderTest.java @@ -123,6 +123,12 @@ public class BurrentonForgeTenderTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Soldier of the Pantheon"); // Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player. addCard(Zone.BATTLEFIELD, playerA, "Mogg Fanatic"); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + // Choose one - Return target creature you control and all Auras you control attached to it to their owner's hand; + // or destroy target creature and you lose life equal to its toughness; + // or return target creature card with converted mana cost 1 or less from your graveyard to the battlefield. + addCard(Zone.HAND, playerA, "Orzhov Charm"); // Kicker {5} (You may pay an additional as you cast this spell.) // Put a token onto the battlefield that's a copy of target creature. If Rite of Replication was kicked, put five of those tokens onto the battlefield instead. @@ -132,8 +138,9 @@ public class BurrentonForgeTenderTest extends CardTestPlayerBase { castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Rite of Replication", "Mogg Fanatic"); setChoice(playerB, "No"); // no kicker - activateAbility(2, PhaseStep.BEGIN_COMBAT, playerA, "Sacrifice {this}: {source} deals 1 damage to target creature or player.",playerB); - + castSpell(2, PhaseStep.BEGIN_COMBAT, playerA, "Orzhov Charm", "Mogg Fanatic"); + setModeChoice(playerA, "1"); + activateAbility(2, PhaseStep.END_COMBAT, playerA, "Sacrifice {this}: Prevent all damage a red source of your choice would deal this turn."); playerA.addChoice("Mogg Fanatic"); @@ -141,11 +148,10 @@ public class BurrentonForgeTenderTest extends CardTestPlayerBase { setStopAt(2, PhaseStep.END_TURN); execute(); - - assertLife(playerB, 19); assertPermanentCount(playerB, "Mogg Fanatic", 0); - assertGraveyardCount(playerA, "Mogg Fanatic", 1); + assertGraveyardCount(playerA, "Orzhov Charm", 1); + assertHandCount(playerA, "Mogg Fanatic", 1); assertGraveyardCount(playerB, "Rite of Replication", 1); assertGraveyardCount(playerA, "Burrenton Forge-Tender", 1); diff --git a/Mage/src/mage/abilities/effects/common/PreventDamageBySourceEffect.java b/Mage/src/mage/abilities/effects/common/PreventDamageBySourceEffect.java index 1b26dcf0f62..da4b7082b3c 100644 --- a/Mage/src/mage/abilities/effects/common/PreventDamageBySourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/PreventDamageBySourceEffect.java @@ -31,14 +31,12 @@ import mage.MageObject; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.effects.PreventionEffectImpl; -import mage.cards.Card; import mage.constants.Duration; import mage.constants.Outcome; import mage.filter.FilterObject; import mage.game.Game; import mage.game.events.GameEvent; import mage.target.TargetSource; -import mage.target.targetpointer.FixedTarget; /** *