Avacyn test for reported bug. Creeping Dread efficiency improvements

This commit is contained in:
drmDev 2016-04-02 08:16:47 -04:00
parent b3e8f80883
commit e7b80d9548
2 changed files with 68 additions and 12 deletions

View file

@ -0,0 +1,56 @@
package org.mage.test.cards.single.soi;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.game.permanent.Permanent;
import org.junit.Assert;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* {3}{W}{W} Angel - day
*
Flash
Flying, vigilance
When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn.
* When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep.
*
* (Night) - red card
* When this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent.
*
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public class ArchangelAvacynTest extends CardTestPlayerBase {
/**
* Reported bug: "Archangel Avacyn damages herself when she transforms"
*/
@Test
public void basicTransformTest() {
addCard(Zone.BATTLEFIELD, playerA, "Archangel Avacyn");
addCard(Zone.BATTLEFIELD, playerA, "Wall of Omens"); // 0/4
addCard(Zone.HAND, playerA, "Elite Vanguard"); // 2/1
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
addCard(Zone.BATTLEFIELD, playerB, "Hill Giant"); // 3/1
addCard(Zone.BATTLEFIELD, playerB, "Wall of Roots"); // 0/5
addCard(Zone.HAND, playerB, "Shock");
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Elite Vanguard");
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Shock");
addTarget(playerB, "Elite Vanguard");
setStopAt(3, PhaseStep.DRAW);
execute();
assertPermanentCount(playerA, "Avacyn, the Purifier", 1);
assertPermanentCount(playerA, "Wall of Omens", 1);
assertGraveyardCount(playerA, "Elite Vanguard", 1);
assertPermanentCount(playerB, "Wall of Roots", 1);
assertGraveyardCount(playerB, "Hill Giant", 1);
assertGraveyardCount(playerB, "Shock", 1);
Permanent avacyn = getPermanent("Avacyn, the Purifier", playerA);
Assert.assertEquals("Damage to Avacyn, the Purifier should be 0 not 3", 0, avacyn.getDamage());
}
}