Merge branch 'Hanmac-master-patch-98814' into 'master'

Spell:checkOtherRestrictions check CantBeCast for changed Cardface

Closes #1198

See merge request core-developers/forge!2333
This commit is contained in:
Michael Kamensky
2019-12-18 11:57:26 +00:00
2 changed files with 3 additions and 4 deletions

View File

@@ -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);
}
}

View File

@@ -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