- Fixed Bug #3541. Nomad Mythmaker.

This commit is contained in:
Jeff 2017-06-28 16:33:26 -05:00
parent 89b7d4e0e6
commit d58a438ba9

View file

@ -57,7 +57,7 @@ import mage.target.common.TargetControlledPermanent;
*/ */
public class NomadMythmaker extends CardImpl { public class NomadMythmaker extends CardImpl {
private static final FilterCard FILTER = new FilterCard("Aura card"); private static final FilterCard FILTER = new FilterCard("Aura card from a graveyard");
static { static {
FILTER.add(new CardTypePredicate(CardType.ENCHANTMENT)); FILTER.add(new CardTypePredicate(CardType.ENCHANTMENT));
@ -65,7 +65,7 @@ public class NomadMythmaker extends CardImpl {
} }
public NomadMythmaker(UUID ownerId, CardSetInfo setInfo) { public NomadMythmaker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add("Human"); this.subtype.add("Human");
this.subtype.add("Nomad"); this.subtype.add("Nomad");
this.subtype.add("Cleric"); this.subtype.add("Cleric");
@ -114,16 +114,15 @@ class NomadMythmakerEffect extends OneShotEffect {
|| aura == null) { || aura == null) {
return false; return false;
} }
FilterControlledCreaturePermanent FILTER = new FilterControlledCreaturePermanent("Aura card in a graveyard"); FilterControlledCreaturePermanent FILTER = new FilterControlledCreaturePermanent("Choose a creature you control");
TargetControlledPermanent target = new TargetControlledPermanent(FILTER); TargetControlledPermanent target = new TargetControlledPermanent(FILTER);
target.setNotTarget(true); target.setNotTarget(true);
if (target.canChoose(source.getControllerId(), game) if (controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
&& controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget()); Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null if (permanent != null
&& !permanent.cantBeAttachedBy(aura, game)) { && !permanent.cantBeAttachedBy(aura, game)) {
game.getState().setValue("attachTo:" + aura.getId(), permanent); game.getState().setValue("attachTo:" + aura.getId(), permanent);
controller.moveCards(aura, Zone.BATTLEFIELD, source, game); aura.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), controller.getId());
return permanent.addAttachment(aura.getId(), game); return permanent.addAttachment(aura.getId(), game);
} }
} }