From aa5623fd7077ee6fdf5e5b1743ea9f8e2cd7fd39 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 9 Aug 2016 22:52:22 +0200 Subject: [PATCH] * Blinkmoth Urn - Fixed that the created mana was not removed at the steps end. --- .../src/mage/sets/mirrodin/BlinkmothUrn.java | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Mage.Sets/src/mage/sets/mirrodin/BlinkmothUrn.java b/Mage.Sets/src/mage/sets/mirrodin/BlinkmothUrn.java index a5ac16b9a1c..abe346b9f40 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/BlinkmothUrn.java +++ b/Mage.Sets/src/mage/sets/mirrodin/BlinkmothUrn.java @@ -26,17 +26,17 @@ import mage.players.Player; * @author nickmyers */ public class BlinkmothUrn extends CardImpl { - + public BlinkmothUrn(UUID ownerId) { super(ownerId, 145, "Blinkmoth Urn", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}"); this.expansionSetCode = "MRD"; - - // At the beginning of each player's precombat main phase, if - // Blinkmoth Urn is untapped, that player adds {1} to his or her + + // At the beginning of each player's precombat main phase, if + // Blinkmoth Urn is untapped, that player adds {1} to his or her // mana pool for each artifact he or she controls. this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(new BlinkmothUrnEffect(), TargetController.ANY, false)); } - + public BlinkmothUrn(final BlinkmothUrn card) { super(card); } @@ -45,37 +45,35 @@ public class BlinkmothUrn extends CardImpl { public BlinkmothUrn copy() { return new BlinkmothUrn(this); } - + } class BlinkmothUrnEffect extends OneShotEffect { - + public BlinkmothUrnEffect() { super(Outcome.PutManaInPool); this.staticText = "if Blinkmoth Urn is untapped, that player adds {1} to his or her mana pool for each artifact he or she controls"; } - + public BlinkmothUrnEffect(final BlinkmothUrnEffect effect) { super(effect); } - + @java.lang.Override public BlinkmothUrnEffect copy() { return new BlinkmothUrnEffect(this); } - + @java.lang.Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(game.getActivePlayerId()); FilterArtifactPermanent filter = new FilterArtifactPermanent("artifacts you control"); filter.add(new ControllerIdPredicate(game.getActivePlayerId())); Permanent sourcePermanent = game.getPermanent(source.getSourceId()); - if(player != null && sourcePermanent != null && !sourcePermanent.isTapped()) { + if (player != null && sourcePermanent != null && !sourcePermanent.isTapped()) { player.getManaPool().addMana(Mana.ColorlessMana( - game.getState(). - getBattlefield(). - getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game). - size()), game, source, true); + game.getState().getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game). + size()), game, source, false); return true; } return false;