mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08: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
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class Encrust extends CardImpl {
|
public class Encrust extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
new CardTypePredicate(CardType.CREATURE),
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
|
|
@ -71,9 +71,9 @@ public class Encrust extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
|
||||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -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());
|
||||||
|
|
|
||||||
|
|
@ -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()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class ComaVeil extends CardImpl {
|
||||||
new CardTypePredicate(CardType.ARTIFACT),
|
new CardTypePredicate(CardType.ARTIFACT),
|
||||||
new CardTypePredicate(CardType.CREATURE)));
|
new CardTypePredicate(CardType.CREATURE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComaVeil(UUID ownerId) {
|
public ComaVeil(UUID ownerId) {
|
||||||
super(ownerId, 36, "Coma Veil", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
|
super(ownerId, 36, "Coma Veil", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
|
||||||
this.expansionSetCode = "ALA";
|
this.expansionSetCode = "ALA";
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
@ -40,7 +44,7 @@ public class DontUntapInControllersUntapStepEnchantedEffect extends ContinuousRu
|
||||||
Permanent enchanted = game.getPermanent(enchantment.getAttachedTo());
|
Permanent enchanted = game.getPermanent(enchantment.getAttachedTo());
|
||||||
if (enchanted != null) {
|
if (enchanted != null) {
|
||||||
return enchanted.getLogName() + " doesn't untap during its controller's untap step (" + enchantment.getLogName() + ")";
|
return enchanted.getLogName() + " doesn't untap during its controller's untap step (" + enchantment.getLogName() + ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -49,7 +53,7 @@ public class DontUntapInControllersUntapStepEnchantedEffect extends ContinuousRu
|
||||||
public boolean checksEventType(GameEvent event, Game game) {
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == GameEvent.EventType.UNTAP;
|
return event.getType() == GameEvent.EventType.UNTAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
if (PhaseStep.UNTAP.equals(game.getTurn().getStepType())) {
|
if (PhaseStep.UNTAP.equals(game.getTurn().getStepType())) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue