[AKH] Added Vizier of Many Faces.

This commit is contained in:
LevelX2 2017-04-16 13:28:36 +02:00
parent 20a1c02f4d
commit 664405caab
7 changed files with 24 additions and 17 deletions

View file

@ -109,7 +109,7 @@ class DimirDoppelgangerEffect extends OneShotEffect {
newBluePrint = new PermanentCard((Card) copyFromCard, source.getControllerId(), game);
newBluePrint.assignNewId();
ApplyToPermanent applier = new DimirDoppelgangerApplier();
applier.apply(game, newBluePrint, source);
applier.apply(game, newBluePrint, source, dimirDoppelganger.getId());
CopyEffect copyEffect = new CopyEffect(Duration.Custom, newBluePrint, dimirDoppelganger.getId());
copyEffect.newId();
copyEffect.setApplier(applier);
@ -126,7 +126,7 @@ class DimirDoppelgangerEffect extends OneShotEffect {
class DimirDoppelgangerApplier extends ApplyToPermanent {
@Override
public boolean apply(Game game, Permanent permanent, Ability source) {
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}"));
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
permanent.getAbilities().add(ability);
@ -134,7 +134,7 @@ class DimirDoppelgangerApplier extends ApplyToPermanent {
}
@Override
public boolean apply(Game game, MageObject mageObject, Ability source) {
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}"));
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
mageObject.getAbilities().add(ability);

View file

@ -109,7 +109,7 @@ class LazavDimirMastermindEffect extends OneShotEffect {
newBluePrint = new PermanentCard((Card) copyFromCard, source.getControllerId(), game);
newBluePrint.assignNewId();
ApplyToPermanent applier = new LazavDimirMastermindApplier();
applier.apply(game, newBluePrint, source);
applier.apply(game, newBluePrint, source, lazavDimirMastermind.getId());
CopyEffect copyEffect = new CopyEffect(Duration.Custom, newBluePrint, lazavDimirMastermind.getId());
copyEffect.newId();
copyEffect.setApplier(applier);
@ -126,7 +126,7 @@ class LazavDimirMastermindEffect extends OneShotEffect {
class LazavDimirMastermindApplier extends ApplyToPermanent {
@Override
public boolean apply(Game game, Permanent permanent, Ability source) {
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Ability ability = new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
new LazavDimirMastermindEffect(), true,
new FilterCreatureCard("a creature card"),
@ -139,7 +139,7 @@ class LazavDimirMastermindApplier extends ApplyToPermanent {
}
@Override
public boolean apply(Game game, MageObject mageObject, Ability source) {
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Ability ability = new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
new LazavDimirMastermindEffect(), true,
new FilterCreatureCard("a creature card"),

View file

@ -188,7 +188,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect {
EmptyToken token = new EmptyToken();
CardUtil.copyTo(token).from(copyFrom); // needed so that entersBattlefied triggered abilities see the attributes (e.g. Master Biomancer)
applier.apply(game, token);
applier.apply(game, token, source, targetId);
if (becomesArtifact) {
token.addCardType(CardType.ARTIFACT);
}

View file

@ -27,6 +27,7 @@
*/
package mage.util.functions;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.game.Game;
@ -45,13 +46,13 @@ public class AbilityApplier extends ApplyToPermanent {
}
@Override
public boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
permanent.addAbility(ability, game);
return true;
}
@Override
public boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
mageObject.getAbilities().add(ability);
return true;
}

View file

@ -5,7 +5,9 @@
*/
package mage.util.functions;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -22,7 +24,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
}
@Override
public boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
if (!permanent.getSubtype(game).contains(subtype)) {
permanent.getSubtype(game).add(subtype);
}
@ -30,7 +32,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
}
@Override
public boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
if (!mageObject.getSubtype(game).contains(subtype)) {
mageObject.getSubtype(game).add(subtype);
}

View file

@ -27,7 +27,9 @@
*/
package mage.util.functions;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.constants.CardType;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -45,13 +47,13 @@ public class CardTypeApplier extends ApplyToPermanent {
}
@Override
public boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
permanent.addCardType(cardType);
return true;
}
@Override
public boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
mageObject.addCardType(cardType);
return true;
}

View file

@ -1,6 +1,8 @@
package mage.util.functions;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -10,13 +12,13 @@ import mage.game.permanent.Permanent;
public class EmptyApplyToPermanent extends ApplyToPermanent {
@Override
public boolean apply(Game game, Permanent permanent) {
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
// do nothing
return true;
}
@Override
public boolean apply(Game game, MageObject mageObject) {
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
return true;
}