- Moving EOT command inside the Resolve function to "lock in" the timestamp of each activation of color changers.

- Manlands and other color changers now change color back to colorless at the end of the turn after multiple activations.
This commit is contained in:
jendave
2011-08-06 08:20:55 +00:00
parent 3ad9ebf1c2
commit a5125dd00b
4 changed files with 259 additions and 232 deletions

View File

@@ -10354,17 +10354,7 @@ public class CardFactory implements NewConstants {
* 2: Jade Statue becomes a 3/6 Golem artifact creature until * 2: Jade Statue becomes a 3/6 Golem artifact creature until
* end of combat. Activate this ability only during combat. * end of combat. Activate this ability only during combat.
*/ */
final long[] timeStamp = new long[1];
final Command untilEOC = new Command() {
private static final long serialVersionUID = -8432597117196682284L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Golem" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "4");
}
};
final SpellAbility a1 = new Ability(card, "2") { final SpellAbility a1 = new Ability(card, "2") {
@Override @Override
@@ -10382,7 +10372,18 @@ public class CardFactory implements NewConstants {
Card c = card; Card c = card;
String[] types = { "Creature", "Golem" }; String[] types = { "Creature", "Golem" };
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 3, 6, types, keywords, "4"); timeStamp[0] = CardFactoryUtil.activateManland(c, 3, 6, types, keywords, "4");
final Command untilEOC = new Command() {
private static final long serialVersionUID = -8432597117196682284L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Golem" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "4", stamp);
}
};
AllZone.EndOfCombat.addUntil(untilEOC); AllZone.EndOfCombat.addUntil(untilEOC);
} }

View File

@@ -4516,7 +4516,7 @@ public class CardFactoryUtil {
} }
public static void revertManland(Card c, String[] removeTypes, String[] removeKeywords, String cost) { public static void revertManland(Card c, String[] removeTypes, String[] removeKeywords, String cost, long timeStamp) {
c.setBaseAttack(0); c.setBaseAttack(0);
c.setBaseDefense(0); c.setBaseDefense(0);
for(String r : removeTypes) for(String r : removeTypes)
@@ -4525,11 +4525,12 @@ public class CardFactoryUtil {
for(String k : removeKeywords) for(String k : removeKeywords)
c.removeIntrinsicKeyword(k); c.removeIntrinsicKeyword(k);
c.setManaCost(cost); //c.setManaCost(cost);
c.removeColor(cost, c, false, timeStamp);
c.unEquipAllCards(); c.unEquipAllCards();
} }
public static void activateManland(Card c, int attack, int defense, String[] addTypes, String[] addKeywords, String cost) { public static long activateManland(Card c, int attack, int defense, String[] addTypes, String[] addKeywords, String cost) {
c.setBaseAttack(attack); c.setBaseAttack(attack);
c.setBaseDefense(defense); c.setBaseDefense(defense);
@@ -4546,7 +4547,9 @@ public class CardFactoryUtil {
c.addIntrinsicKeyword(k); c.addIntrinsicKeyword(k);
} }
c.setManaCost(cost); //c.setManaCost(cost);
long timestamp = c.addColor(cost, c, false, true);
return timestamp;
} }
public static boolean canHumanPlayLand(){ public static boolean canHumanPlayLand(){

View File

@@ -5665,11 +5665,11 @@ public class CardFactory_Creatures {
final Command EOT = new Command() { final Command EOT = new Command() {
private static final long serialVersionUID = -1899153704584793548L; private static final long serialVersionUID = -1899153704584793548L;
long stamp = timestamp;
public void execute() { public void execute() {
if (AllZone.GameAction.isCardInPlay(creature[0])) { if (AllZone.GameAction.isCardInPlay(creature[0])) {
creature[0].removeExtrinsicKeyword("Flying"); creature[0].removeExtrinsicKeyword("Flying");
creature[0].removeColor("U", card, false, timestamp); creature[0].removeColor("U", card, false, stamp);
} }
} }
}; };
@@ -7407,19 +7407,6 @@ public class CardFactory_Creatures {
final String[] color = new String[1]; final String[] color = new String[1];
final long[] timeStamp = new long[1]; final long[] timeStamp = new long[1];
//sacrifice ability - targets itself - until EOT
final Command untilEOT = new Command() {
private static final long serialVersionUID = -5563743272875711445L;
public void execute() {
card.addTempAttackBoost(-1);
card.addTempDefenseBoost(-1);
String s = CardUtil.getShortColor(color[0]);
card.removeColor(s, card, false, timeStamp[0]);
card.setChosenColor("");
}
};
//mana tap ability //mana tap ability
final Ability ability = new Ability(card, "0") { final Ability ability = new Ability(card, "0") {
@Override @Override
@@ -7468,6 +7455,21 @@ public class CardFactory_Creatures {
} }
String s = CardUtil.getShortColor(color[0]); String s = CardUtil.getShortColor(color[0]);
timeStamp[0] = card.addColor(s, card, false, true); timeStamp[0] = card.addColor(s, card, false, true);
//sacrifice ability - targets itself - until EOT
final Command untilEOT = new Command() {
private static final long serialVersionUID = -5563743272875711445L;
long stamp = timeStamp[0];
String s = CardUtil.getShortColor(color[0]);
public void execute() {
card.addTempAttackBoost(-1);
card.addTempDefenseBoost(-1);
card.removeColor(s, card, false, stamp);
card.setChosenColor("");
}
};
AllZone.EndOfTurn.addUntil(untilEOT); AllZone.EndOfTurn.addUntil(untilEOT);
} }
}//resolve() }//resolve()
@@ -7496,17 +7498,6 @@ public class CardFactory_Creatures {
final String[] color = new String[1]; final String[] color = new String[1];
final long[] timeStamp = new long[1]; final long[] timeStamp = new long[1];
//until EOT
final Command untilEOT = new Command() {
private static final long serialVersionUID = -7093762180313802891L;
public void execute() {
String s = CardUtil.getShortColor(color[0]);
card.removeColor(s, card, false, timeStamp[0]);
card.setChosenColor("");
}
};
//color change ability //color change ability
final Ability ability = new Ability(card, "G") { final Ability ability = new Ability(card, "G") {
@@ -7526,6 +7517,18 @@ public class CardFactory_Creatures {
card.setChosenColor(color[0]); card.setChosenColor(color[0]);
String s = CardUtil.getShortColor(color[0]); String s = CardUtil.getShortColor(color[0]);
timeStamp[0] = card.addColor(s, card, false, true); timeStamp[0] = card.addColor(s, card, false, true);
//until EOT
final Command untilEOT = new Command() {
private static final long serialVersionUID = -7093762180313802891L;
long stamp = timeStamp[0];
String s = CardUtil.getShortColor(color[0]);
public void execute() {
card.removeColor(s, card, false, stamp);
card.setChosenColor("");
}
};
AllZone.EndOfTurn.addUntil(untilEOT); AllZone.EndOfTurn.addUntil(untilEOT);
} }
} }

View File

@@ -505,6 +505,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Faerie Conclave")) { else if(cardName.equals("Faerie Conclave")) {
final long[] timeStamp = new long[1];
card.addComesIntoPlayCommand(new Command() { card.addComesIntoPlayCommand(new Command() {
private static final long serialVersionUID = 2792041290726604698L; private static final long serialVersionUID = 2792041290726604698L;
@@ -513,17 +514,6 @@ class CardFactory_Lands {
} }
}); });
final Command eot1 = new Command() {
private static final long serialVersionUID = 5106629534549783845L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Faerie" };
String[] keywords = { "Flying" };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1 U") { final SpellAbility a1 = new Ability(card, "1 U") {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
@@ -535,7 +525,19 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Creature", "Faerie" }; String[] types = { "Creature", "Faerie" };
String[] keywords = { "Flying" }; String[] keywords = { "Flying" };
CardFactoryUtil.activateManland(c, 2, 1, types, keywords, "U"); timeStamp[0] = CardFactoryUtil.activateManland(c, 2, 1, types, keywords, "U");
final Command eot1 = new Command() {
private static final long serialVersionUID = 5106629534549783845L;
public void execute() {
long stamp = timeStamp[0];
Card c = card;
String[] types = { "Creature", "Faerie" };
String[] keywords = { "Flying" };
CardFactoryUtil.revertManland(c, types, keywords, "U", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -561,6 +563,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Forbidding Watchtower")) { else if(cardName.equals("Forbidding Watchtower")) {
final long[] timeStamp = new long[1];
card.addComesIntoPlayCommand(new Command() { card.addComesIntoPlayCommand(new Command() {
private static final long serialVersionUID = 5212793782060828409L; private static final long serialVersionUID = 5212793782060828409L;
@@ -569,18 +572,6 @@ class CardFactory_Lands {
} }
}); });
final Command eot1 = new Command() {
private static final long serialVersionUID = 8806880921707550181L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Soldier" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1 W") { final SpellAbility a1 = new Ability(card, "1 W") {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
@@ -592,7 +583,19 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Creature", "Soldier" }; String[] types = { "Creature", "Soldier" };
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 1, 5, types, keywords, "W"); timeStamp[0] = CardFactoryUtil.activateManland(c, 1, 5, types, keywords, "W");
final Command eot1 = new Command() {
private static final long serialVersionUID = 8806880921707550181L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Soldier" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "W", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -617,6 +620,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Treetop Village")) { else if(cardName.equals("Treetop Village")) {
final long[] timeStamp = new long[1];
card.addComesIntoPlayCommand(new Command() { card.addComesIntoPlayCommand(new Command() {
private static final long serialVersionUID = -2246560994818997231L; private static final long serialVersionUID = -2246560994818997231L;
@@ -625,18 +629,6 @@ class CardFactory_Lands {
} }
}); });
final Command eot1 = new Command() {
private static final long serialVersionUID = -8535770979347971863L;
public void execute() {
Card c = card;
String[] removeTypes = { "Creature", "Ape" };
String[] removeKeywords = { "Trample" };
CardFactoryUtil.revertManland(c, removeTypes, removeKeywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1 G") { final SpellAbility a1 = new Ability(card, "1 G") {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
@@ -646,17 +638,22 @@ class CardFactory_Lands {
@Override @Override
public void resolve() { public void resolve() {
Card c = card; Card c = card;
String[] types = { "Creature", "Ape" };
String[] keywords = { "Trample" };
timeStamp[0] = CardFactoryUtil.activateManland(c, 3, 3, types, keywords, "G");
c.setBaseAttack(3); final Command eot1 = new Command() {
c.setBaseDefense(3); private static final long serialVersionUID = -8535770979347971863L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] removeTypes = { "Creature", "Ape" };
String[] removeKeywords = { "Trample" };
CardFactoryUtil.revertManland(c, removeTypes, removeKeywords, "G", stamp);
}
};
//to prevent like duplication like "Creature Creature"
if(!c.getIntrinsicKeyword().contains("Trample")) {
c.addType("Creature");
c.addType("Ape");
c.addIntrinsicKeyword("Trample");
c.setManaCost("G");
}
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
};//SpellAbility };//SpellAbility
@@ -679,17 +676,8 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Blinkmoth Nexus")) { else if(cardName.equals("Blinkmoth Nexus")) {
final long[] timeStamp = new long[1];
final SpellAbility a1 = new Ability(card, "1") { final SpellAbility a1 = new Ability(card, "1") {
final Command eot1 = new Command() {
private static final long serialVersionUID = 3564161001279001235L;
public void execute() {
Card c = card;
String[] types = { "Artifact", "Creature", "Blinkmoth" };
String[] keywords = { "Flying" };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
@@ -701,7 +689,18 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Artifact", "Creature", "Blinkmoth" }; String[] types = { "Artifact", "Creature", "Blinkmoth" };
String[] keywords = { "Flying" }; String[] keywords = { "Flying" };
CardFactoryUtil.activateManland(c, 1, 1, types, keywords, ""); timeStamp[0] = CardFactoryUtil.activateManland(c, 1, 1, types, keywords, "");
final Command eot1 = new Command() {
private static final long serialVersionUID = 3564161001279001235L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Artifact", "Creature", "Blinkmoth" };
String[] keywords = { "Flying" };
CardFactoryUtil.revertManland(c, types, keywords, "", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -846,17 +845,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Mishra's Factory")) { else if(cardName.equals("Mishra's Factory")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = -956566640027406078L;
public void execute() {
Card c = card;
String[] types = { "Artifact", "Creature", "Assembly-Worker" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1") { final SpellAbility a1 = new Ability(card, "1") {
@Override @Override
@@ -872,7 +861,19 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Artifact", "Creature", "Assembly-Worker" }; String[] types = { "Artifact", "Creature", "Assembly-Worker" };
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 2, 2, types, keywords, ""); timeStamp[0] = CardFactoryUtil.activateManland(c, 2, 2, types, keywords, "");
final Command eot1 = new Command() {
private static final long serialVersionUID = -956566640027406078L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Artifact", "Creature", "Assembly-Worker" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -2256,18 +2257,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Mutavault")) { else if(cardName.equals("Mutavault")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = 5106629534549783845L;
public void execute() {
Card c = card;
String[] types = { "Creature" };
String[] keywords = { "Changeling" };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1") { final SpellAbility a1 = new Ability(card, "1") {
@Override @Override
@@ -2280,7 +2270,20 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Creature" }; String[] types = { "Creature" };
String[] keywords = { "Changeling" }; String[] keywords = { "Changeling" };
CardFactoryUtil.activateManland(c, 2, 2, types, keywords, ""); timeStamp[0] = CardFactoryUtil.activateManland(c, 2, 2, types, keywords, "");
final Command eot1 = new Command() {
private static final long serialVersionUID = 5106629534549783845L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature" };
String[] keywords = { "Changeling" };
CardFactoryUtil.revertManland(c, types, keywords, "", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -2306,6 +2309,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Spawning Pool")) { else if(cardName.equals("Spawning Pool")) {
final long[] timeStamp = new long[1];
final Command untilEOT = new Command() { final Command untilEOT = new Command() {
private static final long serialVersionUID = -451839437837081897L; private static final long serialVersionUID = -451839437837081897L;
@@ -2333,18 +2337,6 @@ class CardFactory_Lands {
a2.setBeforePayMana(new Input_PayManaCost(a2)); a2.setBeforePayMana(new Input_PayManaCost(a2));
final Command eot1 = new Command() {
private static final long serialVersionUID = -8535770979347971863L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Skeleton" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "");
c.removeSpellAbility(a2);
}
};
final SpellAbility a1 = new Ability(card, "1 B") { final SpellAbility a1 = new Ability(card, "1 B") {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
@@ -2356,7 +2348,7 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Creature", "Skeleton" }; String[] types = { "Creature", "Skeleton" };
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 1, 1, types, keywords, "B"); timeStamp[0] = CardFactoryUtil.activateManland(c, 1, 1, types, keywords, "B");
// Don't stack Regen ability // Don't stack Regen ability
boolean hasRegen = false; boolean hasRegen = false;
@@ -2369,6 +2361,18 @@ class CardFactory_Lands {
card.addSpellAbility(a2); card.addSpellAbility(a2);
} }
final Command eot1 = new Command() {
private static final long serialVersionUID = -8535770979347971863L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Skeleton" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "B", stamp);
c.removeSpellAbility(a2);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
};//SpellAbility };//SpellAbility
@@ -2942,17 +2946,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Svogthos, the Restless Tomb")) { else if(cardName.equals("Svogthos, the Restless Tomb")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = -8535770979347971863L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Zombie", "Plant" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "3 B G") { final SpellAbility a1 = new Ability(card, "3 B G") {
@Override @Override
@@ -2974,7 +2968,19 @@ class CardFactory_Lands {
String[] types = { "Creature", "Zombie", "Plant" }; String[] types = { "Creature", "Zombie", "Plant" };
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 1, 1, types, keywords, "B G"); timeStamp[0] = CardFactoryUtil.activateManland(c, 1, 1, types, keywords, "B G");
final Command eot1 = new Command() {
private static final long serialVersionUID = -8535770979347971863L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Zombie", "Plant" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "B G", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -2990,17 +2996,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Ghitu Encampment")) { else if(cardName.equals("Ghitu Encampment")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = -8535770979347971863L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Warrior" };
String[] keywords = { "First Strike" };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1 R") { final SpellAbility a1 = new Ability(card, "1 R") {
@Override @Override
@@ -3013,7 +3009,20 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Creature", "Warrior" }; String[] types = { "Creature", "Warrior" };
String[] keywords = { "First Strike" }; String[] keywords = { "First Strike" };
CardFactoryUtil.activateManland(c, 2, 1, types, keywords, "R"); timeStamp[0] = CardFactoryUtil.activateManland(c, 2, 1, types, keywords, "R");
final Command eot1 = new Command() {
private static final long serialVersionUID = -8535770979347971863L;
public void execute() {
long stamp = timeStamp[0];
Card c = card;
String[] types = { "Creature", "Warrior" };
String[] keywords = { "First Strike" };
CardFactoryUtil.revertManland(c, types, keywords, "R", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -3090,16 +3099,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Celestial Colonnade")) { else if(cardName.equals("Celestial Colonnade")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = 7377356496869217420L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { "Vigilance", "Flying" };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "3 W U") { final SpellAbility a1 = new Ability(card, "3 W U") {
@Override @Override
@@ -3113,7 +3113,18 @@ class CardFactory_Lands {
String[] types = { "Creature", "Elemental" }; String[] types = { "Creature", "Elemental" };
String[] keywords = { "Vigilance", "Flying" }; String[] keywords = { "Vigilance", "Flying" };
CardFactoryUtil.activateManland(c, 4, 4, types, keywords, "W U"); timeStamp[0] = CardFactoryUtil.activateManland(c, 4, 4, types, keywords, "W U");
final Command eot1 = new Command() {
private static final long serialVersionUID = 7377356496869217420L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { "Vigilance", "Flying" };
CardFactoryUtil.revertManland(c, types, keywords, "W U", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -3128,6 +3139,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Lavaclaw Reaches")) { else if(cardName.equals("Lavaclaw Reaches")) {
final long[] timeStamp = new long[1];
final SpellAbility X_ability = new Ability(card, "0") { final SpellAbility X_ability = new Ability(card, "0") {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
@@ -3181,18 +3193,6 @@ class CardFactory_Lands {
} }
}); });
final Command eot1 = new Command() {
private static final long serialVersionUID = -132950142223575L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "");
c.removeSpellAbility(X_ability);
}
};
final SpellAbility a1 = new Ability(card, "1 B R") { final SpellAbility a1 = new Ability(card, "1 B R") {
@Override @Override
public boolean canPlayAI() { public boolean canPlayAI() {
@@ -3204,13 +3204,25 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Creature", "Elemental" }; String[] types = { "Creature", "Elemental" };
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 2, 2, types, keywords, "B R"); timeStamp[0] = CardFactoryUtil.activateManland(c, 2, 2, types, keywords, "B R");
card.removeSpellAbility(X_ability); card.removeSpellAbility(X_ability);
X_ability.setDescription("X: This creature gets +X/+0 until end of turn."); X_ability.setDescription("X: This creature gets +X/+0 until end of turn.");
X_ability.setStackDescription("X: This creature gets +X/+0 until end of turn."); X_ability.setStackDescription("X: This creature gets +X/+0 until end of turn.");
card.addSpellAbility(X_ability); card.addSpellAbility(X_ability);
final Command eot1 = new Command() {
private static final long serialVersionUID = -132950142223575L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "B R", stamp);
c.removeSpellAbility(X_ability);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -3234,16 +3246,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Stirring Wildwood")) { else if(cardName.equals("Stirring Wildwood")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = -1329533520874994575L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { "Reach" };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1 G W") { final SpellAbility a1 = new Ability(card, "1 G W") {
@Override @Override
@@ -3257,7 +3260,18 @@ class CardFactory_Lands {
String[] types = { "Creature", "Elemental" }; String[] types = { "Creature", "Elemental" };
String[] keywords = { "Reach" }; String[] keywords = { "Reach" };
CardFactoryUtil.activateManland(c, 3, 4, types, keywords, "G W"); timeStamp[0] = CardFactoryUtil.activateManland(c, 3, 4, types, keywords, "G W");
final Command eot1 = new Command() {
private static final long serialVersionUID = -1329533520874994575L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { "Reach" };
CardFactoryUtil.revertManland(c, types, keywords, "G W", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -3273,16 +3287,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Creeping Tar Pit")) { else if(cardName.equals("Creeping Tar Pit")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = -6004932967127014386L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { "Unblockable" };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "1 U B") { final SpellAbility a1 = new Ability(card, "1 U B") {
@Override @Override
@@ -3295,7 +3300,18 @@ class CardFactory_Lands {
Card c = card; Card c = card;
String[] types = { "Creature", "Elemental" }; String[] types = { "Creature", "Elemental" };
String[] keywords = { "Unblockable" }; String[] keywords = { "Unblockable" };
CardFactoryUtil.activateManland(c, 3, 2, types, keywords, "U B"); timeStamp[0] = CardFactoryUtil.activateManland(c, 3, 2, types, keywords, "U B");
final Command eot1 = new Command() {
private static final long serialVersionUID = -6004932967127014386L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental" };
String[] keywords = { "Unblockable" };
CardFactoryUtil.revertManland(c, types, keywords, "U B", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
@@ -3311,17 +3327,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Raging Ravine")) { else if(cardName.equals("Raging Ravine")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = -2632172918887247003L;
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental"};
String[] keywords = { "Whenever this creature attacks, put a +1/+1 counter on it." };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "2 R G") { final SpellAbility a1 = new Ability(card, "2 R G") {
@Override @Override
@@ -3335,11 +3341,23 @@ class CardFactory_Lands {
String[] types = { "Creature", "Elemental"}; String[] types = { "Creature", "Elemental"};
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 3, 3, types, keywords, "R G"); timeStamp[0] = CardFactoryUtil.activateManland(c, 3, 3, types, keywords, "R G");
// this keyword stacks, so we can't put it through the activate // this keyword stacks, so we can't put it through the activate
c.addIntrinsicKeyword("Whenever this creature attacks, put a +1/+1 counter on it."); c.addIntrinsicKeyword("Whenever this creature attacks, put a +1/+1 counter on it.");
final Command eot1 = new Command() {
private static final long serialVersionUID = -2632172918887247003L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Creature", "Elemental"};
String[] keywords = { "Whenever this creature attacks, put a +1/+1 counter on it." };
CardFactoryUtil.revertManland(c, types, keywords, "R G", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }
};//SpellAbility };//SpellAbility
@@ -3353,17 +3371,7 @@ class CardFactory_Lands {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Dread Statuary")) { else if(cardName.equals("Dread Statuary")) {
final Command eot1 = new Command() { final long[] timeStamp = new long[1];
private static final long serialVersionUID = -2632172918887247003L;
public void execute() {
Card c = card;
String[] types = { "Artifact", "Creature", "Golem"};
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "");
}
};
final SpellAbility a1 = new Ability(card, "4") { final SpellAbility a1 = new Ability(card, "4") {
@Override @Override
@@ -3377,7 +3385,19 @@ class CardFactory_Lands {
String[] types = { "Artifact", "Creature", "Golem"}; String[] types = { "Artifact", "Creature", "Golem"};
String[] keywords = { }; String[] keywords = { };
CardFactoryUtil.activateManland(c, 4, 2, types, keywords, ""); timeStamp[0] = CardFactoryUtil.activateManland(c, 4, 2, types, keywords, "");
final Command eot1 = new Command() {
private static final long serialVersionUID = -2632172918887247003L;
long stamp = timeStamp[0];
public void execute() {
Card c = card;
String[] types = { "Artifact", "Creature", "Golem"};
String[] keywords = { };
CardFactoryUtil.revertManland(c, types, keywords, "", stamp);
}
};
AllZone.EndOfTurn.addUntil(eot1); AllZone.EndOfTurn.addUntil(eot1);
} }