diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java b/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java index c316c0d310a..077b3a4a854 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java @@ -61,7 +61,7 @@ public class MorgueBurst extends CardImpl { // Return target creature card from your graveyard to your hand. Morgue Burst deals damage to target creature or player equal to the power of the card returned this way. this.getSpellAbility().addEffect(new MorgueBurstEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(true)); } public MorgueBurst(final MorgueBurst card) { @@ -95,7 +95,7 @@ class MorgueBurstEffect extends OneShotEffect { if (card != null) { Player player = game.getPlayer(card.getOwnerId()); if (player != null) { - card.moveToZone(Zone.HAND, source.getSourceId(), game, false); + player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.HAND); int damage = card.getPower().getValue(); Permanent creature = game.getPermanent(source.getTargets().get(1).getTargets().get(0)); if (creature != null) { diff --git a/Mage.Sets/src/mage/sets/innistrad/GutterGrime.java b/Mage.Sets/src/mage/sets/innistrad/GutterGrime.java index 3f2f3f1805c..2c9df835fc5 100644 --- a/Mage.Sets/src/mage/sets/innistrad/GutterGrime.java +++ b/Mage.Sets/src/mage/sets/innistrad/GutterGrime.java @@ -116,7 +116,7 @@ class GutterGrimeTriggeredAbility extends TriggeredAbilityImpl { // Dauntless Dourbark's power and toughness are each equal to the number of Forests you control plus the number of Treefolk you control. DynamicValue amount = new PermanentsOnBattlefieldCount(filter); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(amount, Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(amount, Duration.EndOfGame))); // Dauntless Dourbark has trample as long as you control another Treefolk. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), new ControlsPermanentCondition(filter2), rule))); diff --git a/Mage.Sets/src/mage/sets/odyssey/Cantivore.java b/Mage.Sets/src/mage/sets/odyssey/Cantivore.java index 1b53cae4950..3d641fae0ce 100644 --- a/Mage.Sets/src/mage/sets/odyssey/Cantivore.java +++ b/Mage.Sets/src/mage/sets/odyssey/Cantivore.java @@ -68,7 +68,7 @@ public class Cantivore extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); // Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards. DynamicValue value = (new CardsInAllGraveyardsCount(filter)); - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value , Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value , Duration.EndOfGame))); } public Cantivore(final Cantivore card) { diff --git a/Mage.Sets/src/mage/sets/odyssey/Cognivore.java b/Mage.Sets/src/mage/sets/odyssey/Cognivore.java index f880b26b8c3..c5467b0589d 100644 --- a/Mage.Sets/src/mage/sets/odyssey/Cognivore.java +++ b/Mage.Sets/src/mage/sets/odyssey/Cognivore.java @@ -67,7 +67,7 @@ public class Cognivore extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Cognivore's power and toughness are each equal to the number of instant cards in all graveyards. DynamicValue value = (new CardsInAllGraveyardsCount(filter)); - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value, Duration.EndOfGame))); } public Cognivore(final Cognivore card) { diff --git a/Mage.Sets/src/mage/sets/onslaught/SoullessOne.java b/Mage.Sets/src/mage/sets/onslaught/SoullessOne.java index 95542804880..bb6f4746b68 100644 --- a/Mage.Sets/src/mage/sets/onslaught/SoullessOne.java +++ b/Mage.Sets/src/mage/sets/onslaught/SoullessOne.java @@ -62,7 +62,7 @@ public class SoullessOne extends CardImpl { this.toughness = new MageInt(0); // Soulless One's power and toughness are each equal to the number of Zombies on the battlefield plus the number of Zombie cards in all graveyards. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new SoullessOneDynamicCount(), Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new SoullessOneDynamicCount(), Duration.EndOfGame))); } public SoullessOne(final SoullessOne card) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java index 7c24a99b485..0307857aefd 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java @@ -60,7 +60,11 @@ public class ChimericMass extends CardImpl { public ChimericMass(UUID ownerId) { super(ownerId, 141, "Chimeric Mass", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{X}"); this.expansionSetCode = "SOM"; + + // Chimeric Mass enters the battlefield with X charge counters on it. this.addAbility(new EntersBattlefieldAbility(new ChimericMassEffect(), "{this} enters the battlefield with X charge counters on it")); + + // {1}: Until end of turn, Chimeric Mass becomes a Construct artifact creature with "This creature's power and toughness are each equal to the number of charge counters on it." this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericMassToken(), "", Duration.EndOfTurn), new GenericManaCost(1))); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/MorgueBurstTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/MorgueBurstTest.java new file mode 100644 index 00000000000..311c57f0837 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/MorgueBurstTest.java @@ -0,0 +1,48 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package org.mage.test.cards.single; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ + +/* +Morgue Burst {4}{B}{R} +Sorcery +Return target creature card from your graveyard to your hand. Morgue Burst deals damage to target creature or player equal to the power of the card returned this way. +*/ + + + +public class MorgueBurstTest extends CardTestPlayerBase { + + // Character defining static abilities (defining P/T of Nightmare) work in all zones + @Test + public void testNightmare() { + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + addCard(Zone.HAND, playerA, "Morgue Burst"); + addCard(Zone.GRAVEYARD, playerA, "Nightmare"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Morgue Burst", "Nightmare^targetPlayer=PlayerB"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 16); + assertGraveyardCount(playerA, "Morgue Burst", 1); + assertHandCount(playerA, 1); + } + +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/effects/common/continious/SetPowerToughnessSourceEffect.java b/Mage/src/mage/abilities/effects/common/continious/SetPowerToughnessSourceEffect.java index 1a39120d70f..2c45b41c822 100644 --- a/Mage/src/mage/abilities/effects/common/continious/SetPowerToughnessSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/SetPowerToughnessSourceEffect.java @@ -35,6 +35,7 @@ import mage.constants.SubLayer; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.Card; import mage.game.Game; import mage.game.permanent.Permanent; @@ -75,24 +76,42 @@ public class SetPowerToughnessSourceEffect extends ContinuousEffectImpl