mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
[AKH] Added Vizier of Many Faces.
This commit is contained in:
parent
20a1c02f4d
commit
664405caab
7 changed files with 24 additions and 17 deletions
|
@ -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);
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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,14 +47,14 @@ public class CardTypeApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
permanent.addCardType(cardType);
|
||||
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
|
||||
permanent.addCardType(cardType);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
mageObject.addCardType(cardType);
|
||||
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
|
||||
mageObject.addCardType(cardType);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue