mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
add PayVariableEnergyCost, fixing [PIP] HELIOS One & [MH3] Chtonian Nightmare
fix #12217
This commit is contained in:
parent
fc6c7b36e5
commit
534d1be175
6 changed files with 59 additions and 83 deletions
|
|
@ -0,0 +1,38 @@
|
|||
package mage.abilities.costs.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.VariableCostImpl;
|
||||
import mage.abilities.costs.VariableCostType;
|
||||
import mage.abilities.dynamicvalue.common.SourceControllerCountersCount;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class PayVariableEnergyCost extends VariableCostImpl {
|
||||
|
||||
public PayVariableEnergyCost() {
|
||||
super(VariableCostType.NORMAL, "{E} to pay");
|
||||
this.text = "Pay " + xText + " {E}";
|
||||
}
|
||||
|
||||
protected PayVariableEnergyCost(final PayVariableEnergyCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PayVariableEnergyCost copy() {
|
||||
return new PayVariableEnergyCost(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cost getFixedCostsFromAnnouncedValue(int xValue) {
|
||||
return new PayEnergyCost(xValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxValue(Ability source, Game game) {
|
||||
return SourceControllerCountersCount.ENERGY.calculate(game, source, null);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue