* Some more format fixes.

This commit is contained in:
LevelX2 2016-10-13 02:20:20 +02:00
parent c52b0488ae
commit bacc867da7
6 changed files with 135 additions and 85 deletions

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are

View file

@ -24,23 +24,30 @@
* 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 mage.deck;
import mage.cards.ExpansionSet;
import mage.cards.Sets;
import mage.cards.decks.Constructed;
import mage.constants.SetType;
/**
* This class implements the new casual format "Eternal", which is legacy with no reserved list cards legal.
* Banlist taken from <https://www.reddit.com/r/mtgEternal/>
* This class implements the new casual format "Eternal", which is legacy with
* no reserved list cards legal. Banlist taken from
* <https://www.reddit.com/r/mtgEternal/>
*
* @author marthinwurer@gmail.com
*/
public class Eternal extends Constructed {
public Eternal() {
public Eternal() {
super("Constructed - Eternal");
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType() != SetType.CUSTOM_SET) {
setCodes.add(set.getCode());
}
}
banned.add("Abeyance");
banned.add("Aboroth");
banned.add("Academy Rector");

View file

@ -43,7 +43,7 @@ public class Frontier extends Constructed {
public Frontier() {
super("Constructed - Frontier");
Date cutoff = new GregorianCalendar(2014, 7, 18).getTime(); // M15 release date
Date cutoff = new GregorianCalendar(2014, 6, 18).getTime(); // M15 release date
for (ExpansionSet set : Sets.getInstance().values()) {
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff))
&& (set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION)) {

View file

@ -43,7 +43,7 @@ public class Modern extends Constructed {
public Modern() {
super("Constructed - Modern");
Date cutoff = new GregorianCalendar(2003, 7, 28).getTime(); // Eight edition release date
Date cutoff = new GregorianCalendar(2003, 6, 28).getTime(); // Eight edition release date
for (ExpansionSet set : Sets.getInstance().values()) {
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff))
&& (set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION)) {

View file

@ -3,23 +3,29 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.deck;
import mage.cards.ExpansionSet;
import mage.cards.Sets;
import mage.cards.decks.Constructed;
import mage.constants.Rarity;
import mage.constants.SetType;
/**
*
* @author LevelX2
*/
public class Pauper extends Constructed {
public Pauper() {
super("Constructed - Pauper");
//TODO: Add only Magic Online sets for pauper
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType() != SetType.CUSTOM_SET) {
setCodes.add(set.getCode());
}
}
rarities.add(Rarity.COMMON);
rarities.add(Rarity.LAND);

View file

@ -20,8 +20,8 @@ public class CloudshiftTest extends CardTestPlayerBase {
/**
* Tests that casting Cloudshift makes targeting spell fizzling
*
* Cloudshift
* Exile target creature you control, then return that card to the battlefield under your control.
* Cloudshift Exile target creature you control, then return that card to
* the battlefield under your control.
*/
@Test
public void testSpellFizzle() {
@ -43,8 +43,10 @@ public class CloudshiftTest extends CardTestPlayerBase {
}
/**
* Tests that copy effect is discarded and Clone can enter as a copy of another creature.
* Also tests that copy two creature won't 'collect' abilities, after 'Cloudshift' effect Clone should enter as a copy of another creature.
* Tests that copy effect is discarded and Clone can enter as a copy of
* another creature. Also tests that copy two creature won't 'collect'
* abilities, after 'Cloudshift' effect Clone should enter as a copy of
* another creature.
*/
@Test
public void testCopyEffectDiscarded() {
@ -77,7 +79,7 @@ public class CloudshiftTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
addCard(Zone.BATTLEFIELD, playerA, "Bonesplitter");
// Exile target creature you control, then return that card to the battlefield under your control.
addCard(Zone.HAND, playerA, "Cloudshift");
@ -92,14 +94,14 @@ public class CloudshiftTest extends CardTestPlayerBase {
assertLife(playerA, 20);
Assert.assertTrue(silvercoatLion.getAttachments().isEmpty());
Assert.assertTrue("Bonesplitter must not be connected to Silvercoat Lion",bonesplitter.getAttachedTo() == null);
Assert.assertEquals("Silvercoat Lion's power without equipment has to be 2",2, silvercoatLion.getPower().getValue());
Assert.assertEquals("Silvercoat Lion's toughness has to be 2",2, silvercoatLion.getToughness().getValue());
Assert.assertTrue("Bonesplitter must not be connected to Silvercoat Lion", bonesplitter.getAttachedTo() == null);
Assert.assertEquals("Silvercoat Lion's power without equipment has to be 2", 2, silvercoatLion.getPower().getValue());
Assert.assertEquals("Silvercoat Lion's toughness has to be 2", 2, silvercoatLion.getToughness().getValue());
}
/**
* Tests that casting Cloudshift makes creature able to block again
* if it before was targeted with can't block effect
* Tests that casting Cloudshift makes creature able to block again if it
* before was targeted with can't block effect
*
*/
@Test
@ -129,7 +131,6 @@ public class CloudshiftTest extends CardTestPlayerBase {
assertPermanentCount(playerB, "Fervent Cathar", 0);
assertPermanentCount(playerA, "Timberland Guide", 0);
}
@Test
@ -146,20 +147,20 @@ public class CloudshiftTest extends CardTestPlayerBase {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Grizzly Bears");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Giant Growth", "Grizzly Bears", "you gain life equal to that creature's toughness");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cloudshift", "Grizzly Bears", null, "you gain life equal to that creature's toughness");
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertLife(playerA, 27); // 5 from the first with Giant Growth + 2 from the second bear.
}
/*
I had a Stoneforge Mystic equipped with a Umesawa's Jitte. I activated Jitte 4 times to make
Stoneforge Mystic 9/10. My opponent put into play a Flickerwisp with his Aether Vial and
targeted my Stoneforge Mystic. At the end of my turn, Stoneforge Mystic came back as a 9/10,
before going down to 1/2 normally once my turn ended.
*/
*/
@Test
public void testDontApplyEffectToNewInstanceOfPreviousEquipedPermanent() {
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
@ -168,11 +169,11 @@ public class CloudshiftTest extends CardTestPlayerBase {
// Exile target creature you control, then return that card to the battlefield under your control.
addCard(Zone.HAND, playerA, "Cloudshift");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Silvercoat Lion");
attack(3, playerA, "Silvercoat Lion");
activateAbility(3, PhaseStep.END_COMBAT, playerA, "Remove a charge counter from {this}: Choose one &mdash;<br>&bull Equipped creature gets");
setModeChoice(playerA, "1");
castSpell(3, PhaseStep.END_COMBAT, playerA, "Cloudshift", "Silvercoat Lion", "Remove a charge counter from");
@ -186,31 +187,30 @@ public class CloudshiftTest extends CardTestPlayerBase {
assertLife(playerA, 20);
assertLife(playerB, 18);
assertCounterCount("Umezawa's Jitte", CounterType.CHARGE, 1);
assertPermanentCount(playerA,"Silvercoat Lion", 1);
assertGraveyardCount(playerA,"Cloudshift", 1);
assertPermanentCount(playerA, "Silvercoat Lion", 1);
assertGraveyardCount(playerA, "Cloudshift", 1);
Assert.assertTrue(silvercoatLion.getAttachments().isEmpty());
Assert.assertTrue("Umezawa must not be connected to Silvercoat Lion",Umezawa.getAttachedTo() == null);
Assert.assertTrue("Umezawa must not be connected to Silvercoat Lion", Umezawa.getAttachedTo() == null);
assertPowerToughness(playerA, "Silvercoat Lion", 2, 2);
}
@Test
public void testDontApplyEffectToNewInstanceOfPreviousEquipedPermanentFlickerwisp() {
addCard(Zone.BATTLEFIELD, playerA, "Plains", 4);
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
addCard(Zone.BATTLEFIELD, playerA, "Umezawa's Jitte");
addCard(Zone.BATTLEFIELD, playerB, "Plains", 3);
// Flying
// When Flickerwisp enters the battlefield, exile another target permanent. Return that
// card to the battlefield under its owner's control at the beginning of the next end step.
addCard(Zone.HAND, playerB, "Flickerwisp");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Silvercoat Lion");
attack(3, playerA, "Silvercoat Lion");
activateAbility(4, PhaseStep.DRAW, playerA, "Remove a charge counter from {this}: Choose one &mdash;<br>&bull Equipped creature gets");
setModeChoice(playerA, "1");
castSpell(4, PhaseStep.PRECOMBAT_MAIN, playerB, "Flickerwisp");
@ -225,19 +225,21 @@ public class CloudshiftTest extends CardTestPlayerBase {
assertLife(playerA, 20);
assertLife(playerB, 18);
assertCounterCount("Umezawa's Jitte", CounterType.CHARGE, 1);
assertPermanentCount(playerA,"Silvercoat Lion", 1);
assertPermanentCount(playerB,"Flickerwisp", 1);
assertPermanentCount(playerA, "Silvercoat Lion", 1);
assertPermanentCount(playerB, "Flickerwisp", 1);
Assert.assertTrue(silvercoatLion.getAttachments().isEmpty());
Assert.assertTrue("Umezawa must not be connected to Silvercoat Lion",Umezawa.getAttachedTo() == null);
Assert.assertTrue("Umezawa must not be connected to Silvercoat Lion", Umezawa.getAttachedTo() == null);
assertPowerToughness(playerA, "Silvercoat Lion", 2, 2);
}
/**
* Test that if I cast cloudshift and it goes to the stack and another instant spell exiles the
* target creature as response, cloudshift does not bring back that creature from exile because it's
* a complete other object (400.7).
* 400.7g allows Cloudshift to bring it back only if it was exiled by cloudshift itself.
*
* Test that if I cast cloudshift and it goes to the stack and another
* instant spell exiles the target creature as response, cloudshift does not
* bring back that creature from exile because it's a complete other object
* (400.7). 400.7g allows Cloudshift to bring it back only if it was exiled
* by cloudshift itself.
*
*/
@Test
public void testReturnIfExiledByAnotherSpell() {
@ -245,88 +247,123 @@ public class CloudshiftTest extends CardTestPlayerBase {
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion");
addCard(Zone.HAND, playerA, "Cloudshift");
addCard(Zone.BATTLEFIELD, playerB, "Plains");
// Exile target creature. Its controller gains life equal to its power.
addCard(Zone.HAND, playerB, "Swords to Plowshares");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cloudshift", "Silvercoat Lion");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Swords to Plowshares", "Silvercoat Lion", "Cloudshift");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertGraveyardCount(playerA, "Cloudshift", 1);
assertGraveyardCount(playerB, "Swords to Plowshares", 1);
assertLife(playerA, 22);
assertLife(playerB, 20);
assertPermanentCount(playerA,"Silvercoat Lion", 0);
assertPermanentCount(playerA, "Silvercoat Lion", 0);
assertExileCount("Silvercoat Lion", 1);
}
}
/**
* Test that if a creature returns from cloudshift it returns
* under the control of the controller of Cloudshift.
* Test that if a creature returns from cloudshift it returns under the
* control of the controller of Cloudshift.
*/
@Test
public void testReturnOfOwnerIsAnotherPlayer() {
addCard(Zone.BATTLEFIELD, playerA, "Plains",3);
addCard(Zone.BATTLEFIELD, playerA, "Mountain",3);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
// Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
addCard(Zone.HAND, playerA, "Act of Treason");
addCard(Zone.HAND, playerA, "Cloudshift");
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Silvercoat Lion");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cloudshift", "Silvercoat Lion");
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
execute();
assertGraveyardCount(playerA, "Cloudshift", 1);
assertGraveyardCount(playerA, "Act of Treason", 1);
assertPermanentCount(playerA,"Silvercoat Lion", 1);
assertPermanentCount(playerB,"Silvercoat Lion", 0);
}
/**
* Test that if a creature returns from Conjurer's Closet it returns
* under the control of the controller of Conjurer's Closet.
assertPermanentCount(playerA, "Silvercoat Lion", 1);
assertPermanentCount(playerB, "Silvercoat Lion", 0);
}
/**
* Test that if a creature returns from Conjurer's Closet it returns under
* the control of the controller of Conjurer's Closet.
*/
@Test
public void testReturnOfOwnerIsAnotherPlayerConjurersCloset() {
addCard(Zone.BATTLEFIELD, playerA, "Mountain",3);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
// Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
addCard(Zone.HAND, playerA, "Act of Treason");
// At the beginning of your end step, you may exile target creature you control, then return that card to the battlefield under your control
addCard(Zone.BATTLEFIELD, playerA, "Conjurer's Closet");
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Silvercoat Lion");
addTarget(playerA, "Silvercoat Lion");
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
execute();
assertPermanentCount(playerA,"Conjurer's Closet", 1);
assertPermanentCount(playerA, "Conjurer's Closet", 1);
assertGraveyardCount(playerA, "Act of Treason", 1);
assertPermanentCount(playerA,"Silvercoat Lion", 1);
assertPermanentCount(playerB,"Silvercoat Lion", 0);
}
assertPermanentCount(playerA, "Silvercoat Lion", 1);
assertPermanentCount(playerB, "Silvercoat Lion", 0);
}
/**
* During a game i play a Flickerwisp main step who targets something and a
* second Flickerwisp who targets the first . End step : the first
* Flickerwisp return at the battlefield and target a Courser of Kruphix,
* normally she's return on the battlefield at the next end step (here end
* step of my opponent) but she's returned on the battlefield immediatly
*
* 8/1/2008 The exiled card will return to the battlefield at the beginning
* of the end step even if Flickerwisp is no longer on the battlefield.
* 8/1/2008 If the permanent that returns to the battlefield has any
* abilities that trigger at the beginning of the end step, those abilities
* wont trigger that turn.
*/
@Test
public void testDoubleFlickerwisp() {
addCard(Zone.BATTLEFIELD, playerA, "Plains", 6);
// Flying
// When Flickerwisp enters the battlefield, exile another target permanent.
// Return that card to the battlefield under its owner's control at the beginning of the next end step.
addCard(Zone.HAND, playerA, "Flickerwisp", 2); // Creature {1}{W}{W}
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion");
addCard(Zone.BATTLEFIELD, playerB, "Courser of Kruphix");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Flickerwisp");
addTarget(playerA, "Silvercoat Lion");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Flickerwisp");
addTarget(playerA, "Flickerwisp");
addTarget(playerA, "Courser of Kruphix");
setStopAt(2, PhaseStep.PRECOMBAT_MAIN);
execute();
assertPermanentCount(playerA, "Flickerwisp", 2);
assertPermanentCount(playerB, "Silvercoat Lion", 1);
assertPermanentCount(playerB, "Courser of Kruphix", 0);
assertExileCount("Courser of Kruphix", 1);
}
}