forked from External/mage
[DMC] Implemented Verrak, Warped Sengir
This commit is contained in:
parent
d3e939e600
commit
71d12fdb72
3 changed files with 124 additions and 1 deletions
|
|
@ -6,7 +6,6 @@ import mage.abilities.costs.CostImpl;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
|
@ -18,6 +17,7 @@ import java.util.UUID;
|
|||
public class PayLifeCost extends CostImpl {
|
||||
|
||||
private final DynamicValue amount;
|
||||
private int lifePaid = 0;
|
||||
|
||||
public PayLifeCost(int amount) {
|
||||
this(StaticValue.get(amount), Integer.toString(amount) + " life");
|
||||
|
|
@ -55,6 +55,7 @@ public class PayLifeCost extends CostImpl {
|
|||
}
|
||||
int lifeToPayAmount = amount.calculate(game, ability, null);
|
||||
this.paid = CardUtil.tryPayLife(lifeToPayAmount, controller, source, game);
|
||||
this.lifePaid = lifeToPayAmount;
|
||||
return this.paid;
|
||||
}
|
||||
|
||||
|
|
@ -63,4 +64,13 @@ public class PayLifeCost extends CostImpl {
|
|||
return new PayLifeCost(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearPaid() {
|
||||
super.clearPaid();
|
||||
lifePaid = 0;
|
||||
}
|
||||
|
||||
public int getLifePaid() {
|
||||
return lifePaid;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue