From 823c278cd779f4f63e424d3f95248a8cbe42e4b7 Mon Sep 17 00:00:00 2001 From: Hans Mackowiak Date: Wed, 18 Dec 2019 11:57:26 +0000 Subject: [PATCH] Spell:checkOtherRestrictions check CantBeCast for changed Cardface --- .../src/main/java/forge/game/ability/AbilityUtils.java | 2 +- forge-game/src/main/java/forge/game/spellability/Spell.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index 97877f115ad..7a304c73418 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -1708,7 +1708,7 @@ public class AbilityUtils { if (res.checkTimingRestrictions(tgtCard, newSA) // still need to check the other restrictions like Aftermath && res.checkOtherRestrictions(tgtCard, newSA, controller) - && newSA.checkOtherRestrictions()) { + && newSA.checkOtherRestrictions(tgtCard)) { sas.add(newSA); } } diff --git a/forge-game/src/main/java/forge/game/spellability/Spell.java b/forge-game/src/main/java/forge/game/spellability/Spell.java index 51a83100632..ab91ef02963 100644 --- a/forge-game/src/main/java/forge/game/spellability/Spell.java +++ b/forge-game/src/main/java/forge/game/spellability/Spell.java @@ -184,11 +184,10 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable } } - return checkOtherRestrictions(); + return checkOtherRestrictions(card); } // canPlay() - public boolean checkOtherRestrictions() { - final Card source = this.getHostCard(); + public boolean checkOtherRestrictions(final Card source) { Player activator = getActivatingPlayer(); final Game game = activator.getGame(); // CantBeCast static abilities