mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Undying - Fixed that the creature with undying returnd under the control of the previous controller instead of the card owner.
This commit is contained in:
parent
a8f8697a25
commit
329165555b
2 changed files with 38 additions and 1 deletions
|
@ -76,4 +76,41 @@ public class UndyingTest extends CardTestPlayerBase {
|
||||||
assertPowerToughness(playerA, "Elite Vanguard", 3, 2);
|
assertPowerToughness(playerA, "Elite Vanguard", 3, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests "Threads of Disloyalty enchanting Strangleroot Geist: after geist died it returns to the bf under opponent's control."
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testUndyingControlledReturnsToOwner() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||||
|
// Strangleroot Geist 2/1
|
||||||
|
// Haste
|
||||||
|
// Undying
|
||||||
|
// (When it dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
|
||||||
|
addCard(Zone.HAND, playerA, "Strangleroot Geist");
|
||||||
|
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Island", 3);
|
||||||
|
// Threads of Disloyalty {1}{U}{U}
|
||||||
|
// Enchant creature with converted mana cost 2 or less
|
||||||
|
// You control enchanted creature.
|
||||||
|
addCard(Zone.HAND, playerB, "Threads of Disloyalty");
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Strangleroot Geist");
|
||||||
|
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Threads of Disloyalty", "Strangleroot Geist");
|
||||||
|
|
||||||
|
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Strangleroot Geist");
|
||||||
|
setStopAt(2, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerB, "Threads of Disloyalty", 1);
|
||||||
|
assertGraveyardCount(playerA, "Lightning Bolt",1);
|
||||||
|
assertPermanentCount(playerB, "Strangleroot Geist", 0);
|
||||||
|
assertPermanentCount(playerA, "Strangleroot Geist", 1);
|
||||||
|
assertPowerToughness(playerA, "Strangleroot Geist", 3, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class UndyingAbility extends DiesTriggeredAbility {
|
||||||
|
|
||||||
public UndyingAbility() {
|
public UndyingAbility() {
|
||||||
super(new UndyingEffect());
|
super(new UndyingEffect());
|
||||||
this.addEffect(new ReturnSourceFromGraveyardToBattlefieldEffect());
|
this.addEffect(new ReturnSourceFromGraveyardToBattlefieldEffect(false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public UndyingAbility(final UndyingAbility ability) {
|
public UndyingAbility(final UndyingAbility ability) {
|
||||||
|
|
Loading…
Reference in a new issue