- Added targeting and Defined parameters to AF Mana.

- Added Vernal Bloom.
This commit is contained in:
jendave
2011-08-07 01:29:00 +00:00
parent a2ca33900a
commit 1d36706205
5 changed files with 30 additions and 4 deletions

1
.gitattributes vendored
View File

@@ -7767,6 +7767,7 @@ res/cardsfolder/verdigris.txt -text svneol=native#text/plain
res/cardsfolder/verduran_emissary.txt -text svneol=native#text/plain
res/cardsfolder/verduran_enchantress.txt -text svneol=native#text/plain
res/cardsfolder/vermiculos.txt -text svneol=native#text/plain
res/cardsfolder/vernal_bloom.txt -text svneol=native#text/plain
res/cardsfolder/vernal_equinox.txt svneol=native#text/plain
res/cardsfolder/vertigo_spawn.txt svneol=native#text/plain
res/cardsfolder/vesper_ghoul.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Vernal Bloom
ManaCost:3 G
Types:World Enchantment
Text:no text
T:Mode$ TapsForMana | ValidCard$ Forest | Execute$ TrigMana | TriggerDescription$ Whenever a Forest is tapped for mana, its controller adds G to his or her mana pool (in addition to the mana the land produces).
SVar:TrigMana:AB$Mana | Cost$ 0 | Produced$ G | Amount$ 1 | Defined$ TriggeredPlayer
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/vernal_bloom.jpg
End

View File

@@ -2,10 +2,11 @@ Name:Winter's Night
ManaCost:R G W
Types:World Enchantment
Text:no text
T:Mode$ Taps | ValidCard$ Land.Snow | Execute$ TrigMana | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player taps a snow land for mana, that player adds one mana to his or her mana pool of any type that land produced. That land doesn't untap during its controller's next untap step.
T:Mode$ TapsForMana | ValidCard$ Land.Snow | Execute$ TrigMana | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player taps a snow land for mana, that player adds one mana to his or her mana pool of any type that land produced. That land doesn't untap during its controller's next untap step.
SVar:TrigMana:AB$ManaReflected | Cost$ 0 | ColorOrType$ Type | Valid$ Card.IsTriggeredCard | ReflectProperty$ Produce | SubAbility$ SVar=DBPump
SVar:DBPump:DB$Pump | Defined$ TriggeredCard | Permanent$ True | KW$ HIDDEN This card doesn't untap during your next untap step.
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/winters_night.jpg
SetInfo:ALL|Rare|http://magiccards.info/scans/en/ai/199.jpg

View File

@@ -15,6 +15,7 @@ import forge.card.spellability.Ability_Sub;
import forge.card.spellability.Cost;
import forge.card.spellability.Spell;
import forge.card.spellability.SpellAbility;
import forge.card.spellability.Target;
import forge.gui.GuiUtils;
import forge.gui.input.Input_PayManaCostUtil;
@@ -116,7 +117,6 @@ public class AbilityFactory_Mana {
@Override
public boolean chkAI_Drawback() {
// TODO: AI shouldn't use this until he has a mana pool
return true;
}
@@ -158,7 +158,16 @@ public class AbilityFactory_Mana {
HashMap<String,String> params = af.getMapParams();
Card card = af.getHostCard();
abMana.produceMana(generatedMana(abMana, af, sa), sa.getActivatingPlayer());
ArrayList<Player> tgtPlayers;
Target tgt = af.getAbTgt();
if (tgt != null)
tgtPlayers = tgt.getTargetPlayers();
else
tgtPlayers = AbilityFactory.getDefinedPlayers(sa.getSourceCard(), params.get("Defined"), sa);
for(Player player : tgtPlayers)
abMana.produceMana(generatedMana(abMana, af, sa), player);
// convert these to SubAbilities when appropriate
if (params.containsKey("Stuck")){

View File

@@ -321,7 +321,12 @@ public class ManaPool extends Card {
return choice;
}
Object o = GuiUtils.getChoiceOptional("Pay Mana from Mana Pool", alChoice.toArray());
Object o;
if (owner.isHuman())
o = GuiUtils.getChoiceOptional("Pay Mana from Mana Pool", alChoice.toArray());
else o = alChoice.get(0); //owner is computer
if (o != null){
String ch = o.toString();
boolean grabSnow = ch.startsWith("{S}");