mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Merge branch 'surgedFix' into 'master'
Surge: don't use OptionalCost there See merge request core-developers/forge!887
This commit is contained in:
@@ -4088,7 +4088,7 @@ public class CardFactoryUtil {
|
||||
|
||||
newSA.setPayCosts(surgeCost);
|
||||
newSA.setBasicSpell(false);
|
||||
newSA.addOptionalCost(OptionalCost.Surge);
|
||||
newSA.setSurged(true);
|
||||
|
||||
String desc = "Surge " + surgeCost.toSimpleString() + " (" + inst.getReminderText()
|
||||
+ ")";
|
||||
|
||||
@@ -1614,9 +1614,10 @@ public class CardProperty {
|
||||
if (card.isOptionalCostPaid(OptionalCost.Generic)) return false;
|
||||
}
|
||||
} else if (property.startsWith("surged")) {
|
||||
if (!card.isOptionalCostPaid(OptionalCost.Surge)) {
|
||||
if (card.getCastSA() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isSurged();
|
||||
} else if (property.startsWith("evoked")) {
|
||||
if (card.getCastSA() == null) {
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,6 @@ public enum OptionalCost {
|
||||
Kicker1("Kicker"),
|
||||
Kicker2("Kicker"),
|
||||
Retrace("Retrace"),
|
||||
Surge("Surge"), // no real OptionalCost but used there
|
||||
AltCost(""), // used by prowl
|
||||
Flash("Flash"),
|
||||
Generic("Generic"); // used by "Dragon Presence" and pseudo-kicker cards
|
||||
|
||||
@@ -97,6 +97,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
private boolean cycling = false;
|
||||
private boolean dash = false;
|
||||
private boolean evoke = false;
|
||||
private boolean surge = false;
|
||||
private boolean offering = false;
|
||||
private boolean emerge = false;
|
||||
private boolean morphup = false;
|
||||
@@ -510,10 +511,6 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
getMultiKickerManaCost() != null;
|
||||
}
|
||||
|
||||
public boolean isSurged() {
|
||||
return isOptionalCostPaid(OptionalCost.Surge);
|
||||
}
|
||||
|
||||
public boolean isEntwine() {
|
||||
return isOptionalCostPaid(OptionalCost.Entwine);
|
||||
}
|
||||
@@ -1072,6 +1069,14 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
evoke = isEvoke;
|
||||
}
|
||||
|
||||
public final boolean isSurged() {
|
||||
return surge;
|
||||
}
|
||||
|
||||
public final void setSurged(final boolean isSurge) {
|
||||
surge = isSurge;
|
||||
}
|
||||
|
||||
public CardCollection getTappedForConvoke() {
|
||||
return tappedForConvoke;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user