mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
SpellAbility: set LastStateBattlefield only into CastSA lki copy
This commit is contained in:
@@ -533,9 +533,6 @@ public class GameAction {
|
||||
} else if (zoneTo.is(ZoneType.Stack)) {
|
||||
c.setCastFrom(zoneFrom.getZoneType());
|
||||
if (cause != null && cause.isSpell() && c.equals(cause.getHostCard()) && !c.isCopiedSpell()) {
|
||||
cause.setLastStateBattlefield(game.getLastStateBattlefield());
|
||||
cause.setLastStateGraveyard(game.getLastStateGraveyard());
|
||||
|
||||
c.setCastSA(cause);
|
||||
} else {
|
||||
c.setCastSA(null);
|
||||
|
||||
@@ -72,10 +72,13 @@ public class CloneEffect extends SpellAbilityEffect {
|
||||
// choices need to be filtered by LastState Battlefield or Graveyard
|
||||
// if a Clone enters the field as other cards it could clone,
|
||||
// the clone should not be able to clone them
|
||||
if (choiceZone.equals(ZoneType.Battlefield)) {
|
||||
choices.retainAll(sa.getLastStateBattlefield());
|
||||
} else if (choiceZone.equals(ZoneType.Graveyard)) {
|
||||
choices.retainAll(sa.getLastStateGraveyard());
|
||||
// but do that only for Replacement Effects
|
||||
if (sa.getRootAbility().isReplacementAbility()) {
|
||||
if (choiceZone.equals(ZoneType.Battlefield)) {
|
||||
choices.retainAll(sa.getLastStateBattlefield());
|
||||
} else if (choiceZone.equals(ZoneType.Graveyard)) {
|
||||
choices.retainAll(sa.getLastStateGraveyard());
|
||||
}
|
||||
}
|
||||
|
||||
choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, host);
|
||||
|
||||
@@ -140,7 +140,12 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
ability.setHostCard(game.getAction().moveToStack(source, ability));
|
||||
}
|
||||
if (ability.equals(source.getCastSA())) {
|
||||
source.setCastSA(ability.copy(source, true));
|
||||
SpellAbility cause = ability.copy(source, true);
|
||||
|
||||
cause.setLastStateBattlefield(game.getLastStateBattlefield());
|
||||
cause.setLastStateGraveyard(game.getLastStateGraveyard());
|
||||
|
||||
source.setCastSA(cause);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user