mirror of
https://github.com/magefree/mage.git
synced 2026-01-18 09:19:56 -08:00
some work at otional cost. not finished. Desolation agel broken for testing
This commit is contained in:
parent
f1bf37bbd0
commit
58fd018db2
3 changed files with 21 additions and 7 deletions
|
|
@ -56,6 +56,8 @@ import mage.target.Targets;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import javax.management.openmbean.ArrayType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -162,6 +164,15 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
|||
logger.debug("activate failed - target");
|
||||
return false;
|
||||
}
|
||||
ArrayList<Cost> addedOptionalCosts = new ArrayList<Cost>();
|
||||
for (Cost cost : optionalCosts) {
|
||||
if (game.getPlayer(this.controllerId).chooseUse(Outcome.Benefit, "Pay optional cost " + cost.getText() + "?", game)) {
|
||||
if (cost instanceof ManaCost) {
|
||||
manaCostsToPay.add((ManaCost) cost);
|
||||
addedOptionalCosts.add(cost);
|
||||
}
|
||||
}
|
||||
}
|
||||
//20100716 - 601.2e
|
||||
if (game.getObject(sourceId) != null) {
|
||||
//game.getObject(sourceId).adjustCosts(this, game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue