mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38: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.setPayCosts(surgeCost);
|
||||||
newSA.setBasicSpell(false);
|
newSA.setBasicSpell(false);
|
||||||
newSA.addOptionalCost(OptionalCost.Surge);
|
newSA.setSurged(true);
|
||||||
|
|
||||||
String desc = "Surge " + surgeCost.toSimpleString() + " (" + inst.getReminderText()
|
String desc = "Surge " + surgeCost.toSimpleString() + " (" + inst.getReminderText()
|
||||||
+ ")";
|
+ ")";
|
||||||
|
|||||||
@@ -1614,9 +1614,10 @@ public class CardProperty {
|
|||||||
if (card.isOptionalCostPaid(OptionalCost.Generic)) return false;
|
if (card.isOptionalCostPaid(OptionalCost.Generic)) return false;
|
||||||
}
|
}
|
||||||
} else if (property.startsWith("surged")) {
|
} else if (property.startsWith("surged")) {
|
||||||
if (!card.isOptionalCostPaid(OptionalCost.Surge)) {
|
if (card.getCastSA() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return card.getCastSA().isSurged();
|
||||||
} else if (property.startsWith("evoked")) {
|
} else if (property.startsWith("evoked")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSA() == null) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ public enum OptionalCost {
|
|||||||
Kicker1("Kicker"),
|
Kicker1("Kicker"),
|
||||||
Kicker2("Kicker"),
|
Kicker2("Kicker"),
|
||||||
Retrace("Retrace"),
|
Retrace("Retrace"),
|
||||||
Surge("Surge"), // no real OptionalCost but used there
|
|
||||||
AltCost(""), // used by prowl
|
AltCost(""), // used by prowl
|
||||||
Flash("Flash"),
|
Flash("Flash"),
|
||||||
Generic("Generic"); // used by "Dragon Presence" and pseudo-kicker cards
|
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 cycling = false;
|
||||||
private boolean dash = false;
|
private boolean dash = false;
|
||||||
private boolean evoke = false;
|
private boolean evoke = false;
|
||||||
|
private boolean surge = false;
|
||||||
private boolean offering = false;
|
private boolean offering = false;
|
||||||
private boolean emerge = false;
|
private boolean emerge = false;
|
||||||
private boolean morphup = false;
|
private boolean morphup = false;
|
||||||
@@ -510,10 +511,6 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
getMultiKickerManaCost() != null;
|
getMultiKickerManaCost() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSurged() {
|
|
||||||
return isOptionalCostPaid(OptionalCost.Surge);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEntwine() {
|
public boolean isEntwine() {
|
||||||
return isOptionalCostPaid(OptionalCost.Entwine);
|
return isOptionalCostPaid(OptionalCost.Entwine);
|
||||||
}
|
}
|
||||||
@@ -1072,6 +1069,14 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
evoke = isEvoke;
|
evoke = isEvoke;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final boolean isSurged() {
|
||||||
|
return surge;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void setSurged(final boolean isSurge) {
|
||||||
|
surge = isSurge;
|
||||||
|
}
|
||||||
|
|
||||||
public CardCollection getTappedForConvoke() {
|
public CardCollection getTappedForConvoke() {
|
||||||
return tappedForConvoke;
|
return tappedForConvoke;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user