forked from External/mage
Fix Mysterious Pathlighter.
This commit is contained in:
parent
81ff37ad17
commit
5d35ee675d
2 changed files with 24 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import mage.game.Game;
|
|||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -69,7 +70,8 @@ class MysteriousPathlighterEffect extends ReplacementEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
return permanent instanceof AdventureCard
|
||||
return permanent instanceof PermanentCard
|
||||
&& ((PermanentCard) permanent).getCard() instanceof AdventureCard
|
||||
&& permanent.isControlledBy(source.getControllerId())
|
||||
&& permanent.isCreature();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,6 +151,27 @@ public class AdventureCardsTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerA, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCastCuriousPairWithMysteriousPathlighter() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mysterious Pathlighter");
|
||||
addCard(Zone.HAND, playerA, "Curious Pair");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Curious Pair");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
assertHandCount(playerA, 0);
|
||||
assertPermanentCount(playerA, "Food", 0);
|
||||
assertPermanentCount(playerA, "Curious Pair", 1);
|
||||
assertPowerToughness(playerA, "Curious Pair", 2, 4);
|
||||
assertExileCount(playerA, "Curious Pair", 0);
|
||||
assertGraveyardCount(playerA, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCastMemoryTheft() {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue