mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- Fixed spells cast by AF Play effects (like Isochron Scepter) not triggering cast spell triggers (like storm).
This commit is contained in:
@@ -22,6 +22,7 @@ import forge.game.player.Player;
|
||||
import forge.game.spellability.Spell;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.spellability.SpellAbilityRestriction;
|
||||
import forge.game.zone.Zone;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.item.PaperCard;
|
||||
import forge.util.Aggregates;
|
||||
@@ -154,10 +155,14 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
}
|
||||
Card original = tgtCard;
|
||||
if (sa.hasParam("CopyCard")) {
|
||||
Zone zone = tgtCard.getZone();
|
||||
tgtCard = Card.fromPaperCard(tgtCard.getPaperCard(), sa.getActivatingPlayer());
|
||||
|
||||
tgtCard.setToken(true);
|
||||
tgtCard.setCopiedSpell(true);
|
||||
tgtCard.setZone(zone);
|
||||
if (zone != null) {
|
||||
zone.add(tgtCard);
|
||||
}
|
||||
|
||||
if (useEncoded) {
|
||||
tgtCard.setSVar("IsEncoded", "Number$1");
|
||||
@@ -200,9 +205,9 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
if (sa.hasParam("CopyOnce")) {
|
||||
tgtCards.remove(original);
|
||||
}
|
||||
SpellAbility tgtSA = null;
|
||||
|
||||
// only one mode can be used
|
||||
tgtSA = sa.getActivatingPlayer().getController().getAbilityToPlay(sas);
|
||||
SpellAbility tgtSA = sa.getActivatingPlayer().getController().getAbilityToPlay(sas);
|
||||
boolean noManaCost = sa.hasParam("WithoutManaCost");
|
||||
if (noManaCost) {
|
||||
tgtSA = tgtSA.copyWithNoManaCost();
|
||||
|
||||
@@ -66,7 +66,9 @@ public class HumanPlaySpellAbility {
|
||||
final Card c = this.ability.getSourceCard();
|
||||
if (this.ability instanceof Spell && !c.isCopiedSpell()) {
|
||||
fromZone = game.getZoneOf(c);
|
||||
zonePosition = fromZone.getCards().indexOf(c);
|
||||
if (fromZone != null) {
|
||||
zonePosition = fromZone.getCards().indexOf(c);
|
||||
}
|
||||
this.ability.setSourceCard(game.getAction().moveToStack(c));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user