mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Fix so Oracle Text appears on fallback image for copies
This commit is contained in:
@@ -152,7 +152,7 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
|
||||
for (int i = 0; i < multiplier; i++) {
|
||||
final Card copy = CardFactory.copyCopiableCharacteristics(c, sa.getActivatingPlayer());
|
||||
copy.setToken(true);
|
||||
copy.setCopiedToken(true);
|
||||
copy.setCopiedPermanent(c);
|
||||
CardFactory.copyCopiableAbilities(c, copy);
|
||||
// add keywords from sa
|
||||
for (final String kw : keywords) {
|
||||
|
||||
@@ -148,7 +148,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
private boolean tapped = false;
|
||||
private boolean sickness = true; // summoning sickness
|
||||
private boolean token = false;
|
||||
private boolean copiedToken = false;
|
||||
private Card copiedPermanent = null;
|
||||
private boolean copiedSpell = false;
|
||||
|
||||
private ArrayList<Card> mustBlockCards = null;
|
||||
@@ -2921,25 +2921,25 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>copiedToken</code>.
|
||||
* Getter for the field <code>copiedPermanent</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param b
|
||||
* a boolean.
|
||||
* @return a Card.
|
||||
*/
|
||||
public final void setCopiedToken(final boolean b) {
|
||||
this.copiedToken = b;
|
||||
public final Card getCopiedPermanent() {
|
||||
return this.copiedPermanent;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* isCopiedToken.
|
||||
* Setter for the field <code>copiedPermanent</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
* @param c
|
||||
* a Card.
|
||||
*/
|
||||
public final boolean isCopiedToken() {
|
||||
return this.copiedToken;
|
||||
public final void setCopiedPermanent(final Card c) {
|
||||
this.copiedPermanent = c;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -8939,7 +8939,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
public int getCMC(SplitCMCMode mode) {
|
||||
if (isToken() && !isCopiedToken()) {
|
||||
if (isToken() && getCopiedPermanent() == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9157,4 +9157,12 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
public Card getCardForUi() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOracleText() {
|
||||
CardRules rules = cardRules;
|
||||
if (copiedPermanent != null) { //return oracle text of copied permanent if applicable
|
||||
rules = copiedPermanent.getRules();
|
||||
}
|
||||
return rules != null ? rules.getOracleText() : "";
|
||||
}
|
||||
} // end Card class
|
||||
|
||||
@@ -73,7 +73,7 @@ public class CardFactory {
|
||||
*/
|
||||
public final static Card copyCard(final Card in, boolean assignNewId) {
|
||||
Card out;
|
||||
if (!(in.isToken() || in.isCopiedToken())) {
|
||||
if (!(in.isToken() || in.getCopiedPermanent() != null)) {
|
||||
out = assignNewId ? getCard(in.getPaperCard(), in.getOwner())
|
||||
: getCard(in.getPaperCard(), in.getOwner(), in.getUniqueNumber());
|
||||
} else { // token
|
||||
|
||||
Reference in New Issue
Block a user