To bring in line with the use of modifying manaCostsToPay instead of the manaCosts.

This commit is contained in:
maurer.it 2011-01-17 23:10:58 -05:00
parent 0464dcdac2
commit 2c90429867
4 changed files with 8 additions and 2 deletions

View file

@ -59,7 +59,7 @@ public class Fireball extends CardImpl<Fireball> {
public void adjustCosts(Ability ability, Game game) {
int numTargets = ability.getTargets().get(0).getTargets().size();
if (numTargets > 1) {
ability.getManaCosts().add(new GenericManaCost(numTargets - 1));
ability.getManaCostsToPay().add(new GenericManaCost(numTargets - 1));
}
}

View file

@ -78,7 +78,7 @@ public class KhalniHydra extends CardImpl<KhalniHydra> {
public void adjustCosts(Ability ability, Game game) {
super.adjustCosts(ability, game);
int reductionAmount = game.getBattlefield().getAllActivePermanents(filter).size();
Iterator<ManaCost> iter = ability.getManaCosts().iterator();
Iterator<ManaCost> iter = ability.getManaCostsToPay().iterator();
while ( reductionAmount > 0 && iter.hasNext() ) {
iter.next();

View file

@ -57,6 +57,7 @@ public interface Ability extends Serializable {
public Costs<Cost> getCosts();
public void addCost(Cost cost);
public ManaCosts<ManaCost> getManaCosts();
public ManaCosts<ManaCost> getManaCostsToPay();
public void addManaCost(ManaCost cost);
public List<AlternativeCost> getAlternativeCosts();
public void addAlternativeCost(AlternativeCost cost);

View file

@ -250,6 +250,11 @@ public class StackAbility implements StackObject, Ability {
return ability.getManaCosts();
}
@Override
public ManaCosts<ManaCost> getManaCostsToPay ( ) {
return ability.getManaCostsToPay();
}
@Override
public void addManaCost(ManaCost cost) { }