mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Delve and Convoke will now happen after cost reduction.
This commit is contained in:
@@ -36,20 +36,7 @@ public class ManaCostAdjustment {
|
|||||||
|
|
||||||
boolean isStateChangeToFaceDown = false;
|
boolean isStateChangeToFaceDown = false;
|
||||||
if (sa.isSpell()) {
|
if (sa.isSpell()) {
|
||||||
if (sa.isDelve()) {
|
if (((Spell) sa).isCastFaceDown()) {
|
||||||
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()) {
|
|
||||||
// Turn face down to apply cost modifiers correctly
|
// Turn face down to apply cost modifiers correctly
|
||||||
originalCard.setState(CardStateName.FaceDown, false);
|
originalCard.setState(CardStateName.FaceDown, false);
|
||||||
isStateChangeToFaceDown = true;
|
isStateChangeToFaceDown = true;
|
||||||
@@ -99,6 +86,23 @@ public class ManaCostAdjustment {
|
|||||||
applyAbility(stAb, "SetCost", sa, cost);
|
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)
|
// Reset card state (if changed)
|
||||||
if (isStateChangeToFaceDown) {
|
if (isStateChangeToFaceDown) {
|
||||||
originalCard.setState(CardStateName.Original, false);
|
originalCard.setState(CardStateName.Original, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user