mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Add tests for Gratuitous Violence - confirmed bug
This commit is contained in:
parent
9126f06b17
commit
2439b99031
1 changed files with 52 additions and 0 deletions
|
@ -0,0 +1,52 @@
|
|||
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 cg5
|
||||
*/
|
||||
public class GratuitousViolenceTest extends CardTestPlayerBase {
|
||||
@Test
|
||||
public void testWorksOnCreatures() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Gratuitous Violence");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elvish Visionary"); // 1/1
|
||||
|
||||
attack(1, playerA, "Elvish Visionary");
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
assertLife(playerB, 18);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIgnoresNonCreatures() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Gratuitous Violence");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Honden of Infinite Rage");
|
||||
|
||||
addTarget(playerA, playerB);
|
||||
|
||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
// Honden should deal 1 damage at upkeep (since playerA only
|
||||
// has one Shrine). GV should not double this.
|
||||
assertLife(playerB, 19);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIgnoresInstants() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Gratuitous Violence");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
assertLife(playerB, 17);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue