mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
GameActionUtil: fix getFirstSpellAbility using castSA
This commit is contained in:
@@ -242,6 +242,7 @@ public final class GameActionUtil {
|
|||||||
}
|
}
|
||||||
stackCopy.setLastKnownZone(game.getStackZone());
|
stackCopy.setLastKnownZone(game.getStackZone());
|
||||||
stackCopy.setCastFrom(oldZone);
|
stackCopy.setCastFrom(oldZone);
|
||||||
|
stackCopy.setCastSA(sa);
|
||||||
lkicheck = true;
|
lkicheck = true;
|
||||||
|
|
||||||
stackCopy.clearStaticChangedCardKeywords(false);
|
stackCopy.clearStaticChangedCardKeywords(false);
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ public class PermanentCreatureEffect extends PermanentEffect {
|
|||||||
public String getStackDescription(final SpellAbility sa) {
|
public String getStackDescription(final SpellAbility sa) {
|
||||||
final CardState source = sa.getCardState();
|
final CardState source = sa.getCardState();
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
sb.append(CardTranslation.getTranslatedName(source.getName())).append(" - ").append(Localizer.getInstance().getMessage("lblCreature")).append(" ").append(source.getBasePowerString());
|
sb.append(CardTranslation.getTranslatedName(source.getName())).append(" - ").append(Localizer.getInstance().getMessage("lblCreature")).append(" ");
|
||||||
sb.append(" / ").append(source.getBaseToughnessString());
|
sb.append(sa.getParamOrDefault("SetPower", source.getBasePowerString()));
|
||||||
|
sb.append(" / ").append(sa.getParamOrDefault("SetToughness", source.getBaseToughnessString()));
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -468,6 +468,9 @@ public class CardState extends GameObject implements IHasSVars, ITranslatable {
|
|||||||
return Iterables.getFirst(getIntrinsicSpellAbilities(), null);
|
return Iterables.getFirst(getIntrinsicSpellAbilities(), null);
|
||||||
}
|
}
|
||||||
public final SpellAbility getFirstSpellAbility() {
|
public final SpellAbility getFirstSpellAbility() {
|
||||||
|
if (this.card.getCastSA() != null) {
|
||||||
|
return this.card.getCastSA();
|
||||||
|
}
|
||||||
return Iterables.getFirst(getNonManaAbilities(), null);
|
return Iterables.getFirst(getNonManaAbilities(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user