mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Void Winnower - Fixed that the check for even casting costs did not work correctly.
This commit is contained in:
parent
50b5602459
commit
d3000da3a3
11 changed files with 163 additions and 25 deletions
|
|
@ -247,6 +247,7 @@ public class EvolveTest extends CardTestPlayerBase {
|
|||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Adaptive Snapjaw");
|
||||
addTarget(playerA, "Adaptive Snapjaw");
|
||||
addTarget(playerA, "Adaptive Snapjaw");
|
||||
setChoice(playerA, "Whenever {this} evolves");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
|
@ -255,8 +256,8 @@ public class EvolveTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Ivy Lane Denizen", 2);
|
||||
assertPermanentCount(playerA, "Adaptive Snapjaw", 1);
|
||||
|
||||
assertPowerToughness(playerA, "Adaptive Snapjaw", 9, 5); // +2 from Ivys +1 from add to all with +1/+1 counter
|
||||
assertPowerToughness(playerA, "Renegade Krasis", 5, 4); // +1 Evolve by Ivy +1 Evolve by Snapjaw
|
||||
assertPowerToughness(playerA, "Adaptive Snapjaw", 9, 5); // +2 from Ivys and +1 from add to all with +1/+1 counter
|
||||
assertPowerToughness(playerA, "Renegade Krasis", 5, 4); // +1 Evolve by Ivy and +1 Evolve by Snapjaw
|
||||
assertPowerToughness(playerA, "Ivy Lane Denizen", 2, 3, Filter.ComparisonScope.Any);
|
||||
assertPowerToughness(playerA, "Ivy Lane Denizen", 5, 6, Filter.ComparisonScope.Any); // +1 from Other Ivy + 2 from Krasis
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package org.mage.test.cards.rules;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CantCastTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* I control Void Winnower. But my opponent can cast Jayemdae Tome (that's
|
||||
* converted mana cost is even) He can cast other even spell.
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testVoidWinnower() {
|
||||
// Your opponent can't cast spells with even converted mana costs. (Zero is even.)
|
||||
// Your opponents can't block with creatures with even converted mana costs.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Void Winnower");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
|
||||
addCard(Zone.HAND, playerA, "Jayemdae Tome", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Jayemdae Tome");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Jayemdae Tome", 1);
|
||||
|
||||
assertPermanentCount(playerA, "Jayemdae Tome", 0);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVoidWinnower2() {
|
||||
// Your opponent can't cast spells with even converted mana costs. (Zero is even.)
|
||||
// Your opponents can't block with creatures with even converted mana costs.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Void Winnower");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||
|
||||
// Blaze deals X damage to target creature or player.
|
||||
addCard(Zone.HAND, playerA, "Blaze", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blaze", playerA);
|
||||
setChoice(playerA, "X=3");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Blaze", 1);
|
||||
|
||||
assertLife(playerB, 20);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVoidWinnower3() {
|
||||
// Your opponent can't cast spells with even converted mana costs. (Zero is even.)
|
||||
// Your opponents can't block with creatures with even converted mana costs.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Void Winnower");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||
|
||||
// Blaze deals X damage to target creature or player.
|
||||
addCard(Zone.HAND, playerA, "Blaze", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blaze", playerB);
|
||||
setChoice(playerA, "X=4");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Blaze", 0);
|
||||
assertGraveyardCount(playerA, "Blaze", 1);
|
||||
|
||||
assertLife(playerB, 16);
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue