From e83ca77b1365366cb378ff661929c28ba4106f14 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 22 May 2014 16:26:21 +0200 Subject: [PATCH] * Tezzeret, Agent of Bolas - Fixed that the second ability did overwrite all already existing abilities of the target artifact. --- .../TezzeretAgentOfBolas.java | 26 +++++++------------ .../SetCardSubtypeAttachedEffect.java | 9 ++++--- .../SetPowerToughnessTargetEffect.java | 3 +++ 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java index 2968a97861f..5cada1bf396 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java @@ -32,15 +32,16 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.MageInt; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; -import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect; +import mage.abilities.effects.common.continious.AddCardTypeTargetEffect; +import mage.abilities.effects.common.continious.SetPowerToughnessTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.counters.CounterType; @@ -48,7 +49,6 @@ import mage.filter.FilterCard; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; -import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.TargetPlayer; import mage.target.common.TargetArtifactPermanent; @@ -76,8 +76,13 @@ public class TezzeretAgentOfBolas extends CardImpl { this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(5, 1, filter, true), 1)); // -1: Target artifact becomes a 5/5 artifact creature. - LoyaltyAbility ability1 = new LoyaltyAbility(new BecomesCreatureTargetEffect(new ArtifactCreatureToken(), "", Duration.EndOfGame), -1); - ability1.addTarget(new TargetArtifactPermanent()); + Effect effect = new AddCardTypeTargetEffect(CardType.CREATURE, Duration.EndOfGame); + effect.setText(""); + LoyaltyAbility ability1 = new LoyaltyAbility(effect, -1); + effect = new SetPowerToughnessTargetEffect(5,5, Duration.EndOfGame); + effect.setText("Target artifact becomes a 5/5 artifact creature"); + ability1.addEffect(effect); + ability1.addTarget(new TargetArtifactPermanent(true)); this.addAbility(ability1); // -4: Target player loses X life and you gain X life, where X is twice the number of artifacts you control. @@ -98,17 +103,6 @@ public class TezzeretAgentOfBolas extends CardImpl { } -class ArtifactCreatureToken extends Token { - - public ArtifactCreatureToken() { - super("", "5/5 artifact creature"); - this.cardType.add(CardType.CREATURE); - - this.power = new MageInt(5); - this.toughness = new MageInt(5); - } -} - class TezzeretAgentOfBolasEffect2 extends OneShotEffect { final static FilterControlledPermanent filter = new FilterControlledPermanent("artifacts"); diff --git a/Mage/src/mage/abilities/effects/common/continious/SetCardSubtypeAttachedEffect.java b/Mage/src/mage/abilities/effects/common/continious/SetCardSubtypeAttachedEffect.java index 34b4b756ee7..4bd349ba9ef 100644 --- a/Mage/src/mage/abilities/effects/common/continious/SetCardSubtypeAttachedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/SetCardSubtypeAttachedEffect.java @@ -41,8 +41,8 @@ import mage.game.permanent.Permanent; */ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { - private List setSubtypes = new ArrayList(); - private AttachmentType attachmentType; + private List setSubtypes = new ArrayList<>(); + private final AttachmentType attachmentType; public SetCardSubtypeAttachedEffect(String setSubtype, Duration duration, AttachmentType attachmentType) { super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); @@ -84,10 +84,11 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl