diff --git a/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java b/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java index 2e6c8df52e..531be384af 100644 --- a/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java +++ b/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java @@ -29,6 +29,7 @@ public final class ProdigalPyromancer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); + // {T} : Prodigal Pyromancer deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/designations/MonarchTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/designations/MonarchTest.java index cf62f75955..5d02ece721 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/designations/MonarchTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/designations/MonarchTest.java @@ -9,17 +9,18 @@ import mage.game.Game; import mage.game.GameException; import mage.game.mulligan.MulliganType; import org.junit.Test; -import org.mage.test.serverside.base.CardTestMultiPlayerBaseWithRangeAll; +import org.mage.test.serverside.base.CardTestMultiPlayerBase; import java.io.FileNotFoundException; /** * @author JayDi85 */ -public class MonarchTest extends CardTestMultiPlayerBaseWithRangeAll { +public class MonarchTest extends CardTestMultiPlayerBase { @Override protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException { + // reason: must use MultiplayerAttackOption.MULTIPLE Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20); // Player order: A -> D -> C -> B playerA = createPlayer(game, "PlayerA"); @@ -93,4 +94,31 @@ public class MonarchTest extends CardTestMultiPlayerBaseWithRangeAll { setStopAt(3 + 4, PhaseStep.END_TURN); execute(); } + + @Test + public void test_MonarchByDies() { + // Player order: A -> D -> C -> B + addCustomEffect_TargetDamage(playerA, 100); + + // When Thorn of the Black Rose enters the battlefield, you become the monarch. + addCard(Zone.HAND, playerA, "Thorn of the Black Rose", 1); // {3}{B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4); + + // A as monarch + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thorn of the Black Rose"); + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + checkMonarch("monarch to A", 1, PhaseStep.PRECOMBAT_MAIN, playerA, playerA); + + // kill itself, so monarch goes to next - player D + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "target damage 100", playerA); + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + + checkMonarch("monarch to D", 2, PhaseStep.POSTCOMBAT_MAIN, playerD, playerD); + + setStrictChooseMode(true); + setStopAt(2, PhaseStep.END_TURN); + execute(); + + assertLostTheGame(playerA); + } } diff --git a/Mage/src/main/java/mage/designations/Designation.java b/Mage/src/main/java/mage/designations/Designation.java index 520dc9a46d..61cf69eb1f 100644 --- a/Mage/src/main/java/mage/designations/Designation.java +++ b/Mage/src/main/java/mage/designations/Designation.java @@ -35,7 +35,6 @@ public abstract class Designation extends MageObjectImpl { private boolean copy; private MageObject copyFrom; // copied card INFO (used to call original adjusters) - private Abilities abilites = new AbilitiesImpl<>(); public Designation(DesignationType designationType) { this(designationType, true); @@ -56,7 +55,6 @@ public abstract class Designation extends MageObjectImpl { this.frameStyle = designation.frameStyle; this.copy = designation.copy; this.copyFrom = (designation.copyFrom != null ? designation.copyFrom.copy() : null); - this.abilites = designation.abilites.copy(); } @Override @@ -80,8 +78,8 @@ public abstract class Designation extends MageObjectImpl { public void addAbility(Ability ability) { ability.setSourceId(this.objectId); - abilites.add(ability); - abilites.addAll(ability.getSubAbilities()); + this.abilities.add(ability); + this.abilities.addAll(ability.getSubAbilities()); } @Override