- Fix for non-AF mana producers properly accounting for their set Amount

- Fix for City of Shadows and Everflowing Chalice not using Amount$ X
This commit is contained in:
jendave
2011-08-06 15:20:19 +00:00
parent 80d3fa9e92
commit 8cfed25c29
3 changed files with 20 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ ManaCost:no cost
Types:Land
Text:X is the number of storage counters on City of Shadows.
A:AB$PutCounter | Cost$ Exile<1/Creature> | CounterType$ STORAGE | CounterNum$ 1 | SpellDescription$ Put a storage counter on CARDNAME.
A:AB$Mana|Cost$T|Produced$X|SpellDescription$Add X to your mana pool, where X is the number of storage counters on City of Shadows.
A:AB$Mana|Cost$T|Produced$1|Amount$X|SpellDescription$Add X to your mana pool, where X is the number of storage counters on City of Shadows.
SVar:X:Count$CardCounters.STORAGE
SVar:RemAIDeck:True
SVar:Rarity:Rare

View File

@@ -3,7 +3,7 @@ ManaCost:0
Types:Artifact
Text:Everflowing Chalice enters the battlefield with a charge counter on it for each time it was kicked.
K:Multikicker 2
A:AB$Mana|Cost$T|Produced$X|SpellDescription$Add 1 to your mana pool for each charge counter on CARDNAME.
A:AB$Mana|Cost$T|Produced$1|Amount$X|SpellDescription$Add 1 to your mana pool for each charge counter on CARDNAME.
SVar:X:Count$CardCounters.CHARGE
SVar:RemAIDeck:True
SVar:Rarity:Uncommon

View File

@@ -41,7 +41,24 @@ abstract public class Ability_Mana extends Ability_Activated implements java.io.
}
public void produceMana(){
produceMana(origProduced);
StringBuilder sb = new StringBuilder();
if (amount == 0)
sb.append("0");
else{
try{
// if baseMana is an integer(colorless), just multiply amount and baseMana
int base = Integer.parseInt(origProduced);
sb.append(base*amount);
}
catch(NumberFormatException e){
for(int i = 0; i < amount; i++){
if (i != 0)
sb.append(" ");
sb.append(origProduced);
}
}
}
produceMana(sb.toString());
}
public void produceMana(String produced){