mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Artisan of Forms - Fixed that the copy effect did the copied creature not target.
This commit is contained in:
parent
1e3af770f0
commit
46e63861ec
2 changed files with 9 additions and 2 deletions
|
@ -35,6 +35,7 @@ import mage.abilities.keyword.HeroicAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
|
@ -56,7 +57,7 @@ public class ArtisanOfForms extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// <i>Heroic</i> - Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature and gain this ability.
|
||||
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
|
||||
Effect effect = new CopyPermanentEffect(new FilterCreaturePermanent(), new ArtisanOfFormsApplyToPermanent(), false);
|
||||
effect.setText("have {this} become a copy of target creature and gain this ability");
|
||||
this.addAbility(new HeroicAbility(effect, true));
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
private FilterPermanent filter;
|
||||
private ApplyToPermanent applier;
|
||||
private Permanent bluePrintPermanent;
|
||||
private boolean notTarget;
|
||||
|
||||
public CopyPermanentEffect() {
|
||||
this(new FilterCreaturePermanent());
|
||||
|
@ -63,9 +64,13 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
public CopyPermanentEffect(FilterPermanent filter, ApplyToPermanent applier) {
|
||||
this(filter, applier, true);
|
||||
}
|
||||
public CopyPermanentEffect(FilterPermanent filter, ApplyToPermanent applier, boolean notTarget) {
|
||||
super(Outcome.Copy);
|
||||
this.applier = applier;
|
||||
this.filter = filter;
|
||||
this.notTarget = notTarget;
|
||||
this.staticText = "You may have {this} enter the battlefield as a copy of any " + filter.getMessage() + " on the battlefield";
|
||||
}
|
||||
|
||||
|
@ -74,6 +79,7 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
this.filter = effect.filter.copy();
|
||||
this.applier = effect.applier;
|
||||
this.bluePrintPermanent = effect.bluePrintPermanent;
|
||||
this.notTarget = effect.notTarget;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,7 +88,7 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && sourcePermanent != null) {
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.setNotTarget(true);
|
||||
target.setNotTarget(notTarget);
|
||||
if (target.canChoose(source.getControllerId(), game)) {
|
||||
player.choose(Outcome.Copy, target, source.getSourceId(), game);
|
||||
Permanent copyFromPermanent = game.getPermanent(target.getFirstTarget());
|
||||
|
|
Loading…
Reference in a new issue