mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Added another Morph test.
This commit is contained in:
parent
e747b48b41
commit
2691dea7ef
2 changed files with 47 additions and 1 deletions
|
@ -476,6 +476,10 @@ public class MorphTest extends CardTestPlayerBase {
|
|||
|
||||
@Test
|
||||
public void testDiesTriggeredDoesNotTriggerIfFaceDown() {
|
||||
// Flying
|
||||
// When Ashcloud Phoenix dies, return it to the battlefield face down.
|
||||
// Morph (You may cast this card face down as a 2/2 creature for . Turn it face up any time for its morph cost.)
|
||||
// When Ashcloud Phoenix is turned face up, it deals 2 damage to each player.
|
||||
addCard(Zone.HAND, playerA, "Ashcloud Phoenix", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
|
||||
|
@ -505,5 +509,47 @@ public class MorphTest extends CardTestPlayerBase {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Check that a DiesTriggeredAbility of a creature does not trigger
|
||||
* if the creature dies face down in combat
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testDiesTriggeredDoesNotTriggerInCombatIfFaceDown() {
|
||||
// Flying
|
||||
// When Ashcloud Phoenix dies, return it to the battlefield face down.
|
||||
// Morph (You may cast this card face down as a 2/2 creature for . Turn it face up any time for its morph cost.)
|
||||
// When Ashcloud Phoenix is turned face up, it deals 2 damage to each player.
|
||||
addCard(Zone.HAND, playerA, "Ashcloud Phoenix", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
||||
// First strike, forestwalk, vigilance
|
||||
// (This creature deals combat damage before creatures without first strike, it can't be blocked as long as defending player controls a Forest, and attacking doesn't cause this creature to tap.)
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mirri, Cat Warrior");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ashcloud Phoenix");
|
||||
setChoice(playerA, "Yes"); // cast it face down as 2/2 creature
|
||||
|
||||
attack(2, playerB, "Mirri, Cat Warrior");
|
||||
block(2, playerA, "face down creature", "Mirri, Cat Warrior");
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Ashcloud Phoenix", 1);
|
||||
|
||||
|
||||
for (Card card: playerA.getGraveyard().getCards(currentGame)) {
|
||||
if (card.getName().equals("Ashcloud Phoenix")) {
|
||||
Assert.assertEquals("Ashcloud Phoenix has to be face up in graveyard", false, card.isFaceDown(currentGame));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class NamePredicate implements Predicate<MageObject> {
|
|||
SplitCard card = (SplitCard) ((Spell)input).getCard();
|
||||
return name.equals(card.getLeftHalfCard().getName()) || name.equals(card.getRightHalfCard().getLogName());
|
||||
} else {
|
||||
return name.equals(input.getName());
|
||||
return name.equals(input.getLogName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue