Player player = game.getPlayer(source.getControllerId());
if (player != null) {
Permanent auraPermanent = game.getPermanent(source.getSourceId());
if (auraPermanent != null && auraPermanent.getSubtype().contains("Aura") && auraPermanent.getOwnerId().equals(source.getControllerId())) {
Permanent enchantedPermanent = game.getPermanent(auraPermanent.getAttachedTo());
filter.add(new AuraCardCanAttachToPermanentId(enchantedPermanent.getId()));
TargetCardInHand target = new TargetCardInHand(0, 1, filter);
if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
Card auraInHand = game.getCard(target.getFirstTarget());
if (auraInHand != null) {
player.putOntoBattlefieldWithInfo(auraInHand, game, Zone.HAND, source.getSourceId());