mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
Fixed a recently added problem with MageSingleton restriction effects.
This commit is contained in:
parent
a70d91e4b4
commit
375d3ebf64
1 changed files with 2 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ import mage.constants.Layer;
|
|||
import mage.constants.SubLayer;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.MageSingleton;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.keyword.SpliceOntoArcaneAbility;
|
||||
|
|
@ -255,7 +256,7 @@ public class ContinuousEffects implements Serializable {
|
|||
HashSet<Ability> abilities = restrictionEffects.getAbility(effect.getId());
|
||||
HashSet<Ability> applicableAbilities = new HashSet<Ability>();
|
||||
for (Ability ability : abilities) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false)) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, ability instanceof MageSingleton ? permanent : null, false)) {
|
||||
if (effect.applies(permanent, ability, game)) {
|
||||
applicableAbilities.add(ability);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue