From feeec5d5928ec7b1eedb83cef7640a6292fb8c1e Mon Sep 17 00:00:00 2001 From: Sloth Date: Mon, 3 Nov 2014 19:55:57 +0000 Subject: [PATCH] - Delve and Convoke will now happen after cost reduction. --- .../forge/game/mana/ManaCostAdjustment.java | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/forge-game/src/main/java/forge/game/mana/ManaCostAdjustment.java b/forge-game/src/main/java/forge/game/mana/ManaCostAdjustment.java index deb8be9a4b5..182e71de795 100644 --- a/forge-game/src/main/java/forge/game/mana/ManaCostAdjustment.java +++ b/forge-game/src/main/java/forge/game/mana/ManaCostAdjustment.java @@ -36,20 +36,7 @@ public class ManaCostAdjustment { boolean isStateChangeToFaceDown = false; if (sa.isSpell()) { - if (sa.isDelve()) { - final Player pc = originalCard.getController(); - final CardCollection mutableGrave = new CardCollection(pc.getCardsIn(ZoneType.Graveyard)); - final CardCollectionView toExile = pc.getController().chooseCardsToDelve(cost.getUnpaidShards(ManaCostShard.COLORLESS), mutableGrave); - for (final Card c : toExile) { - cost.decreaseColorlessMana(1); - if (!test) { - pc.getGame().getAction().exile(c); - } - } - } - else if (sa.getHostCard().hasKeyword("Convoke")) { - adjustCostByConvoke(cost, sa, test); - } else if (((Spell) sa).isCastFaceDown()) { + if (((Spell) sa).isCastFaceDown()) { // Turn face down to apply cost modifiers correctly originalCard.setState(CardStateName.FaceDown, false); isStateChangeToFaceDown = true; @@ -98,6 +85,23 @@ public class ManaCostAdjustment { for (final StaticAbility stAb : setAbilities) { applyAbility(stAb, "SetCost", sa, cost); } + + if (sa.isSpell()) { + if (sa.isDelve()) { + final Player pc = originalCard.getController(); + final CardCollection mutableGrave = new CardCollection(pc.getCardsIn(ZoneType.Graveyard)); + final CardCollectionView toExile = pc.getController().chooseCardsToDelve(cost.getUnpaidShards(ManaCostShard.COLORLESS), mutableGrave); + for (final Card c : toExile) { + cost.decreaseColorlessMana(1); + if (!test) { + pc.getGame().getAction().exile(c); + } + } + } + else if (sa.getHostCard().hasKeyword("Convoke")) { + adjustCostByConvoke(cost, sa, test); + } + } // isSpell // Reset card state (if changed) if (isStateChangeToFaceDown) {