mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
UT for Final Punishment to cover the DamagedReceivedThisTurnWatcher
This commit is contained in:
parent
fc7cdcdc4e
commit
056c0613a2
1 changed files with 60 additions and 0 deletions
|
@ -0,0 +1,60 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
public class FinalPunishmentTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
final String finalPunishment = "Final Punishment";
|
||||||
|
final String shock = "Shock";
|
||||||
|
final String bob = "Dark Confidant";
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void lifelossBecauseOfDirectDamage() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||||
|
addCard(Zone.HAND, playerA, finalPunishment);
|
||||||
|
addCard(Zone.HAND, playerA, shock);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, shock, playerB);
|
||||||
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, finalPunishment, playerB);
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerB, 16);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void lifelossBecauseOfCombat() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||||
|
addCard(Zone.HAND, playerA, finalPunishment);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, bob);
|
||||||
|
|
||||||
|
attack(1, playerA, bob, playerB);
|
||||||
|
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, finalPunishment, playerB);
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerB, 16);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void nolifelossInNextTurn() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||||
|
addCard(Zone.HAND, playerA, finalPunishment);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, bob);
|
||||||
|
|
||||||
|
attack(1, playerA, bob, playerB);
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, finalPunishment, playerB);
|
||||||
|
setStopAt(2, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertLife(playerB, 18);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue