mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Added Test for #5905.
This commit is contained in:
parent
1fe0485694
commit
12639bce26
2 changed files with 33 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
|
@ -14,7 +15,6 @@ import mage.constants.SubType;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -23,8 +23,6 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
@ -69,8 +67,8 @@ public final class Soulherder extends CardImpl {
|
|||
class SoulherderTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
|
||||
SoulherderTriggeredAbility() {
|
||||
super(
|
||||
Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.EXILED,
|
||||
super(Zone.BATTLEFIELD,
|
||||
Zone.BATTLEFIELD, Zone.EXILED,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
"Whenever a creature is exiled from the battlefield, ", false
|
||||
);
|
||||
|
@ -95,4 +93,4 @@ class SoulherderTriggeredAbility extends ZoneChangeTriggeredAbility {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.commander.duel;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -82,4 +81,33 @@ public class CommanderReplaceEffectTest extends CardTestCommanderDuelBase {
|
|||
assertPermanentCount(playerA, "Gift of Immortality", 1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void soulherderAndExiledCommanders() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
|
||||
// Whenever a creature is exiled from the battlefield, put a +1/+1 counter on Soulherder.
|
||||
// At the beginning of your end step, you may exile another target creature you control,
|
||||
// then return that card to the battlefield under its owner's control.
|
||||
addCard(Zone.HAND, playerA, "Soulherder", 1); // Creature {1}{W}{U}
|
||||
|
||||
// Daxos of Meletis can't be blocked by creatures with power 3 or greater.
|
||||
// Whenever Daxos of Meletis deals combat damage to a player, exile the top card of that player's library. You gain life equal to that card's converted mana cost. Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it.
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Daxos of Meletis");
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Soulherder");
|
||||
|
||||
setChoice(playerA, "Yes"); // Use Soulherder's triggered ability
|
||||
addTarget(playerA, "Daxos of Meletis");
|
||||
setChoice(playerA, "Yes"); // Move Daxos to command Zone
|
||||
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Soulherder", 1);
|
||||
assertPermanentCount(playerA, "Daxos of Meletis", 0);
|
||||
assertCommandZoneCount(playerA, "Daxos of Meletis", 1);
|
||||
assertPowerToughness(playerA, "Soulherder", 2, 2);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue