mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +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)) {
|
} else if (zoneTo.is(ZoneType.Stack)) {
|
||||||
c.setCastFrom(zoneFrom.getZoneType());
|
c.setCastFrom(zoneFrom.getZoneType());
|
||||||
if (cause != null && cause.isSpell() && c.equals(cause.getHostCard()) && !c.isCopiedSpell()) {
|
if (cause != null && cause.isSpell() && c.equals(cause.getHostCard()) && !c.isCopiedSpell()) {
|
||||||
cause.setLastStateBattlefield(game.getLastStateBattlefield());
|
|
||||||
cause.setLastStateGraveyard(game.getLastStateGraveyard());
|
|
||||||
|
|
||||||
c.setCastSA(cause);
|
c.setCastSA(cause);
|
||||||
} else {
|
} else {
|
||||||
c.setCastSA(null);
|
c.setCastSA(null);
|
||||||
|
|||||||
@@ -72,11 +72,14 @@ public class CloneEffect extends SpellAbilityEffect {
|
|||||||
// choices need to be filtered by LastState Battlefield or Graveyard
|
// choices need to be filtered by LastState Battlefield or Graveyard
|
||||||
// if a Clone enters the field as other cards it could clone,
|
// if a Clone enters the field as other cards it could clone,
|
||||||
// the clone should not be able to clone them
|
// the clone should not be able to clone them
|
||||||
|
// but do that only for Replacement Effects
|
||||||
|
if (sa.getRootAbility().isReplacementAbility()) {
|
||||||
if (choiceZone.equals(ZoneType.Battlefield)) {
|
if (choiceZone.equals(ZoneType.Battlefield)) {
|
||||||
choices.retainAll(sa.getLastStateBattlefield());
|
choices.retainAll(sa.getLastStateBattlefield());
|
||||||
} else if (choiceZone.equals(ZoneType.Graveyard)) {
|
} else if (choiceZone.equals(ZoneType.Graveyard)) {
|
||||||
choices.retainAll(sa.getLastStateGraveyard());
|
choices.retainAll(sa.getLastStateGraveyard());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, host);
|
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));
|
ability.setHostCard(game.getAction().moveToStack(source, ability));
|
||||||
}
|
}
|
||||||
if (ability.equals(source.getCastSA())) {
|
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