mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
- Bolas's Citadel now handles additional costs correctly.
This commit is contained in:
parent
c5249d6ef0
commit
2352e9d765
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,7 @@ import mage.players.Player;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
|
@ -98,9 +99,14 @@ class BolassCitadelPlayTheTopCardEffect extends AsThoughEffectImpl {
|
||||||
Player controller = game.getPlayer(cardOnTop.getOwnerId());
|
Player controller = game.getPlayer(cardOnTop.getOwnerId());
|
||||||
if (controller != null
|
if (controller != null
|
||||||
&& cardOnTop.equals(controller.getLibrary().getFromTop(game))) {
|
&& cardOnTop.equals(controller.getLibrary().getFromTop(game))) {
|
||||||
|
// add the life cost first
|
||||||
PayLifeCost cost = new PayLifeCost(cardOnTop.getManaCost().convertedManaCost());
|
PayLifeCost cost = new PayLifeCost(cardOnTop.getManaCost().convertedManaCost());
|
||||||
Costs costs = new CostsImpl();
|
Costs costs = new CostsImpl();
|
||||||
costs.add(cost);
|
costs.add(cost);
|
||||||
|
// check for additional costs that must be paid
|
||||||
|
for (Cost additionalCost : cardOnTop.getSpellAbility().getCosts()) {
|
||||||
|
costs.add(additionalCost);
|
||||||
|
}
|
||||||
controller.setCastSourceIdWithAlternateMana(cardOnTop.getId(), null, costs);
|
controller.setCastSourceIdWithAlternateMana(cardOnTop.getId(), null, costs);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue