mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Added Copy Enchantment.
This commit is contained in:
parent
336a6546dc
commit
6776b03bae
1 changed files with 11 additions and 6 deletions
|
@ -48,12 +48,13 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
|
||||
private FilterPermanent filter;
|
||||
private ApplyToPermanent applier;
|
||||
private Permanent bluePrintPermanent;
|
||||
|
||||
public CopyPermanentEffect() {
|
||||
this(new FilterCreaturePermanent());
|
||||
}
|
||||
public CopyPermanentEffect() {
|
||||
this(new FilterCreaturePermanent());
|
||||
}
|
||||
|
||||
public CopyPermanentEffect(ApplyToPermanent applier) {
|
||||
public CopyPermanentEffect(ApplyToPermanent applier) {
|
||||
this(new FilterCreaturePermanent(), applier);
|
||||
}
|
||||
|
||||
|
@ -72,6 +73,7 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
super(effect);
|
||||
this.filter = effect.filter.copy();
|
||||
this.applier = effect.applier;
|
||||
this.bluePrintPermanent = effect.bluePrintPermanent;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,8 +86,7 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
player.choose(Outcome.Copy, target, source.getSourceId(), game);
|
||||
Permanent copyFromPermanent = game.getPermanent(target.getFirstTarget());
|
||||
if (copyFromPermanent != null) {
|
||||
game.copyPermanent(copyFromPermanent, sourcePermanent, source, applier);
|
||||
|
||||
bluePrintPermanent = game.copyPermanent(copyFromPermanent, sourcePermanent, source, applier);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +94,10 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
public Permanent getBluePrintPermanent() {
|
||||
return bluePrintPermanent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CopyPermanentEffect copy() {
|
||||
return new CopyPermanentEffect(this);
|
||||
|
|
Loading…
Reference in a new issue