* Arashin Sovereign - Fixed that the player had no option to let the card go to the graveyard.

This commit is contained in:
LevelX2 2015-04-03 16:28:40 +02:00
parent 5dc6f1a7c4
commit dbb9be6703
173 changed files with 873 additions and 506 deletions

View file

@ -63,7 +63,7 @@ public class BanisherPriestTest extends CardTestPlayerBase {
/**
* Check if the returning target did not trigger the die Event of
* Check that the returning target did not trigger the dies Event of
* the dying Banisher Priest
*/
@Test

View file

@ -101,6 +101,7 @@ public class GatherSpecimensTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
addCard(Zone.LIBRARY, playerB, "Plains", 10);
// If a creature would enter the battlefield under an opponent's control this turn, it enters the battlefield under your control instead.
castSpell(1, PhaseStep.UPKEEP, playerA, "Gather Specimens");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Ring");

View file

@ -19,6 +19,9 @@ public class CloudshiftTest extends CardTestPlayerBase {
/**
* Tests that casting Cloudshift makes targeting spell fizzling
*
* Cloudshift
* Exile target creature you control, then return that card to the battlefield under your control.
*/
@Test
public void testSpellFizzle() {
@ -229,4 +232,38 @@ public class CloudshiftTest extends CardTestPlayerBase {
assertPowerToughness(playerA, "Silvercoat Lion", 2, 2);
}
/**
* Test that if I cast cloudshift and it goes to the stack and another instant spell exiles the
* target creature as response, cloudshift does not bring back that creature from exile because it's
* a complete other object (400.7).
* 400.7g allows Cloudshift to bring it back only if it was exiled by cloudshift itself.
*
*/
@Test
public void testReturnIfExiledByAnotherSpell() {
addCard(Zone.BATTLEFIELD, playerA, "Plains");
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
addCard(Zone.HAND, playerA, "Cloudshift");
addCard(Zone.BATTLEFIELD, playerB, "Plains");
// Exile target creature. Its controller gains life equal to its power.
addCard(Zone.HAND, playerB, "Swords to Plowshares");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cloudshift", "Silvercoat Lion");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Swords to Plowshares", "Silvercoat Lion", "Cloudshift");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertGraveyardCount(playerA, "Cloudshift", 1);
assertGraveyardCount(playerB, "Swords to Plowshares", 1);
assertLife(playerA, 22);
assertLife(playerB, 20);
assertPermanentCount(playerA,"Silvercoat Lion", 0);
assertExileCount("Silvercoat Lion", 1);
}
}

View file

@ -164,6 +164,7 @@ public class UndyingTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerB, "Plains", 4);
// Destroy all creatures. They can't be regenerated.
addCard(Zone.HAND, playerB, "Wrath of God");
// Anafenza, the Foremost
// Whenever Anafenza, the Foremost attacks, put a +1/+1 counter on another target tapped creature you control.
// If a creature card would be put into an opponent's graveyard from anywhere, exile it instead.

View file

@ -61,11 +61,12 @@ public class PastInFlamesTest extends CardTestPlayerBase {
setStopAt(1, PhaseStep.END_TURN);
execute();
assertExileCount("Lightning Bolt", 1);
assertGraveyardCount(playerA, "Lightning Bolt", 0);
assertLife(playerB, 17);
assertLife(playerA, 20);
assertExileCount("Lightning Bolt", 1);
assertGraveyardCount(playerA, "Lightning Bolt", 0);
}
}

View file

@ -18,14 +18,15 @@ public class TheWretchedTest extends CardTestPlayerBase {
@Test
public void testGainControl_One_NoRegenThusNothingIsRemovedFromCombat() {
// At end of combat, gain control of all creatures blocking The Wretched for as long as you control The Wretched.
addCard(Zone.BATTLEFIELD, playerA, "The Wretched");
addCard(Zone.BATTLEFIELD, playerB, "Wall of Pine Needles"); // a 3/3 with regeneration
addCard(Zone.BATTLEFIELD, playerB, "Living Wall"); // 0/6 Wall with regeneration
attack(2, playerA, "The Wretched");
block(2, playerB, "Wall of Pine Needles", "The Wretched");
block(2, playerB, "Living Wall", "The Wretched");
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
attack(3, playerA, "The Wretched");
block(3, playerB, "Wall of Pine Needles", "The Wretched");
block(3, playerB, "Living Wall", "The Wretched");
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerA, "The Wretched", 1);
@ -37,21 +38,28 @@ public class TheWretchedTest extends CardTestPlayerBase {
public void testGainControl_One_RegenWhichRemovesBlockerFromCombat() {
addCard(Zone.BATTLEFIELD, playerA, "The Wretched");
addCard(Zone.BATTLEFIELD, playerA, "Bad Moon"); // +1/+1 for black creatures
addCard(Zone.BATTLEFIELD, playerB, "Forest"); // a 3/3 with regeneration
addCard(Zone.BATTLEFIELD, playerB, "Wall of Pine Needles"); // a 3/3 with regeneration
addCard(Zone.BATTLEFIELD, playerB, "Living Wall"); // 0/6 Wall with regeneration
attack(2, playerA, "The Wretched");
block(2, playerB, "Wall of Pine Needles", "The Wretched");
block(2, playerB, "Living Wall", "The Wretched");
// The Wretched
// Creature Demon - Demon 2/5
attack(3, playerA, "The Wretched");
block(3, playerB, "Wall of Pine Needles", "The Wretched");
block(3, playerB, "Living Wall", "The Wretched");
activateAbility(2, PhaseStep.DECLARE_BLOCKERS, playerB, "{G}: Regenerate {this}.");
activateAbility(3, PhaseStep.DECLARE_BLOCKERS, playerB, "{G}: Regenerate {this}."); // Wall of Pine Needles
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerA, "The Wretched", 1);
assertPermanentCount(playerA, "Living Wall", 1);
assertPermanentCount(playerB, "Wall of Pine Needles", 1);
}
@ -59,16 +67,19 @@ public class TheWretchedTest extends CardTestPlayerBase {
public void testLoseControlOfTheWretched() {
addCard(Zone.BATTLEFIELD, playerA, "The Wretched");
addCard(Zone.BATTLEFIELD, playerB, "Wall of Pine Needles"); // a 3/3 with regeneration
addCard(Zone.BATTLEFIELD, playerB, "Living Wall"); // 0/6 Wall with regeneration
addCard(Zone.BATTLEFIELD, playerB, "Island", 4);
addCard(Zone.HAND, playerB, "Control Magic");
attack(2, playerA, "The Wretched");
block(2, playerB, "Wall of Pine Needles", "The Wretched");
block(2, playerB, "Living Wall", "The Wretched");
attack(3, playerA, "The Wretched");
block(3, playerB, "Wall of Pine Needles", "The Wretched");
block(3, playerB, "Living Wall", "The Wretched");
castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Control Magic", "The Wretched");
castSpell(4, PhaseStep.POSTCOMBAT_MAIN, playerB, "Control Magic", "The Wretched");
setStopAt(2, PhaseStep.END_TURN);
setStopAt(4, PhaseStep.END_TURN);
execute();
assertPermanentCount(playerB, "The Wretched", 1);
@ -80,20 +91,24 @@ public class TheWretchedTest extends CardTestPlayerBase {
public void testRegenTheWretchedThusRemovingFromCombat() {
addCard(Zone.BATTLEFIELD, playerA, "The Wretched");
addCard(Zone.HAND, playerA, "Regenerate");
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
addCard(Zone.BATTLEFIELD, playerB, "Wall of Pine Needles"); // a 3/3 with regeneration
addCard(Zone.BATTLEFIELD, playerB, "Living Wall"); // 0/6 Wall with regeneration
addCard(Zone.BATTLEFIELD, playerB, "Wall of Spears"); // 3/2
attack(2, playerA, "The Wretched");
block(2, playerB, "Wall of Pine Needles", "The Wretched");
block(2, playerB, "Living Wall", "The Wretched");
castSpell(2, PhaseStep.DECLARE_BLOCKERS, playerA, "Regenerate", "The Wretched");
attack(3, playerA, "The Wretched");
block(3, playerB, "Wall of Pine Needles", "The Wretched");
block(3, playerB, "Wall of Spears", "The Wretched");
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
castSpell(3, PhaseStep.DECLARE_BLOCKERS, playerA, "Regenerate", "The Wretched");
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerA, "The Wretched", 1);
assertPermanentCount(playerB, "Wall of Pine Needles", 1);
assertPermanentCount(playerB, "Living Wall", 1);
assertPermanentCount(playerB, "Wall of Spears", 1);
}
}

View file

@ -49,11 +49,12 @@ public class ElvishArchdruidTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
addCard(Zone.BATTLEFIELD, playerA, "Elvish Archdruid", 1);
addCard(Zone.BATTLEFIELD, playerA, "Nettle Sentinel", 1);
// Pyroclasm deals 2 damage to each creature.
addCard(Zone.HAND, playerA, "Pyroclasm");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Pyroclasm");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pyroclasm");
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
setStopAt(1, PhaseStep.PRECOMBAT_MAIN); // has to be the same phase as the cast spell to see if Nettle Sentinel dies in this phase
execute();
assertGraveyardCount(playerA, "Pyroclasm", 1);

View file

@ -15,10 +15,16 @@ public class BattlefieldTriggeredAbilitiesTest extends CardTestPlayerBase {
@Test
public void testBeguilerofWillsAndPrimevalTitan() {
// Whenever Primeval Titan enters the battlefield or attacks, you may search your library for up to two land cards,
// put them onto the battlefield tapped, then shuffle your library.
addCard(Zone.BATTLEFIELD, playerA, "Primeval Titan");
addCard(Zone.LIBRARY, playerA, "Mountain", 10);
// {T}: Gain control of target creature with power less than or equal to the number of creatures you control.
addCard(Zone.BATTLEFIELD, playerB, "Beguiler of Wills");
// Whenever Arrogant Bloodlord blocks or becomes blocked by a creature with power 1 or less, destroy Arrogant Bloodlord at end of combat.
addCard(Zone.BATTLEFIELD, playerB, "Arrogant Bloodlord", 5);
addCard(Zone.LIBRARY, playerB, "Mountain", 10);
@ -34,7 +40,7 @@ public class BattlefieldTriggeredAbilitiesTest extends CardTestPlayerBase {
assertPermanentCount(playerB, "Beguiler of Wills", 1);
assertPermanentCount(playerB, "Arrogant Bloodlord", 5);
assertPermanentCount(playerB, "Primeval Titan", 1);
// lands weren't added to playerA
assertPermanentCount(playerA, "Mountain", 0);
// but to playerB instead

View file

@ -58,12 +58,15 @@ public class CostModificationTest extends CardTestPlayerBase {
@Test
public void testCostReductionWithManaSourceRestrictionWorking() {
// Artifact spells you cast cost {1} less to cast
addCard(Zone.BATTLEFIELD, playerA, "Etherium Sculptor");
addCard(Zone.BATTLEFIELD, playerA, "Llanowar Elves");
// Myr Superion {2}
// Spend only mana produced by creatures to cast Myr Superion.
addCard(Zone.HAND, playerA, "Myr Superion");
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {G} to your mana pool.");
activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Add {G} to your mana pool.");
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Myr Superion");
setStopAt(3, PhaseStep.BEGIN_COMBAT);
execute();

View file

@ -79,7 +79,7 @@ public class DryadMilitantTest extends CardTestPlayerBase {
}
/**
* Tests if Dryad Militant dies by damage spell, the
* Tests if Dryad Militant dies by destroy spell, the
* spell don't get exiled
*/
@Test
@ -97,7 +97,7 @@ public class DryadMilitantTest extends CardTestPlayerBase {
assertLife(playerB, 20);
assertHandCount(playerA, "Terminate", 0);
assertGraveyardCount(playerB, "Terminate", 1);
assertGraveyardCount(playerA, "Terminate", 1);
}
}

View file

@ -44,8 +44,12 @@ public class FracturingGustTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
addCard(Zone.HAND, playerA, "Fracturing Gust", 1);
// Players can't gain life.
// At the beginning of your upkeep, Witch Hunt deals 4 damage to you.
// At the beginning of your end step, target opponent chosen at random gains control of Witch Hunt.
addCard(Zone.BATTLEFIELD, playerB, "Witch Hunt", 1);
// Destroy all artifacts and enchantments. You gain 2 life for each permanent destroyed this way.
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Fracturing Gust");
setStopAt(1, PhaseStep.BEGIN_COMBAT);

View file

@ -60,8 +60,12 @@ public class ParallaxWaveTest extends CardTestPlayerBase {
*/
@Test
public void testFirstExileHandlingOfItself() {
// Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost. It's still an enchantment.
addCard(Zone.BATTLEFIELD, playerA, "Opalescence");
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
// Fading 5 (This enchantment enters the battlefield with five fade counters on it. At the beginning of your upkeep, remove a fade counter from it. If you can't, sacrifice it.)
// Remove a fade counter from Parallax Wave: Exile target creature.
// When Parallax Wave leaves the battlefield, each player returns to the battlefield all cards he or she owns exiled with Parallax Wave.
addCard(Zone.HAND, playerA, "Parallax Wave");
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1);

View file

@ -114,9 +114,9 @@ public class JournexToNowhereTest extends CardTestPlayerBase {
/*
Journey is played and targets the creature as it enters the battlefield.
The Journey will be returned to hand before the ability reolves.
The Journey will be returned to hand before the ability resolves.
The Journey will be played again targeting another creature.
The journey will be disencahnted later, so only the second creatufre has to return to battlefield.
The Journey will be disenchanted later, so only the second creature has to return to battlefield.
*/
@Test

View file

@ -21,10 +21,11 @@ public class SoulWardenTest extends CardTestPlayerBase {
public void testDisabledEffectOnChangeZone() {
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Zone.HAND, playerA, "Lightning Bolt");
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
addCard(Zone.HAND, playerA, "Elite Vanguard", 2);
addCard(Zone.BATTLEFIELD, playerA, "Soul Warden", 1);
// Creature 2/1
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Elite Vanguard");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Soul Warden");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Elite Vanguard");

View file

@ -88,7 +88,7 @@ public class BrainMaggotTest extends CardTestPlayerBase {
public void testCardFromHandWillBeExiledAndReturnMesmericFiend() {
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2);
addCard(Zone.HAND, playerA, "Mesmeric Fiend", 2);
// Sacrifice a creature: Put a +1/+1 counter on Bloodflow Connoisseur.
addCard(Zone.HAND, playerB, "Bloodflow Connoisseur", 1);
addCard(Zone.HAND, playerB, "Lightning Bolt", 1);
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);

View file

@ -21,14 +21,19 @@ public class HarvesterOfSoulsTest extends CardTestPlayerBase {
public void testDisabledEffectOnChangeZone() {
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
addCard(Zone.HAND, playerA, "Day of Judgment", 1);
addCard(Zone.HAND, playerA, "Day of Judgment", 1);
addCard(Zone.HAND, playerA, "Thatcher Revolt", 1);
// Whenever another nontoken creature dies, you may draw a card.
addCard(Zone.BATTLEFIELD, playerA, "Harvester of Souls", 1);
addCard(Zone.BATTLEFIELD, playerA, "Craw Wurm", 1);
// Whenever Arrogant Bloodlord blocks or becomes blocked by a creature with power 1 or less, destroy Arrogant Bloodlord at end of combat.
addCard(Zone.BATTLEFIELD, playerB, "Arrogant Bloodlord", 1);
// Put three 1/1 red Human creature tokens with haste onto the battlefield. Sacrifice those tokens at the beginning of the next end step.
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Thatcher Revolt");
// Destroy all creatures.
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Day of Judgment");
setStopAt(1, PhaseStep.BEGIN_COMBAT);

View file

@ -33,10 +33,12 @@ public class LastKnownInformationTest extends CardTestPlayerBase {
// Creature - Elf Scout
// 2/2
// Persist
addCard(Zone.BATTLEFIELD, playerA, "Safehold Elite");
addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
addCard(Zone.HAND, playerA, "Murder Investigation",2);
// {1}{W}
// Enchant creature you control
// When enchanted creature dies, put X 1/1 white Soldier creature tokens onto the battlefield, where X is its power.
addCard(Zone.HAND, playerA, "Murder Investigation",1);
addCard(Zone.HAND, playerB, "Lightning Bolt",2);
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
@ -45,16 +47,18 @@ public class LastKnownInformationTest extends CardTestPlayerBase {
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Safehold Elite");
// choose triggered ability order
playerA.addChoice("When enchanted creature dies, put X 1/1 red and white Soldier creature token with haste onto the battlefield, where X is its power.");
playerA.addChoice("When enchanted creature dies");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", "Safehold Elite", "When enchanted creature dies, put X 1/1 red and white Soldier creature token with haste onto the battlefield, where X is its power");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertActionCount(playerB, 0);
assertGraveyardCount(playerB, "Lightning Bolt", 2);
assertPermanentCount(playerA, "Safehold Elite", 0);
// because enchanted Safehold Elite's P/T was 2/2, Murder Investigation has to put 2 Soldier onto the battlefield
assertPermanentCount(playerA, "Soldier", 2);
assertActionCount(playerB, 0);
}

View file

@ -436,7 +436,7 @@ public class TestPlayer extends ComputerPlayer {
public TriggeredAbility chooseTriggeredAbility(List<TriggeredAbility> abilities, Game game) {
if (!choices.isEmpty()) {
for(TriggeredAbility ability :abilities) {
if (choices.get(0).equals(ability.toString())) {
if (ability.toString().startsWith(choices.get(0))) {
choices.remove(0);
return ability;
}