mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
#2157 Linvala tests on activated abilities
This commit is contained in:
parent
65740c315f
commit
3b6ffe9382
2 changed files with 71 additions and 3 deletions
|
@ -0,0 +1,62 @@
|
|||
package org.mage.test.cards.abilities.activated;
|
||||
|
||||
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;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
||||
/**
|
||||
* Created by Derek M on 3/6/2017.
|
||||
*/
|
||||
public class LinvalaKeeperOfSilenceTest extends CardTestPlayerBase {
|
||||
|
||||
/*
|
||||
* Reported bug: Linvala, Keeper of Silence, played by my opponent, did not prevent me from activating abilities with the "tap" symbol.
|
||||
* Examples included Jagged-Scar Archers and Imperious Perfect;
|
||||
*/
|
||||
@Test
|
||||
public void linvalaSilencesActivatedAbilities()
|
||||
{
|
||||
String linvala = "Linvala, Keeper of Silence";
|
||||
String jScarArcher = "Jagged-Scar Archers";
|
||||
String imperiousPerfect = "Imperious Perfect";
|
||||
|
||||
/*
|
||||
Linvala, Keeper of Silence {2}{W}{W}
|
||||
Legendary Creature - Angel 3/4
|
||||
Flying
|
||||
Activated abilities of creatures your opponents control can't be activated.
|
||||
*/
|
||||
addCard(Zone.BATTLEFIELD, playerA, linvala);
|
||||
|
||||
/*
|
||||
{1}{G}{G} Elf Archer * / *
|
||||
Jagged-Scar Archers's power and toughness are each equal to the number of Elves you control.
|
||||
Tap: Jagged-Scar Archers deals damage equal to its power to target creature with flying.
|
||||
*/
|
||||
addCard(Zone.BATTLEFIELD, playerB, jScarArcher);
|
||||
|
||||
/*
|
||||
{2}{G} Creature - Elf Warrior 2/2
|
||||
Other Elf creatures you control get +1/+1.
|
||||
{G}, Tap: Create a 1/1 green Elf Warrior creature token.
|
||||
*/
|
||||
addCard(Zone.BATTLEFIELD, playerB, imperiousPerfect);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Forest", 2);
|
||||
|
||||
activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{G}:"); // Imperious Perfect: create 1/1 elf warrior token
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerB, "Jagged", linvala); // Jagged-scar: deal damage to Linvala equal to elves in play
|
||||
|
||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, linvala, 1);
|
||||
assertPowerToughness(playerB, jScarArcher, 3, 3);
|
||||
Permanent p = getPermanent(linvala, playerA);
|
||||
Assert.assertEquals("Linvala should have no damage dealt to her", 0, p.getDamage());
|
||||
}
|
||||
}
|
|
@ -616,15 +616,21 @@ public class MorphTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Linvala, Keep of Silence is preventing morph creatures from turning face
|
||||
* up Turning face up is a special ability not an active ability. This
|
||||
* should not be prevented by the loss of active abilities.
|
||||
* Linvala, Keep of Silence is preventing morph creatures from turning face up.
|
||||
* Turning face up is a special ability not an active ability.
|
||||
* This should not be prevented by the loss of active abilities.
|
||||
*/
|
||||
@Test
|
||||
public void testTurnFaceUpWithLinvala() {
|
||||
addCard(Zone.HAND, playerA, "Pine Walker");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
|
||||
|
||||
/*
|
||||
Linvala, Keeper of Silence {2}{W}{W}
|
||||
Legendary Creature - Angel 3/4
|
||||
Flying
|
||||
Activated abilities of creatures your opponents control can't be activated.
|
||||
*/
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Linvala, Keeper of Silence", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pine Walker");
|
||||
|
|
Loading…
Reference in a new issue