Merge branch 'newPerspectivesCyclingFix' into 'master'

GameActionUtil: fix CyclingForZero

Closes #653

See merge request core-developers/forge!870
This commit is contained in:
Michael Kamensky
2018-08-21 16:21:16 +00:00
2 changed files with 6 additions and 1 deletions

View File

@@ -174,7 +174,8 @@ public final class GameActionUtil {
}
if (sa.isCycling() && activator.hasKeyword("CyclingForZero")) {
final SpellAbility newSA = sa.copyWithNoManaCost();
// set the cost to this directly to buypass non mana cost
final SpellAbility newSA = sa.copyWithDefinedCost("Discard<1/CARDNAME>");
newSA.setBasicSpell(false);
newSA.getMapParams().put("CostDesc", ManaCostParser.parse("0"));
// makes new SpellDescription

View File

@@ -900,6 +900,10 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
return newSA;
}
public SpellAbility copyWithDefinedCost(String abCost) {
return copyWithDefinedCost(new Cost(abCost, isAbility()));
}
public boolean isTrigger() {
return trigger;
}