mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
- Fixed Bug #3541. Nomad Mythmaker.
This commit is contained in:
parent
89b7d4e0e6
commit
d58a438ba9
1 changed files with 5 additions and 6 deletions
|
|
@ -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));
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue