}
}
int count = player.getHand().count(filterAuraCard, game);
while (player.isInGame() && count > 0 && player.chooseUse(Outcome.Benefit, "Attach an Aura from your hand?", game)) {
TargetCard targetAura = new TargetCard(Zone.PICK, filterAuraCard);
if (player.choose(Outcome.Benefit, player.getHand(), targetAura, game)) {
Card aura = game.getCard(targetAura.getFirstTarget());
if (aura != null) {
game.getState().setValue("attachTo:" + aura.getId(), permanent);
aura.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), player.getId());
permanent.addAttachment(aura.getId(), game);
}
}
count = player.getHand().count(filterAuraCard, game);
}
count = player.getGraveyard().count(filterAuraCard, game);
while (player.isInGame() && count > 0 && player.chooseUse(Outcome.Benefit, "Attach an Aura from your graveyard?", game)) {
TargetCard targetAura = new TargetCard(Zone.PICK, filterAuraCard);
if (player.choose(Outcome.Benefit, player.getGraveyard(), targetAura, game)) {
Card aura = game.getCard(targetAura.getFirstTarget());
if (aura != null) {
game.getState().setValue("attachTo:" + aura.getId(), permanent);
aura.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), player.getId());
permanent.addAttachment(aura.getId(), game);
}