- Added Support for XChoice to CostRemoveCounter

- Converted Mana Batteries and FE Storage Lands to Script
This commit is contained in:
Sol
2011-08-23 04:25:00 +00:00
parent 2dbd141611
commit 943057865a
14 changed files with 60 additions and 29 deletions

View File

@@ -3,6 +3,10 @@ ManaCost:4
Types:Artifact Types:Artifact
Text:no text Text:no text
A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME. A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME.
A:AB$ Mana | Cost$ T SubCounter<X/CHARGE> | Produced$ U | Amount$ Y | CostDesc$ Tap, Remove any number of charge counters from CARDNAME: | SpellDescription$ Add B to your mana pool, then add an additional B to your mana pool for each charge counter removed this way.
SVar:Y:Number$1/Plus.ChosenX
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/black_mana_battery.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/black_mana_battery.jpg

View File

@@ -3,6 +3,10 @@ ManaCost:4
Types:Artifact Types:Artifact
Text:no text Text:no text
A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME. A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME.
A:AB$ Mana | Cost$ T SubCounter<X/CHARGE> | Produced$ U | Amount$ Y | CostDesc$ Tap, Remove any number of charge counters from CARDNAME: | SpellDescription$ Add U to your mana pool, then add an additional U to your mana pool for each charge counter removed this way.
SVar:Y:Number$1/Plus.ChosenX
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/blue_mana_battery.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/blue_mana_battery.jpg

View File

@@ -1,9 +1,14 @@
Name:Bottomless Vault Name:Bottomless Vault
ManaCost:no cost ManaCost:no cost
Types:Land Types:Land
Text:At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it. Text:no text
K:CARDNAME enters the battlefield tapped. K:CARDNAME enters the battlefield tapped.
K:You may choose not to untap CARDNAME during your untap step. K:You may choose not to untap CARDNAME during your untap step.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.Self+tapped | Execute$ TrigStore | TriggerDescription$ At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it.
SVar:TrigStore:DB$PutCounter | Defined$ Self | CounterType$ STORAGE | CounterNum$ 1
A:AB$ Mana | Cost$ T SubCounter<X/STORAGE> | Produced$ B | Amount$ ChosenX | CostDesc$ Tap, Remove any number of storage counters from CARDNAME: | SpellDescription$ Add B to your mana pool for each storage counter removed this way.
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/bottomless_vault.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/bottomless_vault.jpg

View File

@@ -1,9 +1,14 @@
Name:Dwarven Hold Name:Dwarven Hold
ManaCost:no cost ManaCost:no cost
Types:Land Types:Land
Text:At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it. Text:no text
K:CARDNAME enters the battlefield tapped. K:CARDNAME enters the battlefield tapped.
K:You may choose not to untap CARDNAME during your untap step. K:You may choose not to untap CARDNAME during your untap step.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.Self+tapped | Execute$ TrigStore | TriggerDescription$ At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it.
SVar:TrigStore:DB$PutCounter | Defined$ Self | CounterType$ STORAGE | CounterNum$ 1
A:AB$ Mana | Cost$ T SubCounter<X/STORAGE> | Produced$ R | Amount$ ChosenX | CostDesc$ Tap, Remove any number of storage counters from CARDNAME: | SpellDescription$ Add R to your mana pool for each storage counter removed this way.
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/dwarven_hold.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/dwarven_hold.jpg

View File

@@ -3,6 +3,10 @@ ManaCost:4
Types:Artifact Types:Artifact
Text:no text Text:no text
A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME. A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME.
A:AB$ Mana | Cost$ T SubCounter<X/CHARGE> | Produced$ G | Amount$ Y | CostDesc$ Tap, Remove any number of charge counters from CARDNAME: | SpellDescription$ Add G to your mana pool, then add an additional G to your mana pool for each charge counter removed this way.
SVar:Y:Number$1/Plus.ChosenX
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/green_mana_battery.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/green_mana_battery.jpg

View File

@@ -1,9 +1,14 @@
Name:Hollow Trees Name:Hollow Trees
ManaCost:no cost ManaCost:no cost
Types:Land Types:Land
Text:At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it. Text:no text
K:CARDNAME enters the battlefield tapped. K:CARDNAME enters the battlefield tapped.
K:You may choose not to untap CARDNAME during your untap step. K:You may choose not to untap CARDNAME during your untap step.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.Self+tapped | Execute$ TrigStore | TriggerDescription$ At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it.
SVar:TrigStore:DB$PutCounter | Defined$ Self | CounterType$ STORAGE | CounterNum$ 1
A:AB$ Mana | Cost$ T SubCounter<X/STORAGE> | Produced$ G | Amount$ ChosenX | CostDesc$ Tap, Remove any number of storage counters from CARDNAME: | SpellDescription$ Add G to your mana pool for each storage counter removed this way.
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/hollow_trees.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/hollow_trees.jpg

View File

@@ -1,9 +1,14 @@
Name:Icatian Store Name:Icatian Store
ManaCost:no cost ManaCost:no cost
Types:Land Types:Land
Text:At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it. Text:no text
K:CARDNAME enters the battlefield tapped. K:CARDNAME enters the battlefield tapped.
K:You may choose not to untap CARDNAME during your untap step. K:You may choose not to untap CARDNAME during your untap step.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.Self+tapped | Execute$ TrigStore | TriggerDescription$ At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it.
SVar:TrigStore:DB$PutCounter | Defined$ Self | CounterType$ STORAGE | CounterNum$ 1
A:AB$ Mana | Cost$ T SubCounter<X/STORAGE> | Produced$ W | Amount$ ChosenX | CostDesc$ Tap, Remove any number of storage counters from CARDNAME: | SpellDescription$ Add W to your mana pool for each storage counter removed this way.
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/icatian_store.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/icatian_store.jpg

View File

@@ -3,6 +3,10 @@ ManaCost:4
Types:Artifact Types:Artifact
Text:no text Text:no text
A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME. A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME.
A:AB$ Mana | Cost$ T SubCounter<X/CHARGE> | Produced$ R | Amount$ Y | CostDesc$ Tap, Remove any number of charge counters from CARDNAME: | SpellDescription$ Add R to your mana pool, then add an additional R to your mana pool for each charge counter removed this way.
SVar:Y:Number$1/Plus.ChosenX
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/red_mana_battery.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/red_mana_battery.jpg

View File

@@ -1,9 +1,14 @@
Name:Sand Silos Name:Sand Silos
ManaCost:no cost ManaCost:no cost
Types:Land Types:Land
Text:At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it. Text:no text
K:CARDNAME enters the battlefield tapped. K:CARDNAME enters the battlefield tapped.
K:You may choose not to untap CARDNAME during your untap step. K:You may choose not to untap CARDNAME during your untap step.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.Self+tapped | Execute$ TrigStore | TriggerDescription$ At the beginning of your upkeep, if CARDNAME is tapped, put a storage counter on it.
SVar:TrigStore:DB$PutCounter | Defined$ Self | CounterType$ STORAGE | CounterNum$ 1
A:AB$ Mana | Cost$ T SubCounter<X/STORAGE> | Produced$ U | Amount$ ChosenX | CostDesc$ Tap, Remove any number of storage counters from CARDNAME: | SpellDescription$ Add U to your mana pool for each storage counter removed this way.
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/sand_silos.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/sand_silos.jpg

View File

@@ -3,6 +3,10 @@ ManaCost:4
Types:Artifact Types:Artifact
Text:no text Text:no text
A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME. A:AB$ PutCounter | Cost$ 2 T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME.
A:AB$ Mana | Cost$ T SubCounter<X/CHARGE> | Produced$ W | Amount$ Y | CostDesc$ Tap, Remove any number of charge counters from CARDNAME: | SpellDescription$ Add W to your mana pool, then add an additional W to your mana pool for each charge counter removed this way.
SVar:Y:Number$1/Plus.ChosenX
SVar:X:XChoice
#ChosenX SVar created by Cost payment
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/white_mana_battery.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/white_mana_battery.jpg

View File

@@ -78,7 +78,6 @@ public class Upkeep implements java.io.Serializable {
upkeep_Lord_of_the_Pit(); upkeep_Lord_of_the_Pit();
upkeep_Drop_of_Honey(); upkeep_Drop_of_Honey();
upkeep_Demonic_Hordes(); upkeep_Demonic_Hordes();
upkeep_Fallen_Empires_Storage_Lands();
upkeep_Carnophage(); upkeep_Carnophage();
upkeep_Sangrophage(); upkeep_Sangrophage();
upkeep_Dega_Sanctuary(); upkeep_Dega_Sanctuary();
@@ -2916,22 +2915,4 @@ public class Upkeep implements java.io.Serializable {
else c.tap(); else c.tap();
} }
}// upkeep_Carnophage }// upkeep_Carnophage
/**
* <p>upkeep_Fallen_Empires_Storage_Lands.</p>
*/
private static void upkeep_Fallen_Empires_Storage_Lands() {
final Player player = AllZone.getPhase().getPlayerTurn();
CardList all = AllZoneUtil.getPlayerCardsInPlay(player, "Bottomless Vault");
all.addAll(AllZoneUtil.getPlayerCardsInPlay(player, "Dwarven Hold"));
all.addAll(AllZoneUtil.getPlayerCardsInPlay(player, "Hollow Trees"));
all.addAll(AllZoneUtil.getPlayerCardsInPlay(player, "Icatian Store"));
all.addAll(AllZoneUtil.getPlayerCardsInPlay(player, "Sand Silos"));
for (Card land : all) {
if (land.isTapped()) land.addCounter(Counters.STORAGE, 1);
}
} //upkeep_Fallen_Empires_Storage_Lands
}//end class Upkeep }//end class Upkeep

View File

@@ -31,7 +31,6 @@ import forge.game.GameLossReason;
import forge.gui.GuiUtils; import forge.gui.GuiUtils;
import forge.gui.input.Input; import forge.gui.input.Input;
import forge.gui.input.Input_PayManaCost; import forge.gui.input.Input_PayManaCost;
import forge.gui.input.Input_PayManaCostUtil;
import forge.properties.ForgeProps; import forge.properties.ForgeProps;
import forge.properties.NewConstants; import forge.properties.NewConstants;
@@ -1344,6 +1343,7 @@ public abstract class AbstractCardFactory implements NewConstants, CardFactoryIn
//*************** START ************ START ************************** //*************** START ************ START **************************
/*
else if (cardName.equals("Black Mana Battery") || cardName.equals("Blue Mana Battery") else if (cardName.equals("Black Mana Battery") || cardName.equals("Blue Mana Battery")
|| cardName.equals("Green Mana Battery") || cardName.equals("Red Mana Battery") || cardName.equals("Green Mana Battery") || cardName.equals("Red Mana Battery")
|| cardName.equals("White Mana Battery")) || cardName.equals("White Mana Battery"))
@@ -1420,6 +1420,7 @@ public abstract class AbstractCardFactory implements NewConstants, CardFactoryIn
addMana.setBeforePayMana(runtime); addMana.setBeforePayMana(runtime);
card.addSpellAbility(addMana); card.addSpellAbility(addMana);
} }
*/
//*************** END ************ END ************************** //*************** END ************ END **************************

View File

@@ -545,7 +545,7 @@ class CardFactory_Lands {
card.addComesIntoPlayCommand(comesIntoPlay); card.addComesIntoPlayCommand(comesIntoPlay);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
/*
//*************** START ************ START ************************** //*************** START ************ START **************************
else if (cardName.equals("Bottomless Vault") || cardName.equals("Dwarven Hold") else if (cardName.equals("Bottomless Vault") || cardName.equals("Dwarven Hold")
|| cardName.equals("Hollow Trees") || cardName.equals("Icatian Store") || cardName.equals("Hollow Trees") || cardName.equals("Icatian Store")
@@ -641,7 +641,7 @@ class CardFactory_Lands {
card.addSpellAbility(addMana); card.addSpellAbility(addMana);
card.addSpellAbility(abMana); card.addSpellAbility(abMana);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
*/
//*************** START *********** START ************************** //*************** START *********** START **************************
//Lorwyn Dual Lands, and a couple Morningtide... //Lorwyn Dual Lands, and a couple Morningtide...

View File

@@ -12,7 +12,6 @@ public class CostRemoveCounter extends CostPart {
private Counters counter; private Counters counter;
private int lastPaidAmount = 0; private int lastPaidAmount = 0;
public Counters getCounter() { public Counters getCounter() {
return counter; return counter;
} }
@@ -115,6 +114,11 @@ public class CostRemoveCounter extends CostPart {
public boolean decideAIPayment(SpellAbility ability, Card source, Cost_Payment payment) { public boolean decideAIPayment(SpellAbility ability, Card source, Cost_Payment payment) {
Integer c = convertAmount(); Integer c = convertAmount();
if (c == null){ if (c == null){
String sVar = source.getSVar(amount);
if (sVar.equals("XChoice")){
return false;
}
c = AbilityFactory.calculateAmount(source, amount, ability); c = AbilityFactory.calculateAmount(source, amount, ability);
} }
if (c > source.getCounters(getCounter())) { if (c > source.getCounters(getCounter())) {