Simplify implementation of pre-announcing X

This commit is contained in:
drdev
2014-09-14 16:44:42 +00:00
parent 43ccd4d09e
commit 4e5b5e4d6c
4 changed files with 9 additions and 19 deletions

View File

@@ -132,14 +132,13 @@ public class CostPayment {
}
public boolean payCost(final CostDecisionMakerBase decisionMaker) {
final List<CostPart> costParts = this.getCost().getCostPartsWithZeroMana();
for (final CostPart part : costParts) {
PaymentDecision pd = part.accept(decisionMaker);
if ( null == pd || !part.payAsDecided(decisionMaker.getPlayer(), pd, ability))
return false;
if (pd == null || !part.payAsDecided(decisionMaker.getPlayer(), pd, ability)) {
return false;
}
this.paidCostParts.add(part);
}

View File

@@ -29,11 +29,7 @@ public class ManaCostAdjustment {
public static final void adjust(ManaCostBeingPaid cost, final SpellAbility sa, boolean test) {
final Game game = sa.getActivatingPlayer().getGame();
// Beached
final Card originalCard = sa.getHostCard();
if (sa.isXCost() && !originalCard.isCopiedSpell()) {
originalCard.setXManaCostPaid(0);
}
if (sa.isTrigger()) {
return;