From f33702c6a9e212f09f38a6f8f9536611a978e0a0 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 30 Nov 2014 23:47:43 +0100 Subject: [PATCH] * Song of the Dryads - Fixed that the enchanted permanent loses all other abilities and card types. --- .../sets/commander2014/SongOfTheDryads.java | 1 - .../BecomesBasicLandEnchantedEffect.java | 35 +++++++++---------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Mage.Sets/src/mage/sets/commander2014/SongOfTheDryads.java b/Mage.Sets/src/mage/sets/commander2014/SongOfTheDryads.java index 01c8076504..4ad012c7c6 100644 --- a/Mage.Sets/src/mage/sets/commander2014/SongOfTheDryads.java +++ b/Mage.Sets/src/mage/sets/commander2014/SongOfTheDryads.java @@ -39,7 +39,6 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; /** * diff --git a/Mage/src/mage/abilities/effects/common/continious/BecomesBasicLandEnchantedEffect.java b/Mage/src/mage/abilities/effects/common/continious/BecomesBasicLandEnchantedEffect.java index 9d726f1807..253878c15d 100644 --- a/Mage/src/mage/abilities/effects/common/continious/BecomesBasicLandEnchantedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/BecomesBasicLandEnchantedEffect.java @@ -81,44 +81,43 @@ public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl { public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent enchantment = game.getPermanent(source.getSourceId()); if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent land = game.getPermanent(enchantment.getAttachedTo()); - if (land != null) { + Permanent permanent = game.getPermanent(enchantment.getAttachedTo()); + if (permanent != null) { switch (layer) { case ColorChangingEffects_5: - land.getColor().setWhite(false); - land.getColor().setGreen(false); - land.getColor().setBlack(false); - land.getColor().setBlue(false); - land.getColor().setRed(false); + permanent.getColor().setWhite(false); + permanent.getColor().setGreen(false); + permanent.getColor().setBlack(false); + permanent.getColor().setBlue(false); + permanent.getColor().setRed(false); break; case AbilityAddingRemovingEffects_6: - land.removeAllAbilities(source.getSourceId(), game); + permanent.removeAllAbilities(source.getSourceId(), game); for (String landType : landTypes) { switch (landType) { case "Swamp": - land.addAbility(new BlackManaAbility(), source.getSourceId(), game); + permanent.addAbility(new BlackManaAbility(), source.getSourceId(), game); break; case "Mountain": - land.addAbility(new RedManaAbility(), source.getSourceId(), game); + permanent.addAbility(new RedManaAbility(), source.getSourceId(), game); break; case "Forest": - land.addAbility(new GreenManaAbility(), source.getSourceId(), game); + permanent.addAbility(new GreenManaAbility(), source.getSourceId(), game); break; case "Island": - land.addAbility(new BlueManaAbility(), source.getSourceId(), game); + permanent.addAbility(new BlueManaAbility(), source.getSourceId(), game); break; case "Plains": - land.addAbility(new WhiteManaAbility(), source.getSourceId(), game); + permanent.addAbility(new WhiteManaAbility(), source.getSourceId(), game); break; } } break; case TypeChangingEffects_4: - if (!land.getCardType().contains(CardType.LAND)) { - land.getCardType().add(CardType.LAND); - } - land.getSubtype().clear(); - land.getSubtype().addAll(landTypes); + permanent.getCardType().clear(); + permanent.getCardType().add(CardType.LAND); + permanent.getSubtype().clear(); + permanent.getSubtype().addAll(landTypes); break; } return true;