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() {
|
public final int getXManaCostPaid() {
|
||||||
SpellAbility castSA;
|
if (getCastSAFallBack() != null) {
|
||||||
if (getCopiedPermanent() != null) {
|
Integer paid = getCastSAFallBack().getXManaCostPaid();
|
||||||
castSA = getCopiedPermanent().getCastSA();
|
|
||||||
} else {
|
|
||||||
castSA = getCastSA();
|
|
||||||
}
|
|
||||||
if (castSA != null) {
|
|
||||||
Integer paid = castSA.getXManaCostPaid();
|
|
||||||
return paid == null ? 0 : paid;
|
return paid == null ? 0 : paid;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -6092,6 +6086,9 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
public SpellAbility getCastSA() {
|
public SpellAbility getCastSA() {
|
||||||
return castSA;
|
return castSA;
|
||||||
}
|
}
|
||||||
|
public SpellAbility getCastSAFallBack() {
|
||||||
|
return getCopiedPermanent() != null ? getCopiedPermanent().getCastSA() : castSA;
|
||||||
|
}
|
||||||
|
|
||||||
public void setCastSA(SpellAbility castSA) {
|
public void setCastSA(SpellAbility castSA) {
|
||||||
this.castSA = castSA;
|
this.castSA = castSA;
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ public class CardFactory {
|
|||||||
final Game game = source.getGame();
|
final Game game = source.getGame();
|
||||||
final Card c = new Card(game.nextCardId(), original.getPaperCard(), game);
|
final Card c = new Card(game.nextCardId(), original.getPaperCard(), game);
|
||||||
copyCopiableCharacteristics(original, c);
|
copyCopiableCharacteristics(original, c);
|
||||||
|
// fix old cardstates
|
||||||
|
buildAbilities(c);
|
||||||
|
|
||||||
if (sourceSA.hasParam("NonLegendary")) {
|
if (sourceSA.hasParam("NonLegendary")) {
|
||||||
c.removeType(CardType.Supertype.Legendary);
|
c.removeType(CardType.Supertype.Legendary);
|
||||||
|
|||||||
@@ -1680,40 +1680,40 @@ public class CardProperty {
|
|||||||
if (!card.isOptionalCostPaid(OptionalCost.Generic)) return false;
|
if (!card.isOptionalCostPaid(OptionalCost.Generic)) return false;
|
||||||
}
|
}
|
||||||
} else if (property.equals("surged")) {
|
} else if (property.equals("surged")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSAFallBack() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return card.getCastSA().isSurged();
|
return card.getCastSAFallBack().isSurged();
|
||||||
} else if (property.equals("blitzed")) {
|
} else if (property.equals("blitzed")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSAFallBack() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return card.getCastSA().isBlitz();
|
return card.getCastSA().isBlitz();
|
||||||
} else if (property.equals("dashed")) {
|
} else if (property.equals("dashed")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSAFallBack() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return card.getCastSA().isDash();
|
return card.getCastSAFallBack().isDash();
|
||||||
} else if (property.equals("escaped")) {
|
} else if (property.equals("escaped")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSAFallBack() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return card.getCastSA().isEscape();
|
return card.getCastSAFallBack().isEscape();
|
||||||
} else if (property.equals("evoked")) {
|
} else if (property.equals("evoked")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSAFallBack() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return card.getCastSA().isEvoke();
|
return card.getCastSAFallBack().isEvoke();
|
||||||
} else if (property.equals("prowled")) {
|
} else if (property.equals("prowled")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSAFallBack() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return card.getCastSA().isProwl();
|
return card.getCastSAFallBack().isProwl();
|
||||||
} else if (property.equals("spectacle")) {
|
} else if (property.equals("spectacle")) {
|
||||||
if (card.getCastSA() == null) {
|
if (card.getCastSAFallBack() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return card.getCastSA().isSpectacle();
|
return card.getCastSAFallBack().isSpectacle();
|
||||||
} else if (property.equals("foretold")) {
|
} else if (property.equals("foretold")) {
|
||||||
if (!card.isForetold()) {
|
if (!card.isForetold()) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user