mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
consolidate "gain control of all [filter] [target player] controls"
This commit is contained in:
parent
a241661ef8
commit
1b9335c788
7 changed files with 203 additions and 240 deletions
|
|
@ -0,0 +1,58 @@
|
|||
package org.mage.test.cards.single.gtc;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestCommander4Players;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class HellkiteTyranTest extends CardTestCommander4Players {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.h.HellkiteTyrant Hellkite Tyrant} {4}{R}{R}
|
||||
* Creature — Dragon
|
||||
* Flying, trample
|
||||
* Whenever Hellkite Tyrant deals combat damage to a player, gain control of all artifacts that player controls.
|
||||
* At the beginning of your upkeep, if you control twenty or more artifacts, you win the game.
|
||||
* 6/5
|
||||
*/
|
||||
private static final String tyrant = "Hellkite Tyrant";
|
||||
|
||||
@Test
|
||||
public void test_BothTriggers() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, tyrant, 1);
|
||||
|
||||
// Will gain controll of all of those
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mox Sapphire", 10);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 10);
|
||||
|
||||
// Will not gain control of all of those:
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Elite Vanguard", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerC, "Plains", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerD, "Mox Ruby", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerD, "Elite Vanguard", 2);
|
||||
|
||||
checkPermanentCount("A: 1 Hellikite Tyran", 5, PhaseStep.UPKEEP, playerA, "Hellkite Tyrant", 1);
|
||||
checkPermanentCount("A: 10 Mox Sapphire", 5, PhaseStep.UPKEEP, playerA, "Mox Sapphire", 10);
|
||||
checkPermanentCount("A: 10 Memnite", 5, PhaseStep.UPKEEP, playerA, "Memnite", 10);
|
||||
checkPermanentCount("B: 0 Mox Sapphire", 5, PhaseStep.UPKEEP, playerB, "Mox Sapphire", 0);
|
||||
checkPermanentCount("B: 0 Memnite", 5, PhaseStep.UPKEEP, playerB, "Memnite", 0);
|
||||
checkPermanentCount("B: 2 Plains", 5, PhaseStep.UPKEEP, playerB, "Plains", 2);
|
||||
checkPermanentCount("B: 2 Elite Vanguard", 5, PhaseStep.UPKEEP, playerB, "Elite Vanguard", 2);
|
||||
checkPermanentCount("C: 2 Plains", 5, PhaseStep.UPKEEP, playerC, "Plains", 2);
|
||||
checkPermanentCount("D: 2 Mox Ruby", 5, PhaseStep.UPKEEP, playerD, "Mox Ruby", 2);
|
||||
checkPermanentCount("D: 2 Mox Ruby", 5, PhaseStep.UPKEEP, playerD, "Elite Vanguard", 2);
|
||||
|
||||
attack(1, playerA, tyrant, playerB);
|
||||
|
||||
setStopAt(5, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertWonTheGame(playerA);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package org.mage.test.cards.single.thb;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class AshiokSculptorOfFearsTest extends CardTestMultiPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.a.AshiokSculptorOfFears Ashiok, Sculptor of Fears} {4}{U}{B}
|
||||
* Legendary Planeswalker — Ashiok
|
||||
* +2: Draw a card. Each player mills two cards.
|
||||
* −5: Put target creature card from a graveyard onto the battlefield under your control.
|
||||
* −11: Gain control of all creatures target opponent controls.
|
||||
* Loyalty: 4
|
||||
*/
|
||||
private static final String ashiok = "Ashiok, Sculptor of Fears";
|
||||
|
||||
@Test
|
||||
public void test_Minus11() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.HAND, playerA, ashiok);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Doubling Season", 2); // To have 16 Loyalty at first
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Underground Sea", 6);
|
||||
|
||||
// Will take control of those:
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 2);
|
||||
|
||||
// Will not take control of those:
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Taiga", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grist, the Hunger Tide", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerC, "Grizzly Bears", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerD, "Grizzly Bears", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, ashiok, true);
|
||||
setChoice(playerA, "Doubling Season"); // ordering replacement effects
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-11", playerB);
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, 9 + 2);
|
||||
assertPermanentCount(playerA, "Grizzly Bears", 2);
|
||||
assertPermanentCount(playerB, 5 - 2);
|
||||
assertPermanentCount(playerB, "Grizzly Bears", 0);
|
||||
assertPermanentCount(playerC, "Grizzly Bears", 2);
|
||||
assertPermanentCount(playerD, "Grizzly Bears", 2);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue