diff --git a/.gitattributes b/.gitattributes index 5b66f62e5b6..ab86e8a794a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13742,7 +13742,6 @@ src/main/java/forge/card/ability/package-info.java svneol=native#text/plain src/main/java/forge/card/cardfactory/CardFactory.java svneol=native#text/plain src/main/java/forge/card/cardfactory/CardFactoryArtifacts.java -text src/main/java/forge/card/cardfactory/CardFactoryCreatures.java svneol=native#text/plain -src/main/java/forge/card/cardfactory/CardFactoryLands.java svneol=native#text/plain src/main/java/forge/card/cardfactory/CardFactorySorceries.java svneol=native#text/plain src/main/java/forge/card/cardfactory/CardFactoryUtil.java svneol=native#text/plain src/main/java/forge/card/cardfactory/CardStorageReader.java svneol=native#text/plain diff --git a/res/cardsfolder/b/blood_crypt.txt b/res/cardsfolder/b/blood_crypt.txt index f66922ded8a..cf4cd9c27fd 100644 --- a/res/cardsfolder/b/blood_crypt.txt +++ b/res/cardsfolder/b/blood_crypt.txt @@ -2,6 +2,8 @@ Name:Blood Crypt ManaCost:no cost Types:Land Swamp Mountain Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/dis/en-us/card97102.jpg Oracle:({T}: Add {B} or {R} to your mana pool.)\nAs Blood Crypt enters the battlefield, you may pay 2 life. If you don't, Blood Crypt enters the battlefield tapped. SetInfo:RTR Rare diff --git a/res/cardsfolder/b/breeding_pool.txt b/res/cardsfolder/b/breeding_pool.txt index a0316de044f..978bc3e4494 100644 --- a/res/cardsfolder/b/breeding_pool.txt +++ b/res/cardsfolder/b/breeding_pool.txt @@ -2,6 +2,8 @@ Name:Breeding Pool ManaCost:no cost Types:Land Forest Island Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/dis/en-us/card97088.jpg Oracle:({T}: Add {G} or {U} to your mana pool.)\nAs Breeding Pool enters the battlefield, you may pay 2 life. If you don't, Breeding Pool enters the battlefield tapped. SetInfo:GTC Rare diff --git a/res/cardsfolder/g/godless_shrine.txt b/res/cardsfolder/g/godless_shrine.txt index 1b1e06e3c8b..1060ebc4f78 100644 --- a/res/cardsfolder/g/godless_shrine.txt +++ b/res/cardsfolder/g/godless_shrine.txt @@ -2,6 +2,8 @@ Name:Godless Shrine ManaCost:no cost Types:Land Plains Swamp Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/gpt/en-us/card96935.jpg Oracle:({T}: Add {W} or {B} to your mana pool.)\nAs Godless Shrine enters the battlefield, you may pay 2 life. If you don't, Godless Shrine enters the battlefield tapped. SetInfo:GPT Rare diff --git a/res/cardsfolder/h/hallowed_fountain.txt b/res/cardsfolder/h/hallowed_fountain.txt index f3a1795fdf1..08aab6720b9 100644 --- a/res/cardsfolder/h/hallowed_fountain.txt +++ b/res/cardsfolder/h/hallowed_fountain.txt @@ -2,6 +2,8 @@ Name:Hallowed Fountain ManaCost:no cost Types:Land Plains Island Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/dis/en-us/card97071.jpg Oracle:({T}: Add {W} or {U} to your mana pool.)\nAs Hallowed Fountain enters the battlefield, you may pay 2 life. If you don't, Hallowed Fountain enters the battlefield tapped. SetInfo:RTR Rare diff --git a/res/cardsfolder/o/overgrown_tomb.txt b/res/cardsfolder/o/overgrown_tomb.txt index 396a9fa9b43..a351d3291e7 100644 --- a/res/cardsfolder/o/overgrown_tomb.txt +++ b/res/cardsfolder/o/overgrown_tomb.txt @@ -2,6 +2,8 @@ Name:Overgrown Tomb ManaCost:no cost Types:Land Swamp Forest Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/rav/en-us/card89072.jpg Oracle:({T}: Add {B} or {G} to your mana pool.)\nAs Overgrown Tomb enters the battlefield, you may pay 2 life. If you don't, Overgrown Tomb enters the battlefield tapped. SetInfo:RAV Rare diff --git a/res/cardsfolder/s/sacred_foundry.txt b/res/cardsfolder/s/sacred_foundry.txt index d9809d76a4e..f52145bf279 100644 --- a/res/cardsfolder/s/sacred_foundry.txt +++ b/res/cardsfolder/s/sacred_foundry.txt @@ -2,6 +2,8 @@ Name:Sacred Foundry ManaCost:no cost Types:Land Mountain Plains Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/rav/en-us/card89066.jpg Oracle:({T}: Add {R} or {W} to your mana pool.)\nAs Sacred Foundry enters the battlefield, you may pay 2 life. If you don't, Sacred Foundry enters the battlefield tapped. SetInfo:RAV Rare diff --git a/res/cardsfolder/s/steam_vents.txt b/res/cardsfolder/s/steam_vents.txt index 7e0fd8e836f..33d12fe400a 100644 --- a/res/cardsfolder/s/steam_vents.txt +++ b/res/cardsfolder/s/steam_vents.txt @@ -2,6 +2,8 @@ Name:Steam Vents ManaCost:no cost Types:Land Island Mountain Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/gpt/en-us/card96923.jpg Oracle:({T}: Add {U} or {R} to your mana pool.)\nAs Steam Vents enters the battlefield, you may pay 2 life. If you don't, Steam Vents enters the battlefield tapped. SetInfo:GPT Rare diff --git a/res/cardsfolder/s/stomping_ground.txt b/res/cardsfolder/s/stomping_ground.txt index adeb483b565..afaca76c6eb 100644 --- a/res/cardsfolder/s/stomping_ground.txt +++ b/res/cardsfolder/s/stomping_ground.txt @@ -2,6 +2,8 @@ Name:Stomping Ground ManaCost:no cost Types:Land Mountain Forest Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/gpt/en-us/card96896.jpg Oracle:({T}: Add {R} or {G} to your mana pool.)\nAs Stomping Ground enters the battlefield, you may pay 2 life. If you don't, Stomping Ground enters the battlefield tapped. SetInfo:GPT Rare diff --git a/res/cardsfolder/t/temple_garden.txt b/res/cardsfolder/t/temple_garden.txt index 977184c62a5..97216ba3e3d 100644 --- a/res/cardsfolder/t/temple_garden.txt +++ b/res/cardsfolder/t/temple_garden.txt @@ -2,6 +2,8 @@ Name:Temple Garden ManaCost:no cost Types:Land Forest Plains Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/rav/en-us/card89093.jpg Oracle:({T}: Add {G} or {W} to your mana pool.)\nAs Temple Garden enters the battlefield, you may pay 2 life. If you don't, Temple Garden enters the battlefield tapped. SetInfo:RAV Rare diff --git a/res/cardsfolder/w/watery_grave.txt b/res/cardsfolder/w/watery_grave.txt index be3bca89658..feec168339d 100644 --- a/res/cardsfolder/w/watery_grave.txt +++ b/res/cardsfolder/w/watery_grave.txt @@ -2,6 +2,8 @@ Name:Watery Grave ManaCost:no cost Types:Land Island Swamp Text:As CARDNAME enters the battlefield, you may pay 2 life. If you don't, CARDNAME enters the battlefield tapped. +K:ETBReplacement:Other:DBTap +SVar:DBTap:AB$ Tap | Cost$ 0 | ETB$ True | Defined$ Self | UnlessCost$ PayLife<2> | UnlessPayer$ You | StackDescription$ enters the battlefield tapped. SVar:Picture:http://resources.wizards.com/magic/cards/rav/en-us/card83731.jpg Oracle:({T}: Add {U} or {B} to your mana pool.)\nAs Watery Grave enters the battlefield, you may pay 2 life. If you don't, Watery Grave enters the battlefield tapped. SetInfo:RAV Rare diff --git a/src/main/java/forge/card/cardfactory/CardFactory.java b/src/main/java/forge/card/cardfactory/CardFactory.java index 5b562cb8c0d..04724610fda 100644 --- a/src/main/java/forge/card/cardfactory/CardFactory.java +++ b/src/main/java/forge/card/cardfactory/CardFactory.java @@ -304,8 +304,6 @@ public class CardFactory { CardFactoryCreatures.buildCard(card, cardName); } else if (card.isPlaneswalker()) { buildPlaneswalkerAbilities(card); - } else if (card.isLand()) { - CardFactoryLands.buildCard(card, cardName); } else if (card.isSorcery()) { CardFactorySorceries.buildCard(card, cardName); } else if (card.isArtifact()) { diff --git a/src/main/java/forge/card/cardfactory/CardFactoryLands.java b/src/main/java/forge/card/cardfactory/CardFactoryLands.java deleted file mode 100644 index 30bed19d6d7..00000000000 --- a/src/main/java/forge/card/cardfactory/CardFactoryLands.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Forge: Play Magic: the Gathering. - * Copyright (C) 2011 Forge Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package forge.card.cardfactory; - -import java.util.List; - -import forge.Card; -import forge.CardLists; -import forge.Command; -import forge.FThreads; -import forge.control.input.InputSelectCards; -import forge.control.input.InputSelectCardsFromList; -import forge.game.player.Player; -import forge.game.zone.ZoneType; -import forge.gui.GuiDialog; - -/** - *

- * CardFactoryLands class. - *

- * - * @author Forge - * @version $Id$ - */ -class CardFactoryLands { - - /** - *

- * getCard. - *

- * - * @param card - * a {@link forge.Card} object. - * @param cardName - * a {@link java.lang.String} object. - * @param cf - * a {@link forge.card.cardfactory.CardFactoryInterface} object. - * @return a {@link forge.Card} object. - */ - public static void buildCard(final Card card, final String cardName) { - - // *************** START *********** START ************************** - // Ravinca Dual Lands - if (cardName.equals("Blood Crypt") || cardName.equals("Breeding Pool") || cardName.equals("Godless Shrine") - || cardName.equals("Hallowed Fountain") || cardName.equals("Overgrown Tomb") - || cardName.equals("Sacred Foundry") || cardName.equals("Steam Vents") - || cardName.equals("Stomping Ground") || cardName.equals("Temple Garden") - || cardName.equals("Watery Grave")) { - // if this isn't done, computer plays more than 1 copy - card.clearSpellKeepManaAbility(); - - card.addComesIntoPlayCommand(new Command() { - private static final long serialVersionUID = 7352127748114888255L; - - @Override - public void execute() { - if (card.getController().isHuman()) { - this.humanExecute(); - } else { - this.computerExecute(); - } - } - - public void computerExecute() { - boolean needsTheMana = false; - final Player ai = card.getController(); - if (ai.getLife() > 3 && ai.canPayLife(2)) { - final int landsize = ai.getLandsInPlay().size(); - for (Card c : ai.getCardsIn(ZoneType.Hand)) { - if (landsize == c.getCMC()) { - needsTheMana = true; - } - } - } - if (needsTheMana) { - ai.payLife(2, card); - } else { - this.tapCard(); - } - } - - public void humanExecute() { - final Player human = card.getController(); - if (human.canPayLife(2)) { - - final String question = String.format("Pay 2 life? If you don't, %s enters the battlefield tapped.", card.getName()); - - if (GuiDialog.confirm(card, question.toString())) { - human.payLife(2, card); - } else { - this.tapCard(); - } - } // if - else { - this.tapCard(); - } - } // execute() - - private void tapCard() { - // it enters the battlefield this way, and should not fire triggers - card.setTapped(true); - } - }); - } // *************** END ************ END ************************** - } - -} // end class CardFactoryLands