diff --git a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java index c51dec4e3a..c5203e307f 100644 --- a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java +++ b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java @@ -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); diff --git a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java index a83c8fbd7c..229874c009 100644 --- a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java +++ b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java @@ -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"), diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java index 9db4c7574b..55c1abcb2b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java @@ -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); } diff --git a/Mage/src/main/java/mage/util/functions/AbilityApplier.java b/Mage/src/main/java/mage/util/functions/AbilityApplier.java index 16d36d0d29..b5e30816b6 100644 --- a/Mage/src/main/java/mage/util/functions/AbilityApplier.java +++ b/Mage/src/main/java/mage/util/functions/AbilityApplier.java @@ -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; } diff --git a/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java b/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java index 95bc8eb39f..d97b47f2e4 100644 --- a/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java +++ b/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java @@ -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); } diff --git a/Mage/src/main/java/mage/util/functions/CardTypeApplier.java b/Mage/src/main/java/mage/util/functions/CardTypeApplier.java index a1fa21435a..73be752dd6 100644 --- a/Mage/src/main/java/mage/util/functions/CardTypeApplier.java +++ b/Mage/src/main/java/mage/util/functions/CardTypeApplier.java @@ -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; } } diff --git a/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java b/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java index f41263fc8c..c838a8f756 100644 --- a/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java +++ b/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java @@ -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; }