Some fixes to M15 cards or by M15 used classes.

This commit is contained in:
LevelX2 2014-07-06 16:00:32 +02:00
parent 9ad45a6ab9
commit 18e78b8294
23 changed files with 105 additions and 50 deletions

View file

@ -765,6 +765,16 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
return false;
}
@Override
public boolean cantBeEnchantedBy(MageObject source, Game game) {
for (ProtectionAbility ability : abilities.getProtectionAbilities()) {
if (!(source.getSubtype().contains("Aura") && !ability.removesAuras()) && !ability.canTarget(source, game)) {
return true;
}
}
return false;
}
protected boolean canDamage(MageObject source, Game game) {
//noxx: having protection doesn't prevents from dealing damage
// instead it adds damage prevention