mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Clean up
This commit is contained in:
@@ -51,12 +51,10 @@ import forge.util.collect.FCollection;
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class SpellAbilityRestriction extends SpellAbilityVariables {
|
public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||||
// A class for handling SpellAbility Restrictions. These restrictions
|
// A class for handling SpellAbility Restrictions. These restrictions include:
|
||||||
// include:
|
|
||||||
// Zone, Phase, OwnTurn, Speed (instant/sorcery), Amount per Turn, Player,
|
// Zone, Phase, OwnTurn, Speed (instant/sorcery), Amount per Turn, Player,
|
||||||
// Threshold, Metalcraft, LevelRange, etc
|
// Threshold, Metalcraft, LevelRange, etc
|
||||||
// Each value will have a default, that can be overridden (mostly by
|
// Each value will have a default, that can be overridden (mostly by AbilityFactory)
|
||||||
// AbilityFactory)
|
|
||||||
// The canPlay function will use these values to determine if the current
|
// The canPlay function will use these values to determine if the current
|
||||||
// game state is ok with these restrictions
|
// game state is ok with these restrictions
|
||||||
|
|
||||||
@@ -265,13 +263,13 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params.containsKey("Affected")) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.containsKey("ValidSA")) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user