}
@Override
public boolean apply(Game game, Ability source) {
FilterPermanent filterEnchantments = new FilterPermanent();
filterEnchantments.add(new CardTypePredicate(CardType.ENCHANTMENT));
for (Permanent permanent : game.getBattlefield().getActivePermanents(filterEnchantments, source.getControllerId(), source.getSourceId(), game)) {
Player controller = game.getPlayer(permanent.getControllerId());
if (controller != null) {
controller.damage(2, permanent.getId(), game, false, true);
game.informPlayers("2 damage assigned to " + controller.getName() + " from " + permanent.getName());
}
}
filterEnchantments.add(new SubtypePredicate("Aura"));
for (Permanent auraEnchantment : game.getBattlefield().getActivePermanents(filterEnchantments, source.getControllerId(), source.getSourceId(), game)) {
if (auraEnchantment.getAttachedTo() != null) {
Permanent attachedToCreature = game.getPermanent(auraEnchantment.getAttachedTo());
if (attachedToCreature != null && attachedToCreature.getCardType().contains(CardType.CREATURE)) {
attachedToCreature.damage(2, auraEnchantment.getId(), game, false, true);