AddCardSubtypeAllEffect uses SubType enum

This commit is contained in:
igoudt 2017-08-08 17:11:21 +02:00
parent 19a8f3c4c1
commit 2ca7927580
7 changed files with 13 additions and 27 deletions

View file

@ -27,7 +27,6 @@
*/
package mage.game.permanent;
import java.util.*;
import mage.MageObject;
import mage.MageObjectReference;
import mage.ObjectColor;
@ -56,6 +55,8 @@ import mage.players.Player;
import mage.util.GameLog;
import mage.util.ThreadLocalStringBuilder;
import java.util.*;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -925,7 +926,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
@Override
public boolean cantBeAttachedBy(MageObject source, Game game) {
for (ProtectionAbility ability : this.getAbilities(game).getProtectionAbilities()) {
if (!(source.getSubtype(game).contains("Aura")
if (!(source.getSubtype(game).contains(SubType.AURA)
&& !ability.removesAuras())
&& !source.getId().equals(ability.getAuraIdNotToBeRemoved())
&& !ability.canTarget(source, game)) {