From 40e0bc97824f124e2a93156b9d0057ef236fe587 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sat, 22 Apr 2017 12:20:40 +0000 Subject: [PATCH] - FIXME: A somewhat better hack to get the Aftermath cards to behave more or less as a correct card type from the graveyard (still requires a better, more universal solution; and notice that visually the card type is still broken - e.g. Destined // Lead is visualized as Instant in the graveyard, at least until an attempt is made at casting it, although it behaves as a Sorcery). --- forge-game/src/main/java/forge/game/GameAction.java | 9 +++++++++ .../main/java/forge/game/card/CardFactoryUtil.java | 11 +---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index 81b3f5d9392..b8113824f0f 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -177,6 +177,15 @@ public class GameAction { c.getController().setRevolt(true); } + // FIXME: A hack to get the Aftermath split cards to behave as correct type upon going to graveyard + if (c.isSplitCard() && c.hasKeyword("Aftermath")) { + if (zoneTo.is(ZoneType.Graveyard)) { + c.setType(CardType.parse(c.getState(CardStateName.RightSplit).getType().toString())); + } else if (!zoneTo.is(ZoneType.Stack)) { + c.setType(CardType.parse(c.getState(CardStateName.LeftSplit).getType().toString())); + } + } + // Don't copy Tokens, copy only cards leaving the battlefield // and returning to hand (to recreate their spell ability information) if (suppress || (!fromBattlefield && !toHand)) { diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index ef73f73aab5..5fb8b47372d 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -3464,16 +3464,7 @@ public class CardFactoryUtil { // only target RightSplit of it final SpellAbility origSA = card.getState(CardStateName.RightSplit).getFirstAbility(); origSA.getRestrictions().setZone(ZoneType.Graveyard); - - // FIXME: Without properly setting casting speed here, Sorcery RightSplit can be cast at Instant speed - // despite the fact that the card type is correctly set to Sorcery. - if (card.getState(CardStateName.RightSplit).getType().isSorcery()) { - origSA.getRestrictions().setSorcerySpeed(true); - origSA.getRestrictions().setInstantSpeed(false); - } else if (card.getState(CardStateName.RightSplit).getType().isInstant()) { - origSA.getRestrictions().setSorcerySpeed(false); - origSA.getRestrictions().setInstantSpeed(true); - } + card.getState(CardStateName.RightSplit).setType(CardType.parse("Sorcery")); // Add the Exile Self Part String dbStr = "DB$ ChangeZone | Origin$ Stack | Destination$ Exile";