mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
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:
parent
cb34084321
commit
dfb70e07a3
5 changed files with 15 additions and 14 deletions
|
@ -50,9 +50,9 @@ import mage.target.TargetPermanent;
|
|||
* @author jeffwadsworth
|
||||
*/
|
||||
public class Encrust extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
|
@ -71,9 +71,9 @@ public class Encrust extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
// 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.setText("and its activated abilities can't be activated");
|
||||
ability.addEffect(effect);
|
||||
|
|
|
@ -76,7 +76,7 @@ public class NumbingDose extends CardImpl {
|
|||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// 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.
|
||||
this.addAbility(new NumbingDoseTriggeredAbility());
|
||||
|
|
|
@ -32,7 +32,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BecomesTargetAttachedTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
|
@ -66,9 +65,7 @@ public class SleepingPotion extends CardImpl {
|
|||
// When Sleeping Potion enters the battlefield, tap enchanted creature.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()));
|
||||
// Enchanted creature doesn't untap during its controller's untap step.
|
||||
Effect effect = new DontUntapInControllersUntapStepEnchantedEffect();
|
||||
effect.setText("Enchanted creature doesn't untap during its controller's untap step");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect()));
|
||||
// When enchanted creature becomes the target of a spell or ability, sacrifice Sleeping Potion.
|
||||
this.addAbility(new BecomesTargetAttachedTriggeredAbility(new SacrificeSourceEffect()));
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ComaVeil extends CardImpl {
|
|||
new CardTypePredicate(CardType.ARTIFACT),
|
||||
new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
|
||||
|
||||
public ComaVeil(UUID ownerId) {
|
||||
super(ownerId, 36, "Coma Veil", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
|
||||
this.expansionSetCode = "ALA";
|
||||
|
@ -66,7 +66,7 @@ public class ComaVeil extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||
// Enchanted permanent doesn't untap during its controller's untap step.
|
||||
EnchantAbility ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
ability.addEffect(new DontUntapInControllersUntapStepEnchantedEffect());
|
||||
ability.addEffect(new DontUntapInControllersUntapStepEnchantedEffect("permanent"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,12 @@ import mage.game.permanent.Permanent;
|
|||
public class DontUntapInControllersUntapStepEnchantedEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public DontUntapInControllersUntapStepEnchantedEffect() {
|
||||
this("creature");
|
||||
}
|
||||
|
||||
public DontUntapInControllersUntapStepEnchantedEffect(String description) {
|
||||
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) {
|
||||
|
@ -40,7 +44,7 @@ public class DontUntapInControllersUntapStepEnchantedEffect extends ContinuousRu
|
|||
Permanent enchanted = game.getPermanent(enchantment.getAttachedTo());
|
||||
if (enchanted != null) {
|
||||
return enchanted.getLogName() + " doesn't untap during its controller's untap step (" + enchantment.getLogName() + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -49,7 +53,7 @@ public class DontUntapInControllersUntapStepEnchantedEffect extends ContinuousRu
|
|||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.UNTAP;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (PhaseStep.UNTAP.equals(game.getTurn().getStepType())) {
|
||||
|
|
Loading…
Reference in a new issue