mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
* Dash - Fixed that the creature was returned to hand from dash also if it left battlefield before.
This commit is contained in:
parent
9be613beb9
commit
c942592c3b
5 changed files with 112 additions and 34 deletions
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package org.mage.test.cards.abilities.keywords;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -40,26 +39,25 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
public class DashTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* 702.108. Dash
|
||||
* 702.108a Dash represents three abilities: two static abilities that function while the card with dash is
|
||||
* on the stack, one of which may create a delayed triggered ability, and a static ability that
|
||||
* functions while the object with dash is on the battlefield. “Dash [cost]” means “You may cast
|
||||
* this card by paying [cost] rather that its mana cost,” “If this spell’s dash cost was paid, return the
|
||||
* permanent this spell becomes to its owner’s hand at the beginning of the next end step,” and “As
|
||||
* long as this permanent’s dash cost was paid, it has haste.” Paying a card’s dash cost follows the
|
||||
* rules for paying alternative costs in rules 601.2b and 601.2e–g.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Screamreach Brawler
|
||||
* Creature — Orc Berserker 2/3, 2R (3)
|
||||
* Dash {1}{R} (You may cast this spell for its dash cost. If you do, it
|
||||
* gains haste, and it's returned from the battlefield to its owner's hand
|
||||
* at the beginning of the next end step.)
|
||||
* 702.108. Dash 702.108a Dash represents three abilities: two static
|
||||
* abilities that function while the card with dash is on the stack, one of
|
||||
* which may create a delayed triggered ability, and a static ability that
|
||||
* functions while the object with dash is on the battlefield. “Dash [cost]”
|
||||
* means “You may cast this card by paying [cost] rather that its mana
|
||||
* cost,” “If this spell’s dash cost was paid, return the permanent this
|
||||
* spell becomes to its owner’s hand at the beginning of the next end step,”
|
||||
* and “As long as this permanent’s dash cost was paid, it has haste.”
|
||||
* Paying a card’s dash cost follows the rules for paying alternative costs
|
||||
* in rules 601.2b and 601.2e–g.
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Screamreach Brawler Creature — Orc Berserker 2/3, 2R (3) Dash {1}{R} (You
|
||||
* may cast this spell for its dash cost. If you do, it gains haste, and
|
||||
* it's returned from the battlefield to its owner's hand at the beginning
|
||||
* of the next end step.)
|
||||
*
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testDash() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
|
@ -96,4 +94,30 @@ public class DashTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Also dash returns creatures to your hand at end of turn even if they died
|
||||
* that turn.
|
||||
*/
|
||||
@Test
|
||||
public void testDashedCreatureDiesInCombat() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.HAND, playerA, "Screamreach Brawler"); // 2/3
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Geist of the Moors", 1); // 3/1
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Screamreach Brawler");
|
||||
setChoice(playerA, "Yes");
|
||||
attack(1, playerA, "Screamreach Brawler");
|
||||
block(1, playerB, "Geist of the Moors", "Screamreach Brawler");
|
||||
|
||||
setStopAt(2, PhaseStep.UNTAP);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20);
|
||||
assertPermanentCount(playerA, "Screamreach Brawler", 0);
|
||||
assertHandCount(playerA, "Screamreach Brawler", 0);
|
||||
assertGraveyardCount(playerA, "Screamreach Brawler", 1);
|
||||
assertGraveyardCount(playerB, "Geist of the Moors", 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,4 +211,31 @@ public class RenownTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Ability doesn't trigger when renowned. ("Whenever an opponent casts a
|
||||
* noncreature spell, if ~ is renowned, ~ deals 2 damage to that player.")
|
||||
*/
|
||||
@Test
|
||||
public void testScabClanBerserker() {
|
||||
// Renown 1
|
||||
// Whenever an opponent casts a noncreature spell, if Scab-Clan Berserker is renowned, Scab-Clan Berserker deals 2 damage to that player.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Scab-Clan Berserker"); // 2/2 {1}{R}{R}
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
|
||||
addCard(Zone.HAND, playerB, "Lightning Bolt");
|
||||
|
||||
attack(3, playerA, "Scab-Clan Berserker"); // 1 damage
|
||||
castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Bolt", playerA);
|
||||
|
||||
setStopAt(3, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
Permanent berserker = getPermanent("Scab-Clan Berserker", playerA);
|
||||
Assert.assertEquals("has has renown", true, berserker.isRenown());
|
||||
assertPowerToughness(playerA, "Scab-Clan Berserker", 3, 3);
|
||||
|
||||
assertLife(playerA, 17); // Lightning Bolt
|
||||
assertLife(playerB, 16); // 2 from attack 2 from triggered ability
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue