mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Cleaned up CardFactory.java.
This commit is contained in:
@@ -4,6 +4,7 @@ Types:Creature Hound
|
||||
Text:When Affa Guard Hound comes into play, target creature gets +0/+3 until end of turn.
|
||||
PT:2/2
|
||||
K:Flash
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/affa_guard_hound.jpg
|
||||
End
|
||||
|
||||
@@ -3,6 +3,7 @@ ManaCost:2 G W U
|
||||
Types:Enchantment
|
||||
Text:Whenever a creature you control attacks alone, if it's the first combat phase of the turn, untap that creature. After this phase, there is an additional combat phase.
|
||||
K:Exalted
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/finest_hour.jpg
|
||||
End
|
||||
|
||||
@@ -6006,7 +6006,6 @@ public class CardFactory implements NewConstants {
|
||||
};
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
@@ -6112,7 +6111,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Dragon Roost")) {
|
||||
final SpellAbility ability = new Ability(card, "5 R R") {
|
||||
@@ -6144,6 +6142,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Mobilization")) {
|
||||
final SpellAbility ability = new Ability(card, "2 W") {
|
||||
@@ -6157,7 +6156,6 @@ public class CardFactory implements NewConstants {
|
||||
ability.setStackDescription("Mobilization - Put a 1/1 Soldier token into play.");
|
||||
card.addSpellAbility(ability);
|
||||
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
@@ -6176,7 +6174,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Oblivion Ring")) {
|
||||
|
||||
@@ -6673,8 +6670,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Midsummer Revel")) {
|
||||
|
||||
@@ -6701,6 +6696,7 @@ public class CardFactory implements NewConstants {
|
||||
ability.setDescription("G, Sacrifice Midsummer Revel: Put X 3/3 green Beast creature tokens onto the battlefield, where X is the number of verse counters on Midsummer Revel.");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Necrogenesis")) {
|
||||
final SpellAbility necrogen = new Ability(card, "2") {
|
||||
@@ -6764,6 +6760,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(necrogen);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Night Soil")) {
|
||||
final SpellAbility nightSoil = new Ability(card, "1") {
|
||||
@@ -6889,6 +6886,7 @@ public class CardFactory implements NewConstants {
|
||||
ability.setBeforePayMana(payLife);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Necropotence")) {
|
||||
final CardList necroCards = new CardList();
|
||||
@@ -7133,7 +7131,6 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
card.addDestroyCommand(draw3Cards);
|
||||
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
@@ -7226,6 +7223,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("AEther Spellbomb")) {
|
||||
|
||||
@@ -7376,6 +7374,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Sunbeam Spellbomb")) {
|
||||
final Ability ability = new Ability(card, "W") {
|
||||
@@ -7400,6 +7399,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
} //*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Necrogen Spellbomb")) {
|
||||
final Ability ability = new Ability(card, "B") {
|
||||
@@ -7433,6 +7433,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
} //*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Sensei's Divining Top")) {
|
||||
//ability2: Draw card, and put divining top on top of library
|
||||
@@ -7534,6 +7535,7 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Quicksilver Amulet")) {
|
||||
final SpellAbility ability = new Ability_Tap(card, "4") {
|
||||
@@ -7606,6 +7608,7 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Counterbalance")) {
|
||||
String player = card.getController();
|
||||
@@ -7662,10 +7665,10 @@ public class CardFactory implements NewConstants {
|
||||
//ability.setBeforePayMana(new Input_PayManaCost(ability));
|
||||
card.addSpellAbility(ability);
|
||||
|
||||
|
||||
}
|
||||
//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Aluren")) {
|
||||
final Ability ability1 = new Ability(card, "0") {
|
||||
@@ -7722,8 +7725,6 @@ public class CardFactory implements NewConstants {
|
||||
//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Survival of the Fittest")) {
|
||||
SpellAbility ability = new Ability(card, "G") {
|
||||
@@ -7777,6 +7778,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Volrath's Dungeon")) {
|
||||
final SpellAbility dungeon = new Ability(card, "0") {
|
||||
@@ -7903,9 +7905,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Ior Ruin Expedition")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@@ -7933,6 +7932,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Khalni Heart Expedition")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@@ -7964,6 +7964,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Earthcraft")) {
|
||||
final SpellAbility a1 = new Ability(card, "0") {
|
||||
@@ -8281,6 +8282,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Standstill")) {
|
||||
card.clearSpellAbility();
|
||||
@@ -8377,6 +8379,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Voltaic Key")) {
|
||||
final Ability_Tap ability = new Ability_Tap(card, "1") {
|
||||
@@ -8425,9 +8428,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//**************************Equipment*****************************
|
||||
|
||||
|
||||
//*************** START ************ START **************************
|
||||
else if(cardName.equals("Ashnod's Transmogrant")) {
|
||||
final Ability_Tap ability = new Ability_Tap(card) {
|
||||
@@ -8662,6 +8662,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Seal of Fire") || cardName.equals("Moonglove Extract")) {
|
||||
final Ability ability = new Ability(card, "0") {
|
||||
@@ -8714,6 +8715,7 @@ public class CardFactory implements NewConstants {
|
||||
}, true, false));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Seal of Removal")) {
|
||||
final Ability ability = new Ability(card, "0") {
|
||||
@@ -8843,6 +8845,7 @@ public class CardFactory implements NewConstants {
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Staff of Domination")) {
|
||||
|
||||
@@ -8955,6 +8958,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Goblin Charbelcher")) {
|
||||
final Ability_Tap ability = new Ability_Tap(card, "3") {
|
||||
@@ -9095,6 +9099,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Time Vault")) {
|
||||
final Ability_Tap ability = new Ability_Tap(card) {
|
||||
@@ -9138,8 +9143,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Serpent Generator")) {
|
||||
final SpellAbility ability = new Ability_Tap(card, "4") {
|
||||
@@ -9165,7 +9168,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Illusions of Grandeur")) {
|
||||
final SpellAbility gainLife = new Ability(card, "0") {
|
||||
@@ -9210,7 +9212,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Isochron Scepter"))
|
||||
{
|
||||
@@ -9350,9 +9351,6 @@ public class CardFactory implements NewConstants {
|
||||
//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Helix Pinnacle"))
|
||||
{
|
||||
@@ -9424,8 +9422,6 @@ public class CardFactory implements NewConstants {
|
||||
//****************END*******END***********************
|
||||
|
||||
|
||||
|
||||
|
||||
//*****************************START*******************************
|
||||
else if(cardName.equals("Jandor's Saddlebags")) {
|
||||
/* Assuing the Rules state that this can target an untapped card,
|
||||
@@ -9456,7 +9452,6 @@ public class CardFactory implements NewConstants {
|
||||
}//****************END*******END***********************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Bottle of Suleiman")) {
|
||||
/*
|
||||
@@ -9557,6 +9552,7 @@ public class CardFactory implements NewConstants {
|
||||
ability.setBeforePayMana(runtime);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Lodestone Bauble")) {
|
||||
/* 1, Tap, Sacrifice Lodestone Bauble: Put up to four target basic
|
||||
@@ -9654,6 +9650,7 @@ public class CardFactory implements NewConstants {
|
||||
ability.setBeforePayMana(CardFactoryUtil.input_targetPlayer(ability));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Grindstone")) {
|
||||
Ability_Tap ab1 = new Ability_Tap(card, "3") {
|
||||
@@ -9710,6 +9707,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ab1);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Keening Stone")) {
|
||||
/*
|
||||
@@ -9765,6 +9763,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Slate of Ancestry")) {
|
||||
/*
|
||||
@@ -9804,6 +9803,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Glasses of Urza")) {
|
||||
final Ability_Tap ability = new Ability_Tap(card, "0") {
|
||||
@@ -9833,6 +9833,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Everflowing Chalice")) {
|
||||
final Ability_Mana addMana = new Ability_Mana(card, "tap: add 1 to your mana pool for each charge counter on Everflowing Chalice.") {
|
||||
@@ -9868,6 +9869,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Chromatic Star")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@@ -9888,10 +9890,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Feldon's Cane")) {
|
||||
/*
|
||||
@@ -9927,63 +9925,6 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/* Converted to keyword
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Fabricate")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 5274602734116058876L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return 4 < AllZone.Phase.getTurn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
String player = card.getController();
|
||||
if(player.equals(Constant.Player.Human)) humanResolve();
|
||||
else computerResolve();
|
||||
|
||||
}
|
||||
|
||||
public void computerResolve() {
|
||||
CardList list = AllZoneUtil.getPlayerCardsInLibrary(Constant.Player.Computer);
|
||||
list = list.filter(AllZoneUtil.artifacts);
|
||||
|
||||
if(list.size() != 0) {
|
||||
//comp will just grab the first one it finds
|
||||
Card c = list.get(0);
|
||||
AllZone.GameAction.shuffle(card.getController());
|
||||
//move to hand
|
||||
AllZone.Computer_Library.remove(c);
|
||||
AllZone.Computer_Hand.add(c);
|
||||
|
||||
CardList l = new CardList();
|
||||
l.add(c);
|
||||
AllZone.Display.getChoiceOptional("Computer picked:", l.toArray());
|
||||
}
|
||||
}//computerResolve()
|
||||
|
||||
public void humanResolve() {
|
||||
CardList list = AllZoneUtil.getPlayerCardsInLibrary(Constant.Player.Human);
|
||||
list = list.filter(AllZoneUtil.artifacts);
|
||||
|
||||
if(list.size() != 0) {
|
||||
Object o = AllZone.Display.getChoiceOptional("Select an artifact", list.toArray());
|
||||
|
||||
AllZone.GameAction.shuffle(card.getController());
|
||||
if(o != null) {
|
||||
//put card in hand
|
||||
AllZone.Human_Library.remove(o);
|
||||
AllZone.Human_Hand.add((Card) o);
|
||||
}
|
||||
}//if
|
||||
}//resolve()
|
||||
};
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Curse of Wizardry")) {
|
||||
@@ -10054,6 +9995,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Expedition Map")) {
|
||||
final Ability_Tap ability = new Ability_Tap(card, "2") {
|
||||
@@ -10081,7 +10023,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Tormod's Crypt")) {
|
||||
/*
|
||||
@@ -10120,6 +10061,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Journey to Nowhere")) {
|
||||
|
||||
@@ -10293,14 +10235,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START ********** START *************************
|
||||
if (cardName.equals("Finest Hour") || cardName.equals("Gaea's Anthem") ||
|
||||
cardName.equals("Glorious Anthem"))
|
||||
// no card factory code, cards handled elsewhere,
|
||||
{
|
||||
card.setSVar("PlayMain1", "TRUE");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Recurring Nightmare")) {
|
||||
/*
|
||||
@@ -10364,6 +10298,7 @@ public class CardFactory implements NewConstants {
|
||||
ability.setBeforePayMana(target);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Mirror Universe")) {
|
||||
/*
|
||||
@@ -10412,6 +10347,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Jade Statue")) {
|
||||
/*
|
||||
@@ -10467,6 +10403,7 @@ public class CardFactory implements NewConstants {
|
||||
a1.setBeforePayMana(new Input_PayManaCost_Ability(a1.getManaCost(), paid1));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Jester's Cap")) {
|
||||
/*
|
||||
@@ -10503,6 +10440,7 @@ public class CardFactory implements NewConstants {
|
||||
ability.setBeforePayMana(CardFactoryUtil.input_targetPlayer(ability));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("An-Zerrin Ruins")) {
|
||||
|
||||
@@ -10533,6 +10471,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Tumble Magnet")) {
|
||||
/*
|
||||
@@ -10572,6 +10511,7 @@ public class CardFactory implements NewConstants {
|
||||
ability.setBeforePayMana(CardFactoryUtil.input_targetType(ability, "Creature;Artifact"));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(hasKeyword(card, "Cycling") != -1) {
|
||||
|
||||
Reference in New Issue
Block a user