This commit is contained in:
tool4EvEr
2021-05-24 08:13:09 +02:00
parent 6bce621da4
commit ef4ab9570a

View File

@@ -51,12 +51,10 @@ import forge.util.collect.FCollection;
* @version $Id$
*/
public class SpellAbilityRestriction extends SpellAbilityVariables {
// A class for handling SpellAbility Restrictions. These restrictions
// include:
// A class for handling SpellAbility Restrictions. These restrictions include:
// Zone, Phase, OwnTurn, Speed (instant/sorcery), Amount per Turn, Player,
// Threshold, Metalcraft, LevelRange, etc
// Each value will have a default, that can be overridden (mostly by
// AbilityFactory)
// Each value will have a default, that can be overridden (mostly by AbilityFactory)
// The canPlay function will use these values to determine if the current
// game state is ok with these restrictions
@@ -265,13 +263,13 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
}
if (params.containsKey("Affected")) {
if (!cp.isValid(params.get("Affected").split(","), activator, o.getHost(), sa)) {
if (!cp.isValid(params.get("Affected").split(","), activator, o.getHost(), o.getAbility())) {
return false;
}
}
if (params.containsKey("ValidSA")) {
if (!sa.isValid(params.get("ValidSA").split(","), activator, o.getHost(), sa)) {
if (!sa.isValid(params.get("ValidSA").split(","), activator, o.getHost(), o.getAbility())) {
return false;
}
}