Add description parameter to DontUntapInControllersUntapStepEnchantedEffect.

This fixes a lot of tooltip texts that had "enchanted permanent" instead of "enchanted creature" in them.
This commit is contained in:
LoneFox 2015-09-11 09:24:40 +03:00
parent cb34084321
commit dfb70e07a3
5 changed files with 15 additions and 14 deletions

View file

@ -73,7 +73,7 @@ public class Encrust extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Enchanted permanent doesn't untap during its controller's untap step and its activated abilities can't be activated. // Enchanted permanent doesn't untap during its controller's untap step and its activated abilities can't be activated.
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect()); ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent"));
Effect effect = new CantActivateAbilitiesAttachedEffect(); Effect effect = new CantActivateAbilitiesAttachedEffect();
effect.setText("and its activated abilities can't be activated"); effect.setText("and its activated abilities can't be activated");
ability.addEffect(effect); ability.addEffect(effect);

View file

@ -76,7 +76,7 @@ public class NumbingDose extends CardImpl {
this.addAbility(new EnchantAbility(auraTarget.getTargetName())); this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// Enchanted permanent doesn't untap during its controller's untap step. // Enchanted permanent doesn't untap during its controller's untap step.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent")));
// At the beginning of the upkeep of enchanted permanent's controller, that player loses 1 life. // At the beginning of the upkeep of enchanted permanent's controller, that player loses 1 life.
this.addAbility(new NumbingDoseTriggeredAbility()); this.addAbility(new NumbingDoseTriggeredAbility());

View file

@ -32,7 +32,6 @@ import mage.abilities.Ability;
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility; import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
@ -66,9 +65,7 @@ public class SleepingPotion extends CardImpl {
// When Sleeping Potion enters the battlefield, tap enchanted creature. // When Sleeping Potion enters the battlefield, tap enchanted creature.
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())); this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()));
// Enchanted creature doesn't untap during its controller's untap step. // Enchanted creature doesn't untap during its controller's untap step.
Effect effect = new DontUntapInControllersUntapStepEnchantedEffect(); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect()));
effect.setText("Enchanted creature doesn't untap during its controller's untap step");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// When enchanted creature becomes the target of a spell or ability, sacrifice Sleeping Potion. // When enchanted creature becomes the target of a spell or ability, sacrifice Sleeping Potion.
this.addAbility(new BecomesTargetAttachedTriggeredAbility(new SacrificeSourceEffect())); this.addAbility(new BecomesTargetAttachedTriggeredAbility(new SacrificeSourceEffect()));
} }

View file

@ -66,7 +66,7 @@ public class ComaVeil extends CardImpl {
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
// Enchanted permanent doesn't untap during its controller's untap step. // Enchanted permanent doesn't untap during its controller's untap step.
EnchantAbility ability = new EnchantAbility(auraTarget.getTargetName()); EnchantAbility ability = new EnchantAbility(auraTarget.getTargetName());
ability.addEffect(new DontUntapInControllersUntapStepEnchantedEffect()); ability.addEffect(new DontUntapInControllersUntapStepEnchantedEffect("permanent"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -15,8 +15,12 @@ import mage.game.permanent.Permanent;
public class DontUntapInControllersUntapStepEnchantedEffect extends ContinuousRuleModifyingEffectImpl { public class DontUntapInControllersUntapStepEnchantedEffect extends ContinuousRuleModifyingEffectImpl {
public DontUntapInControllersUntapStepEnchantedEffect() { public DontUntapInControllersUntapStepEnchantedEffect() {
this("creature");
}
public DontUntapInControllersUntapStepEnchantedEffect(String description) {
super(Duration.WhileOnBattlefield, Outcome.Detriment, false, true); super(Duration.WhileOnBattlefield, Outcome.Detriment, false, true);
staticText = "Enchanted permanent doesn't untap during its controller's untap step"; staticText = "Enchanted " + description + " doesn't untap during its controller's untap step";
} }
public DontUntapInControllersUntapStepEnchantedEffect(final DontUntapInControllersUntapStepEnchantedEffect effect) { public DontUntapInControllersUntapStepEnchantedEffect(final DontUntapInControllersUntapStepEnchantedEffect effect) {