mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
added cost adjuster to stack ability class
This commit is contained in:
parent
537391a772
commit
e42505765b
1 changed files with 24 additions and 5 deletions
|
@ -1,14 +1,11 @@
|
||||||
package mage.game.stack;
|
package mage.game.stack;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.*;
|
import mage.abilities.*;
|
||||||
import mage.abilities.costs.Cost;
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.costs.CostAdjuster;
|
||||||
import mage.abilities.costs.Costs;
|
import mage.abilities.costs.Costs;
|
||||||
import mage.abilities.costs.CostsImpl;
|
import mage.abilities.costs.CostsImpl;
|
||||||
import mage.abilities.costs.mana.ManaCost;
|
import mage.abilities.costs.mana.ManaCost;
|
||||||
|
@ -32,8 +29,12 @@ import mage.util.GameLog;
|
||||||
import mage.util.SubTypeList;
|
import mage.util.SubTypeList;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class StackAbility extends StackObjImpl implements Ability {
|
public class StackAbility extends StackObjImpl implements Ability {
|
||||||
|
@ -50,6 +51,7 @@ public class StackAbility extends StackObjImpl implements Ability {
|
||||||
private String name;
|
private String name;
|
||||||
private String expansionSetCode;
|
private String expansionSetCode;
|
||||||
private TargetAdjuster targetAdjuster = null;
|
private TargetAdjuster targetAdjuster = null;
|
||||||
|
private CostAdjuster costAdjuster = null;
|
||||||
|
|
||||||
public StackAbility(Ability ability, UUID controllerId) {
|
public StackAbility(Ability ability, UUID controllerId) {
|
||||||
this.ability = ability;
|
this.ability = ability;
|
||||||
|
@ -611,4 +613,21 @@ public class StackAbility extends StackObjImpl implements Ability {
|
||||||
targetAdjuster.adjustTargets(this, game);
|
targetAdjuster.adjustTargets(this, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCostAdjuster(CostAdjuster costAdjuster) {
|
||||||
|
this.costAdjuster = costAdjuster;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CostAdjuster getCostAdjuster() {
|
||||||
|
return costAdjuster;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void adjustCosts(Game game) {
|
||||||
|
if (costAdjuster != null) {
|
||||||
|
costAdjuster.adjustCosts(this, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue