Fix missing intrinsic Cast trigger from copied host

This commit is contained in:
Bug Hunter
2021-06-01 04:25:27 +00:00
committed by Michael Kamensky
parent cb9302b2fe
commit edce6ed9e8
5 changed files with 8 additions and 9 deletions

View File

@@ -1215,8 +1215,7 @@ public abstract class GameState {
boolean tapped = c.isTapped();
boolean sickness = c.hasSickness();
Map<CounterType, Integer> counters = c.getCounters();
// Note: Not clearCounters() since we want to keep the counters
// var as-is.
// Note: Not clearCounters() since we want to keep the counters var as-is.
c.setCounters(Maps.newHashMap());
if (c.isAura()) {
// dummy "enchanting" to indicate that the card will be force-attached elsewhere

View File

@@ -146,8 +146,8 @@ public class GameAction {
boolean fromBattlefield = zoneFrom != null && zoneFrom.is(ZoneType.Battlefield);
boolean wasFacedown = c.isFaceDown();
//Rule 110.5g: A token that has left the battlefield can't move to another zone
if (c.isToken() && zoneFrom != null && !fromBattlefield && !zoneFrom.is(ZoneType.Stack)) {
// Rule 111.8: A token that has left the battlefield can't move to another zone
if (!c.isSpell() && c.isToken() && zoneFrom != null && !fromBattlefield && !zoneFrom.is(ZoneType.Stack)) {
return c;
}
@@ -243,7 +243,7 @@ public class GameAction {
copied = CardFactory.copyCard(c, false);
if (zoneTo.is(ZoneType.Stack)) {
// when moving to stack, copy changed card infomation
// when moving to stack, copy changed card information
copied.setChangedCardColors(c.getChangedCardColors());
copied.setChangedCardKeywords(c.getChangedCardKeywords());
copied.setChangedCardTypes(c.getChangedCardTypesMap());
@@ -441,7 +441,7 @@ public class GameAction {
}
if (mergedCards != null) {
// Move components of merged permanet here
// Move components of merged permanent here
// Also handle 721.3e and 903.9a
boolean wasToken = c.isToken();
if (commanderEffect != null) {

View File

@@ -87,7 +87,6 @@ public class TriggerSpellAbilityCastOrCopy extends Trigger {
}
}
if (!matchesValidParam("ValidPlayer", runParams.get(AbilityKey.Player))) {
return false;
}

View File

@@ -299,6 +299,7 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
runParams.put(AbilityKey.CastSACMC, si.getSpellAbility(true).getHostCard().getCMC());
runParams.put(AbilityKey.CurrentStormCount, thisTurnCast.size());
runParams.put(AbilityKey.CurrentCastSpells, Lists.newArrayList(thisTurnCast));
if (!sp.isCopied()) {
// Run SpellAbilityCast triggers
game.getTriggerHandler().runTrigger(TriggerType.SpellAbilityCast, runParams, true);

View File

@@ -121,9 +121,9 @@ public class Zone implements java.io.Serializable, Iterable<Card> {
c.setTapped(false);
}
// Do not add Tokens to other zones than the battlefield.
// Do not add Tokens to other zones than the battlefield. (unless it's a copy of a card 706.12)
// But Effects/Emblems count as Tokens too, so allow Command too.
if (zoneType == ZoneType.Battlefield || !c.isToken()) {
if ((zoneType == ZoneType.Battlefield || !c.isToken()) || (zoneType == ZoneType.Stack && c.getCopiedPermanent() != null)) {
c.setZone(this);
if (index == null) {