mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added Support for XChoice to CostRemoveCounter
- Converted Mana Batteries and FE Storage Lands to Script
This commit is contained in:
@@ -3,6 +3,10 @@ ManaCost:4
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
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:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/black_mana_battery.jpg
|
||||
|
||||
@@ -3,6 +3,10 @@ ManaCost:4
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
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:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/blue_mana_battery.jpg
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
Name:Bottomless Vault
|
||||
ManaCost:no cost
|
||||
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: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:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/bottomless_vault.jpg
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
Name:Dwarven Hold
|
||||
ManaCost:no cost
|
||||
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: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:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/dwarven_hold.jpg
|
||||
|
||||
@@ -3,6 +3,10 @@ ManaCost:4
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
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:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/green_mana_battery.jpg
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
Name:Hollow Trees
|
||||
ManaCost:no cost
|
||||
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: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:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/hollow_trees.jpg
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
Name:Icatian Store
|
||||
ManaCost:no cost
|
||||
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: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:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/icatian_store.jpg
|
||||
|
||||
@@ -3,6 +3,10 @@ ManaCost:4
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
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:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/red_mana_battery.jpg
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
Name:Sand Silos
|
||||
ManaCost:no cost
|
||||
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: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:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sand_silos.jpg
|
||||
|
||||
@@ -3,6 +3,10 @@ ManaCost:4
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
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:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/white_mana_battery.jpg
|
||||
|
||||
@@ -78,7 +78,6 @@ public class Upkeep implements java.io.Serializable {
|
||||
upkeep_Lord_of_the_Pit();
|
||||
upkeep_Drop_of_Honey();
|
||||
upkeep_Demonic_Hordes();
|
||||
upkeep_Fallen_Empires_Storage_Lands();
|
||||
upkeep_Carnophage();
|
||||
upkeep_Sangrophage();
|
||||
upkeep_Dega_Sanctuary();
|
||||
@@ -2915,23 +2914,5 @@ public class Upkeep implements java.io.Serializable {
|
||||
if (AllZone.getComputerPlayer().getLife() > 2) player.loseLife(2, c);
|
||||
else c.tap();
|
||||
}
|
||||
}// 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
|
||||
|
||||
}// upkeep_Carnophage
|
||||
}//end class Upkeep
|
||||
|
||||
@@ -31,7 +31,6 @@ import forge.game.GameLossReason;
|
||||
import forge.gui.GuiUtils;
|
||||
import forge.gui.input.Input;
|
||||
import forge.gui.input.Input_PayManaCost;
|
||||
import forge.gui.input.Input_PayManaCostUtil;
|
||||
import forge.properties.ForgeProps;
|
||||
import forge.properties.NewConstants;
|
||||
|
||||
@@ -1344,6 +1343,7 @@ public abstract class AbstractCardFactory implements NewConstants, CardFactoryIn
|
||||
|
||||
|
||||
//*************** START ************ START **************************
|
||||
/*
|
||||
else if (cardName.equals("Black Mana Battery") || cardName.equals("Blue Mana Battery")
|
||||
|| cardName.equals("Green Mana Battery") || cardName.equals("Red Mana Battery")
|
||||
|| cardName.equals("White Mana Battery"))
|
||||
@@ -1420,6 +1420,7 @@ public abstract class AbstractCardFactory implements NewConstants, CardFactoryIn
|
||||
addMana.setBeforePayMana(runtime);
|
||||
card.addSpellAbility(addMana);
|
||||
}
|
||||
*/
|
||||
//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ class CardFactory_Lands {
|
||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
/*
|
||||
//*************** START ************ START **************************
|
||||
else if (cardName.equals("Bottomless Vault") || cardName.equals("Dwarven Hold")
|
||||
|| cardName.equals("Hollow Trees") || cardName.equals("Icatian Store")
|
||||
@@ -641,7 +641,7 @@ class CardFactory_Lands {
|
||||
card.addSpellAbility(addMana);
|
||||
card.addSpellAbility(abMana);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
*/
|
||||
|
||||
//*************** START *********** START **************************
|
||||
//Lorwyn Dual Lands, and a couple Morningtide...
|
||||
|
||||
@@ -12,7 +12,6 @@ public class CostRemoveCounter extends CostPart {
|
||||
private Counters counter;
|
||||
private int lastPaidAmount = 0;
|
||||
|
||||
|
||||
public Counters getCounter() {
|
||||
return counter;
|
||||
}
|
||||
@@ -115,6 +114,11 @@ public class CostRemoveCounter extends CostPart {
|
||||
public boolean decideAIPayment(SpellAbility ability, Card source, Cost_Payment payment) {
|
||||
Integer c = convertAmount();
|
||||
if (c == null){
|
||||
String sVar = source.getSVar(amount);
|
||||
if (sVar.equals("XChoice")){
|
||||
return false;
|
||||
}
|
||||
|
||||
c = AbilityFactory.calculateAmount(source, amount, ability);
|
||||
}
|
||||
if (c > source.getCounters(getCounter())) {
|
||||
|
||||
Reference in New Issue
Block a user