mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Added test for Propaganda.
This commit is contained in:
parent
b14c9c341b
commit
149635a9f1
2 changed files with 110 additions and 42 deletions
|
@ -12,8 +12,9 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
public class OptionalSacrificeTests extends CardTestPlayerBase {
|
public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Glint Hawk - Flying 2/2 - {W}
|
* Glint Hawk - Flying 2/2 - {W} When Glint Hawk enters the battlefield,
|
||||||
* When Glint Hawk enters the battlefield, sacrifice it unless you return an artifact you control to its owner's hand.
|
* sacrifice it unless you return an artifact you control to its owner's
|
||||||
|
* hand.
|
||||||
*
|
*
|
||||||
* Test returning controlled artifact.
|
* Test returning controlled artifact.
|
||||||
*/
|
*/
|
||||||
|
@ -38,8 +39,9 @@ public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Glint Hawk - Flying 2/2 - {W}
|
* Glint Hawk - Flying 2/2 - {W} When Glint Hawk enters the battlefield,
|
||||||
* When Glint Hawk enters the battlefield, sacrifice it unless you return an artifact you control to its owner's hand.
|
* sacrifice it unless you return an artifact you control to its owner's
|
||||||
|
* hand.
|
||||||
*
|
*
|
||||||
* Test opting not to choose an artifact controlled to sacrifice Glint Hawk.
|
* Test opting not to choose an artifact controlled to sacrifice Glint Hawk.
|
||||||
*/
|
*/
|
||||||
|
@ -63,8 +65,9 @@ public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Glint Hawk - Flying 2/2 - {W}
|
* Glint Hawk - Flying 2/2 - {W} When Glint Hawk enters the battlefield,
|
||||||
* When Glint Hawk enters the battlefield, sacrifice it unless you return an artifact you control to its owner's hand.
|
* sacrifice it unless you return an artifact you control to its owner's
|
||||||
|
* hand.
|
||||||
*
|
*
|
||||||
* Test no artifacts to target - so Glint Hawk is sacrificed.
|
* Test no artifacts to target - so Glint Hawk is sacrificed.
|
||||||
*/
|
*/
|
||||||
|
@ -85,8 +88,9 @@ public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drake Familiar - Flying 2/1 - {1}{U}
|
* Drake Familiar - Flying 2/1 - {1}{U} When Drake Familiar enters the
|
||||||
* When Drake Familiar enters the battlefield, sacrifice it unless you return an enchantment to its owner's hand.
|
* battlefield, sacrifice it unless you return an enchantment to its owner's
|
||||||
|
* hand.
|
||||||
*
|
*
|
||||||
* Test returning own enchantment so not sacrificed.
|
* Test returning own enchantment so not sacrificed.
|
||||||
*/
|
*/
|
||||||
|
@ -111,8 +115,9 @@ public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drake Familiar - Flying 2/1 - {1}{U}
|
* Drake Familiar - Flying 2/1 - {1}{U} When Drake Familiar enters the
|
||||||
* When Drake Familiar enters the battlefield, sacrifice it unless you return an enchantment to its owner's hand.
|
* battlefield, sacrifice it unless you return an enchantment to its owner's
|
||||||
|
* hand.
|
||||||
*
|
*
|
||||||
* Test returning opponent's enchantment so not sacrificed.
|
* Test returning opponent's enchantment so not sacrificed.
|
||||||
*/
|
*/
|
||||||
|
@ -121,6 +126,7 @@ public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
|
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||||
addCard(Zone.HAND, playerA, "Drake Familiar");
|
addCard(Zone.HAND, playerA, "Drake Familiar");
|
||||||
|
// Creatures can’t attack you unless their controller pays {2} for each creature they control that’s attacking you.
|
||||||
addCard(Zone.BATTLEFIELD, playerB, "Propaganda");
|
addCard(Zone.BATTLEFIELD, playerB, "Propaganda");
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Drake Familiar");
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Drake Familiar");
|
||||||
|
@ -137,8 +143,9 @@ public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drake Familiar - Flying 2/1 - {1}{U}
|
* Drake Familiar - Flying 2/1 - {1}{U} When Drake Familiar enters the
|
||||||
* When Drake Familiar enters the battlefield, sacrifice it unless you return an enchantment to its owner's hand.
|
* battlefield, sacrifice it unless you return an enchantment to its owner's
|
||||||
|
* hand.
|
||||||
*
|
*
|
||||||
* Test when no enchantments are on battlefield, Drake is sacrificed.
|
* Test when no enchantments are on battlefield, Drake is sacrificed.
|
||||||
*/
|
*/
|
||||||
|
@ -159,8 +166,9 @@ public class OptionalSacrificeTests extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drake Familiar - Flying 2/1 - {1}{U}
|
* Drake Familiar - Flying 2/1 - {1}{U} When Drake Familiar enters the
|
||||||
* When Drake Familiar enters the battlefield, sacrifice it unless you return an enchantment to its owner's hand.
|
* battlefield, sacrifice it unless you return an enchantment to its owner's
|
||||||
|
* hand.
|
||||||
*
|
*
|
||||||
* Test when no enchantments are on battlefield, Drake is sacrificed.
|
* Test when no enchantments are on battlefield, Drake is sacrificed.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
package org.mage.test.cards.replacement;
|
||||||
|
|
||||||
|
import mage.constants.PhaseStep;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author LevelX2
|
||||||
|
*/
|
||||||
|
public class PropagandaTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test_Propaganda1() {
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
// Creatures can’t attack you unless their controller pays {2} for each creature they control that’s attacking you.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Propaganda");
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
||||||
|
|
||||||
|
attack(2, playerB, "Silvercoat Lion");
|
||||||
|
setChoice(playerB, "Yes");// Pay {2} to attack?
|
||||||
|
|
||||||
|
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerA, 18);
|
||||||
|
|
||||||
|
assertTappedCount("Silvercoat Lion", true, 1);
|
||||||
|
assertTappedCount("Plains", true, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test_Propaganda2() {
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
// Creatures can’t attack you unless their controller pays {2} for each creature they control that’s attacking you.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Propaganda", 2);
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 4);
|
||||||
|
|
||||||
|
attack(2, playerB, "Silvercoat Lion");
|
||||||
|
setChoice(playerB, "Propaganda"); // Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you.");
|
||||||
|
setChoice(playerB, "Yes");// Pay {2} to attack?
|
||||||
|
setChoice(playerB, "Yes");// Pay {2} to attack?
|
||||||
|
|
||||||
|
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerA, 18);
|
||||||
|
|
||||||
|
assertTappedCount("Silvercoat Lion", true, 1);
|
||||||
|
assertTappedCount("Plains", true, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue