Shocklands - ETB replacement scripted.

This commit is contained in:
Maxmtg
2013-04-05 20:14:24 +00:00
parent a4ff971461
commit 90a0992fbe
13 changed files with 20 additions and 125 deletions

1
.gitattributes vendored
View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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()) {

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
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;
/**
* <p>
* CardFactoryLands class.
* </p>
*
* @author Forge
* @version $Id$
*/
class CardFactoryLands {
/**
* <p>
* getCard.
* </p>
*
* @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