From 6fd86cf7c3bed07ec8a894dd0f2a6a34d341190a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 15 Jan 2016 23:33:54 +0100 Subject: [PATCH] * Urborg, Tomb of Yawgmoth - Fixed tooltip text. --- .../planarchaos/UrborgTombOfYawgmoth.java | 19 ++++++++++--------- .../continuous/GainAbilityAllEffect.java | 3 ++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Mage.Sets/src/mage/sets/planarchaos/UrborgTombOfYawgmoth.java b/Mage.Sets/src/mage/sets/planarchaos/UrborgTombOfYawgmoth.java index 5af6584bb8c..a8b09bd09f8 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/UrborgTombOfYawgmoth.java +++ b/Mage.Sets/src/mage/sets/planarchaos/UrborgTombOfYawgmoth.java @@ -52,9 +52,11 @@ public class UrborgTombOfYawgmoth extends CardImpl { this.supertype.add("Legendary"); // Each land is a Swamp in addition to its other land types. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new BlackManaAbility(), Duration.WhileOnBattlefield, new FilterLandPermanent(),""))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AddCardSubtypeAllEffect())); - + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new BlackManaAbility(), Duration.WhileOnBattlefield, new FilterLandPermanent(), + "Each land is a Swamp in addition to its other land types")); + ability.addEffect(new AddCardSubtypeAllEffect()); + this.addAbility(ability); + } public UrborgTombOfYawgmoth(final UrborgTombOfYawgmoth card) { @@ -67,14 +69,14 @@ public class UrborgTombOfYawgmoth extends CardImpl { } } - class AddCardSubtypeAllEffect extends ContinuousEffectImpl { private static final FilterLandPermanent filter = new FilterLandPermanent(); private static final String addedSubtype = "Swamp"; + public AddCardSubtypeAllEffect() { super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); - staticText = "Each land is a Swamp in addition to its other land types"; + staticText = ""; } public AddCardSubtypeAllEffect(final AddCardSubtypeAllEffect effect) { @@ -83,8 +85,8 @@ class AddCardSubtypeAllEffect extends ContinuousEffectImpl { @Override public boolean apply(Game game, Ability source) { - for (Permanent perm: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - if(perm != null && !perm.getSubtype().contains(addedSubtype)){ + for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + if (perm != null && !perm.getSubtype().contains(addedSubtype)) { perm.getSubtype().add(addedSubtype); } } @@ -96,5 +98,4 @@ class AddCardSubtypeAllEffect extends ContinuousEffectImpl { return new AddCardSubtypeAllEffect(this); } - -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java index ca4a45d42d3..c396066e68d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityAllEffect.java @@ -141,8 +141,9 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl { return true; } + @Override public String getText(Mode mode) { - if(staticText != null && !staticText.isEmpty()) { + if (staticText != null && !staticText.isEmpty()) { return staticText; }