mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
XMage 1.4.23V2
This commit is contained in:
parent
74dd2878ed
commit
900e7b29ba
4 changed files with 74 additions and 43 deletions
|
@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
||||||
public final static int MAGE_VERSION_MAJOR = 1;
|
public final static int MAGE_VERSION_MAJOR = 1;
|
||||||
public final static int MAGE_VERSION_MINOR = 4;
|
public final static int MAGE_VERSION_MINOR = 4;
|
||||||
public final static int MAGE_VERSION_PATCH = 23;
|
public final static int MAGE_VERSION_PATCH = 23;
|
||||||
public final static String MAGE_VERSION_MINOR_PATCH = "V1";
|
public final static String MAGE_VERSION_MINOR_PATCH = "V2";
|
||||||
public final static String MAGE_VERSION_INFO = "";
|
public final static String MAGE_VERSION_INFO = "";
|
||||||
|
|
||||||
private final int major;
|
private final int major;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
* authors and should not be interpreted as representing official policies, either expressed
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.mage.test.cards.abilities.keywords;
|
package org.mage.test.cards.abilities.keywords;
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
|
@ -40,25 +39,29 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
public class CyclingTest extends CardTestPlayerBase {
|
public class CyclingTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 702.28. Cycling
|
* 702.28. Cycling 702.28a Cycling is an activated ability that functions
|
||||||
* 702.28a Cycling is an activated ability that functions only while the card with cycling is in a player’s hand.
|
* only while the card with cycling is in a player’s hand. “Cycling [cost]”
|
||||||
* “Cycling [cost]” means “[Cost], Discard this card: Draw a card.”
|
* means “[Cost], Discard this card: Draw a card.” 702.28b Although the
|
||||||
* 702.28b Although the cycling ability is playable only if the card is in a player’s hand, it continues to exist
|
* cycling ability is playable only if the card is in a player’s hand, it
|
||||||
* while the object is in play and in all other zones. Therefore objects with cycling will be affected by
|
* continues to exist while the object is in play and in all other zones.
|
||||||
* effects that depend on objects having one or more activated abilities.
|
* Therefore objects with cycling will be affected by effects that depend on
|
||||||
* 702.28c Some cards with cycling have abilities that trigger when they’re cycled. “When you cycle [this card]” means
|
* objects having one or more activated abilities. 702.28c Some cards with
|
||||||
* “When you discard [this card] to pay a cycling cost.” These abilities trigger from whatever zone the card
|
* cycling have abilities that trigger when they’re cycled. “When you cycle
|
||||||
* winds up in after it’s cycled.
|
* [this card]” means “When you discard [this card] to pay a cycling cost.”
|
||||||
* 702.28d Typecycling is a variant of the cycling ability. “[Type]cycling [cost]” means “[Cost], Discard this card:
|
* These abilities trigger from whatever zone the card winds up in after
|
||||||
* Search your library for a [type] card, reveal it, and put it into your hand. Then shuffle your library.”
|
* it’s cycled. 702.28d Typecycling is a variant of the cycling ability.
|
||||||
* This type is usually a subtype (as in “mountaincycling”) but can be any card type, subtype, supertype, or
|
* “[Type]cycling [cost]” means “[Cost], Discard this card: Search your
|
||||||
* combination thereof (as in “basic landcycling”).
|
* library for a [type] card, reveal it, and put it into your hand. Then
|
||||||
* 702.28e Typecycling abilities are cycling abilities, and typecycling costs are cycling costs. Any cards that trigger
|
* shuffle your library.” This type is usually a subtype (as in
|
||||||
* when a player cycles a card will trigger when a card is discarded to pay a typecycling cost. Any effect that
|
* “mountaincycling”) but can be any card type, subtype, supertype, or
|
||||||
* stops players from cycling cards will stop players from activating cards’ typecycling abilities. Any effect
|
* combination thereof (as in “basic landcycling”). 702.28e Typecycling
|
||||||
* that increases or reduces a cycling cost will increase or reduce a typecycling cost.
|
* abilities are cycling abilities, and typecycling costs are cycling costs.
|
||||||
|
* Any cards that trigger when a player cycles a card will trigger when a
|
||||||
|
* card is discarded to pay a typecycling cost. Any effect that stops
|
||||||
|
* players from cycling cards will stop players from activating cards’
|
||||||
|
* typecycling abilities. Any effect that increases or reduces a cycling
|
||||||
|
* cost will increase or reduce a typecycling cost.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void cycleAndTriggerTest() {
|
public void cycleAndTriggerTest() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||||
|
@ -139,4 +142,26 @@ public class CyclingTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertHandCount(playerA, "Horned Sliver", 1); // searched by slivercyclibng
|
assertHandCount(playerA, "Horned Sliver", 1); // searched by slivercyclibng
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void cycleWithNewPerspectives() {
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||||
|
// When New Perspectives enters the battlefield, draw three cards.
|
||||||
|
// As long as you have seven or more cards in hand, you may pay {0} rather than pay cycling costs.
|
||||||
|
addCard(Zone.HAND, playerA, "New Perspectives"); // Enchantment {5}{U}
|
||||||
|
// Destroy all artifacts, creatures, and enchantments.
|
||||||
|
// Cycling ({3}, Discard this card: Draw a card.)
|
||||||
|
addCard(Zone.HAND, playerA, "Akroma's Vengeance");
|
||||||
|
addCard(Zone.HAND, playerA, "Island", 3);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "New Perspectives");
|
||||||
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cycling");
|
||||||
|
setChoice(playerA, "Yes");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, "Akroma's Vengeance", 1);
|
||||||
|
assertHandCount(playerA, 7);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,10 +38,11 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
public class FluctuatorTest extends CardTestPlayerBase {
|
public class FluctuatorTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE: As of 4/19/2017 this test is failing due to a bug in code. See issue #3148
|
* NOTE: As of 4/19/2017 this test is failing due to a bug in code. See
|
||||||
|
* issue #3148
|
||||||
*
|
*
|
||||||
* Fluctuator makes 'Akroma's Vengeance' cyclic cost reduced to {1}
|
* Fluctuator makes 'Akroma's Vengeance' cyclic cost reduced to {1} Test it
|
||||||
* Test it with one Plains on battlefield.
|
* with one Plains on battlefield.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testFluctuatorReducedBy2() {
|
public void testFluctuatorReducedBy2() {
|
||||||
|
@ -57,6 +58,7 @@ public class FluctuatorTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
addCard(Zone.BATTLEFIELD, playerA, "Plains", 1);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
|
||||||
|
setChoice(playerA, "2"); // reduce 2 generic mana
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -81,6 +83,7 @@ public class FluctuatorTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Fluctuator");
|
addCard(Zone.BATTLEFIELD, playerA, "Fluctuator");
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
|
||||||
|
setChoice(playerA, "2"); // reduce 1 generic mana
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
@ -90,7 +93,8 @@ public class FluctuatorTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE: As of 4/19/2017 this test is failing due to a bug in code. See issue #3148
|
* NOTE: As of 4/19/2017 this test is failing due to a bug in code. See
|
||||||
|
* issue #3148
|
||||||
*
|
*
|
||||||
* Test 2 Fluctuators reduce cycling cost up to 4.
|
* Test 2 Fluctuators reduce cycling cost up to 4.
|
||||||
*/
|
*/
|
||||||
|
@ -105,6 +109,8 @@ public class FluctuatorTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Fluctuator", 2); // 2 copies
|
addCard(Zone.BATTLEFIELD, playerA, "Fluctuator", 2); // 2 copies
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
|
||||||
|
setChoice(playerA, "2"); // reduce 2 generic mana
|
||||||
|
setChoice(playerA, "1"); // reduce 1 generic mana
|
||||||
|
|
||||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
execute();
|
execute();
|
||||||
|
|
|
@ -58,7 +58,7 @@ public enum CardRepository {
|
||||||
// raise this if db structure was changed
|
// raise this if db structure was changed
|
||||||
private static final long CARD_DB_VERSION = 51;
|
private static final long CARD_DB_VERSION = 51;
|
||||||
// raise this if new cards were added to the server
|
// raise this if new cards were added to the server
|
||||||
private static final long CARD_CONTENT_VERSION = 76;
|
private static final long CARD_CONTENT_VERSION = 77;
|
||||||
private final TreeSet<String> landTypes = new TreeSet<>();
|
private final TreeSet<String> landTypes = new TreeSet<>();
|
||||||
private Dao<CardInfo, Object> cardDao;
|
private Dao<CardInfo, Object> cardDao;
|
||||||
private Set<String> classNames;
|
private Set<String> classNames;
|
||||||
|
|
Loading…
Reference in a new issue