mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
commit
05349be8c3
6 changed files with 204 additions and 25 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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package org.mage.test.cards.single.akh;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
public class BontuTheGlorifiedTest extends CardTestPlayerBase {
|
||||
|
||||
String bontu = "Bontu the Glorified";
|
||||
String swamp = "Swamp";
|
||||
String grizzly = "Grizzly Bears";
|
||||
|
||||
|
||||
@Test
|
||||
public void testBontuNotAttack() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, bontu);
|
||||
addCard(Zone.BATTLEFIELD, playerA, swamp, 10);
|
||||
addCard(Zone.BATTLEFIELD, playerA, grizzly);
|
||||
|
||||
attack(1, playerA, bontu);
|
||||
|
||||
setStopAt(4, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBontuAttack() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, bontu);
|
||||
addCard(Zone.BATTLEFIELD, playerA, swamp, 10);
|
||||
addCard(Zone.BATTLEFIELD, playerA, grizzly);
|
||||
addCard(Zone.HAND, playerA, "Terror");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Terror", grizzly);
|
||||
|
||||
attack(1, playerA, bontu);
|
||||
|
||||
setStopAt(4, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 16);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBontuSacAbility() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, bontu);
|
||||
addCard(Zone.BATTLEFIELD, playerA, swamp, 10);
|
||||
addCard(Zone.BATTLEFIELD, playerA, grizzly);
|
||||
addCard(Zone.HAND, playerA, "Terror");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{B}");
|
||||
|
||||
setStopAt(4, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 19);
|
||||
assertPermanentCount(playerA, grizzly, 0);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBontuSacAbilityTriggersAttack() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, bontu);
|
||||
addCard(Zone.BATTLEFIELD, playerA, swamp, 10);
|
||||
addCard(Zone.BATTLEFIELD, playerA, grizzly);
|
||||
addCard(Zone.HAND, playerA, "Terror");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{B}");
|
||||
attack(1, playerA, bontu);
|
||||
setStopAt(4, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 15);
|
||||
assertPermanentCount(playerA, grizzly, 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -10,21 +10,21 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
* Created by IGOUDT on 30-3-2017.
|
||||
*/
|
||||
public class KiraGreatGlassSpinnerTest extends CardTestPlayerBase {
|
||||
|
||||
/*
|
||||
Kira, Great Glass-Spinner {1}{U}{U}
|
||||
Legendary Creature - Spirit 2/2
|
||||
Flying
|
||||
Creatures you control have "Whenever this creature becomes the target of a spell or ability for the first time each turn, counter that spell or ability."
|
||||
*/
|
||||
private final String kira = "Kira, Great Glass-Spinner";
|
||||
private final String ugin = "Ugin, the Spirit Dragon";
|
||||
|
||||
@Test
|
||||
public void counterFirst() {
|
||||
|
||||
String ugin = "Ugin, the Spirit Dragon";
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, ugin); // starts with 7 Loyality counters
|
||||
|
||||
/*
|
||||
Kira, Great Glass-Spinner {1}{U}{U}
|
||||
Legendary Creature - Spirit 2/2
|
||||
Flying
|
||||
Creatures you control have "Whenever this creature becomes the target of a spell or ability for the first time each turn, counter that spell or ability."
|
||||
*/
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, kira);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: {source} deals 3 damage to target creature or player.", kira); // Ugin ability
|
||||
|
||||
|
|
@ -34,4 +34,45 @@ public class KiraGreatGlassSpinnerTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, kira, 1);
|
||||
assertCounterCount(playerA, ugin, CounterType.LOYALTY, 9);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void counterFirstResolveSecond() {
|
||||
|
||||
String ugin = "Ugin, the Spirit Dragon";
|
||||
addCard(Zone.BATTLEFIELD, playerA, ugin); // starts with 7 Loyality counters
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
|
||||
addCard(Zone.HAND, playerA, "Unsummon", 1);
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, kira);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: {source} deals 3 damage to target creature or player.", kira); // Ugin ability
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Unsummon", kira);
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, kira, 0);
|
||||
assertCounterCount(playerA, ugin, CounterType.LOYALTY, 9);
|
||||
assertGraveyardCount(playerA, "Unsummon", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void counterFirstThisTurn_counterFirstOnNextTurn() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, ugin); // starts with 7 Loyality counters
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, kira);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: {source} deals 3 damage to target creature or player.", kira); // Ugin ability
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: {source} deals 3 damage to target creature or player.", kira); // Ugin ability
|
||||
|
||||
|
||||
setStopAt(3, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, kira, 1);
|
||||
assertCounterCount(playerA, ugin, CounterType.LOYALTY, 11);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue