Remove cast ability when adventure is a permanent.

This prevents the adventure ability text from displaying when the card is on the battlefield.
This commit is contained in:
Patrick Hulin 2019-12-10 00:10:34 -05:00
parent abcd0512a5
commit 317a81678f
3 changed files with 41 additions and 0 deletions

View file

@ -2,6 +2,8 @@ package org.mage.test.cards.cost.adventure;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.game.permanent.Permanent;
import org.junit.Assert;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
@ -331,4 +333,25 @@ public class AdventureCardsTest extends CardTestPlayerBase {
assertExileCount(playerA, 0);
assertGraveyardCount(playerA, 0);
}
@Test
public void testAdventurePermanentText() {
setStrictChooseMode(true);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
addCard(Zone.HAND, playerA, "Rimrock Knight");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rimrock Knight");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertAllCommandsUsed();
assertHandCount(playerA, 0);
assertPermanentCount(playerA, "Rimrock Knight", 1);
assertExileCount(playerA, 0);
assertGraveyardCount(playerA, 0);
Permanent rimrock = getPermanent("Rimrock Knight");
Assert.assertEquals(rimrock.getRules(currentGame).get(0), "{this} can't block.");
}
}