mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
BoostPowerXSourceEffect fix.
This commit is contained in:
parent
51a9c03ed1
commit
66fad7b482
1 changed files with 3 additions and 8 deletions
|
@ -63,15 +63,10 @@ public class BoostPowerXSourceEffect extends ContinuousEffectImpl<BoostPowerXSou
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
if (amount < 0) {
|
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||||
List<VariableCost> varCost = source.getCosts().getVariableCosts();
|
if (amount == 0) {
|
||||||
if (varCost.size() > 0) {
|
|
||||||
amount = varCost.get(0).getAmount();
|
|
||||||
} else {
|
|
||||||
amount = 0;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Permanent target = (Permanent) game.getPermanent(source.getSourceId());
|
Permanent target = (Permanent) game.getPermanent(source.getSourceId());
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
target.addPower(amount);
|
target.addPower(amount);
|
||||||
|
|
Loading…
Reference in a new issue