- One more attempt at patching up Aftermath split cards with dual Sorcery/Instant or Instant/Sorcery type.

This commit is contained in:
Agetian
2017-04-30 15:09:55 +00:00
parent c3d34b407f
commit 52c75bf0d9

View File

@@ -80,6 +80,16 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
return false; return false;
} }
boolean isInstant = card.isInstant();
// special case for Aftermath split cards
if (card.isSplitCard() && card.hasKeyword("Aftermath")) {
if (card.getZone().is(ZoneType.Graveyard)) {
isInstant = card.getState(CardStateName.RightSplit).getType().isInstant();
} else {
isInstant = card.getState(CardStateName.LeftSplit).getType().isInstant();
}
}
boolean flash = card.hasKeyword("Flash"); boolean flash = card.hasKeyword("Flash");
if (this.hasParam("Bestow") && !card.isBestowed() && !card.isInZone(ZoneType.Battlefield)) { if (this.hasParam("Bestow") && !card.isBestowed() && !card.isInZone(ZoneType.Battlefield)) {
@@ -96,7 +106,7 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
game.getAction().checkStaticAbilities(false, Sets.newHashSet(card)); game.getAction().checkStaticAbilities(false, Sets.newHashSet(card));
} }
if (!(card.isInstant() || activator.canCastSorcery() || flash if (!(isInstant || activator.canCastSorcery() || flash
|| this.getRestrictions().isInstantSpeed() || this.getRestrictions().isInstantSpeed()
|| activator.hasKeyword("You may cast nonland cards as though they had flash.") || activator.hasKeyword("You may cast nonland cards as though they had flash.")
|| card.hasStartOfKeyword("You may cast CARDNAME as though it had flash.") || card.hasStartOfKeyword("You may cast CARDNAME as though it had flash.")