mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
[MID] Implemented Light Up the Night
This commit is contained in:
parent
dbd4b32e6b
commit
1b5ad66ae5
3 changed files with 110 additions and 1 deletions
|
|
@ -31,16 +31,25 @@ public class RemoveVariableCountersTargetCost extends VariableCostImpl {
|
|||
}
|
||||
|
||||
public RemoveVariableCountersTargetCost(FilterPermanent filter, CounterType counterTypeToRemove, String xText, int minValue) {
|
||||
this(filter, counterTypeToRemove, xText, minValue, null);
|
||||
}
|
||||
|
||||
public RemoveVariableCountersTargetCost(FilterPermanent filter, CounterType counterTypeToRemove, String xText, int minValue, String text) {
|
||||
super(VariableCostType.NORMAL, xText, new StringBuilder(counterTypeToRemove != null ? counterTypeToRemove.getName() + ' ' : "").append("counters to remove").toString());
|
||||
this.filter = filter;
|
||||
this.counterTypeToRemove = counterTypeToRemove;
|
||||
this.text = setText();
|
||||
if (text != null && !text.isEmpty()) {
|
||||
this.text = text;
|
||||
} else {
|
||||
this.text = setText();
|
||||
}
|
||||
this.minValue = minValue;
|
||||
}
|
||||
|
||||
public RemoveVariableCountersTargetCost(final RemoveVariableCountersTargetCost cost) {
|
||||
super(cost);
|
||||
this.filter = cost.filter;
|
||||
this.counterTypeToRemove = cost.counterTypeToRemove;
|
||||
this.minValue = cost.minValue;
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +72,16 @@ public class RemoveVariableCountersTargetCost extends VariableCostImpl {
|
|||
return new RemoveVariableCountersTargetCost(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
|
||||
return getMaxValue(source, game) >= minValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinValue(Ability source, Game game) {
|
||||
return minValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxValue(Ability source, Game game) {
|
||||
int maxValue = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue