mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Fix Thieving Skydiver 0 kicker
This commit is contained in:
@@ -866,11 +866,11 @@ public class Cost implements Serializable {
|
||||
String r1 = mPart.getRestiction();
|
||||
String r = r1 == null ? r2 : ( r2 == null ? r1 : r1 + "." + r2);
|
||||
costParts.remove(costPart2);
|
||||
if (r == null && (mPart.isExiledCreatureCost() || mPart.isEnchantedCreatureCost())) {
|
||||
if (r == null && (mPart.isExiledCreatureCost() || mPart.isEnchantedCreatureCost() || !mPart.canXbe0())) {
|
||||
// FIXME: something was amiss when trying to add the cost since the mana cost is either \EnchantedCost or \Exiled but the
|
||||
// restriction no longer marks it as such. Therefore, we need to explicitly copy the ExiledCreatureCost/EnchantedCreatureCost
|
||||
// to make cards like Merseine or Back from the Brink work.
|
||||
costParts.add(0, new CostPartMana(oldManaCost.toManaCost(), r, mPart.isExiledCreatureCost(), mPart.isEnchantedCreatureCost()));
|
||||
costParts.add(0, new CostPartMana(oldManaCost.toManaCost(), r, mPart.isExiledCreatureCost(), mPart.isEnchantedCreatureCost(), !mPart.canXbe0()));
|
||||
} else {
|
||||
costParts.add(0, new CostPartMana(oldManaCost.toManaCost(), r));
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ public class CostPartMana extends CostPart {
|
||||
}
|
||||
|
||||
// This version of the constructor allows to explicitly set exiledCreatureCost/enchantedCreatureCost, used only when copying costs
|
||||
public CostPartMana(final ManaCost cost, String restriction, boolean exiledCreatureCost, boolean enchantedCreatureCost) {
|
||||
public CostPartMana(final ManaCost cost, String restriction, boolean exiledCreatureCost, boolean enchantedCreatureCost, boolean XCantBe0) {
|
||||
this.cost = cost;
|
||||
this.xCantBe0 = "XCantBe0".equals(restriction);
|
||||
this.xCantBe0 = XCantBe0;
|
||||
this.isExiledCreatureCost = exiledCreatureCost;
|
||||
this.isEnchantedCreatureCost = enchantedCreatureCost;
|
||||
this.restriction = xCantBe0 || isExiledCreatureCost || isEnchantedCreatureCost? null : restriction;
|
||||
|
||||
Reference in New Issue
Block a user