forked from External/mage
Added possibility to check kind of cost to pay for conditional mana use.
This commit is contained in:
parent
d63f6d7d27
commit
c8f82b49ff
208 changed files with 770 additions and 571 deletions
|
|
@ -35,6 +35,7 @@ import mage.abilities.dynamicvalue.common.StaticValue;
|
|||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.Cost;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -73,7 +74,7 @@ public class PayLifeCost extends CostImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
int lifeToPayAmount = amount.calculate(game, ability, null);
|
||||
this.paid = game.getPlayer(controllerId).loseLife(lifeToPayAmount, game) == lifeToPayAmount;
|
||||
return paid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue