mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
707.10: Copied spells incomplete
This commit is contained in:
@@ -1258,14 +1258,8 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
}
|
||||
|
||||
public final int getXManaCostPaid() {
|
||||
SpellAbility castSA;
|
||||
if (getCopiedPermanent() != null) {
|
||||
castSA = getCopiedPermanent().getCastSA();
|
||||
} else {
|
||||
castSA = getCastSA();
|
||||
}
|
||||
if (castSA != null) {
|
||||
Integer paid = castSA.getXManaCostPaid();
|
||||
if (getCastSAFallBack() != null) {
|
||||
Integer paid = getCastSAFallBack().getXManaCostPaid();
|
||||
return paid == null ? 0 : paid;
|
||||
}
|
||||
return 0;
|
||||
@@ -6092,6 +6086,9 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
public SpellAbility getCastSA() {
|
||||
return castSA;
|
||||
}
|
||||
public SpellAbility getCastSAFallBack() {
|
||||
return getCopiedPermanent() != null ? getCopiedPermanent().getCastSA() : castSA;
|
||||
}
|
||||
|
||||
public void setCastSA(SpellAbility castSA) {
|
||||
this.castSA = castSA;
|
||||
|
||||
@@ -124,6 +124,8 @@ public class CardFactory {
|
||||
final Game game = source.getGame();
|
||||
final Card c = new Card(game.nextCardId(), original.getPaperCard(), game);
|
||||
copyCopiableCharacteristics(original, c);
|
||||
// fix old cardstates
|
||||
buildAbilities(c);
|
||||
|
||||
if (sourceSA.hasParam("NonLegendary")) {
|
||||
c.removeType(CardType.Supertype.Legendary);
|
||||
|
||||
@@ -1680,40 +1680,40 @@ public class CardProperty {
|
||||
if (!card.isOptionalCostPaid(OptionalCost.Generic)) return false;
|
||||
}
|
||||
} else if (property.equals("surged")) {
|
||||
if (card.getCastSA() == null) {
|
||||
if (card.getCastSAFallBack() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isSurged();
|
||||
return card.getCastSAFallBack().isSurged();
|
||||
} else if (property.equals("blitzed")) {
|
||||
if (card.getCastSA() == null) {
|
||||
if (card.getCastSAFallBack() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isBlitz();
|
||||
} else if (property.equals("dashed")) {
|
||||
if (card.getCastSA() == null) {
|
||||
if (card.getCastSAFallBack() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isDash();
|
||||
return card.getCastSAFallBack().isDash();
|
||||
} else if (property.equals("escaped")) {
|
||||
if (card.getCastSA() == null) {
|
||||
if (card.getCastSAFallBack() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isEscape();
|
||||
return card.getCastSAFallBack().isEscape();
|
||||
} else if (property.equals("evoked")) {
|
||||
if (card.getCastSA() == null) {
|
||||
if (card.getCastSAFallBack() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isEvoke();
|
||||
return card.getCastSAFallBack().isEvoke();
|
||||
} else if (property.equals("prowled")) {
|
||||
if (card.getCastSA() == null) {
|
||||
if (card.getCastSAFallBack() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isProwl();
|
||||
return card.getCastSAFallBack().isProwl();
|
||||
} else if (property.equals("spectacle")) {
|
||||
if (card.getCastSA() == null) {
|
||||
if (card.getCastSAFallBack() == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isSpectacle();
|
||||
return card.getCastSAFallBack().isSpectacle();
|
||||
} else if (property.equals("foretold")) {
|
||||
if (!card.isForetold()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user