mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Simplify implementation of pre-announcing X
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user