* Bound by Moonsilver - Fixed tooltip text.

This commit is contained in:
LevelX2 2016-04-27 23:40:18 +02:00
parent 043a3b50cc
commit 3d740a69dd
2 changed files with 17 additions and 5 deletions

View file

@ -34,17 +34,19 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.CantAttackBlockTransformAttachedEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import mage.abilities.effects.common.CantAttackBlockTransformAttachedEffect;
import mage.constants.TimingRule; import mage.constants.TimingRule;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
/** /**
* *
@ -52,6 +54,12 @@ import mage.target.common.TargetControlledPermanent;
*/ */
public class BoundByMoonsilver extends CardImpl { public class BoundByMoonsilver extends CardImpl {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("another permanent");
static {
filter.add(new AnotherPredicate());
}
public BoundByMoonsilver(UUID ownerId) { public BoundByMoonsilver(UUID ownerId) {
super(ownerId, 7, "Bound by Moonsilver", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); super(ownerId, 7, "Bound by Moonsilver", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
this.expansionSetCode = "SOI"; this.expansionSetCode = "SOI";
@ -71,7 +79,7 @@ public class BoundByMoonsilver extends CardImpl {
// Sacrifice another permanent: Attach Bound by Moonsilver to target creature. Activate this ability only any time you could cast a sorcery and only once each turn. // Sacrifice another permanent: Attach Bound by Moonsilver to target creature. Activate this ability only any time you could cast a sorcery and only once each turn.
LimitedTimesPerTurnActivatedAbility limitedAbility = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "Attach {this} to target creature"), LimitedTimesPerTurnActivatedAbility limitedAbility = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "Attach {this} to target creature"),
new SacrificeTargetCost(new TargetControlledPermanent()), 1); new SacrificeTargetCost(new TargetControlledPermanent(filter)), 1);
limitedAbility.setTiming(TimingRule.SORCERY); limitedAbility.setTiming(TimingRule.SORCERY);
limitedAbility.addTarget(new TargetCreaturePermanent()); limitedAbility.addTarget(new TargetCreaturePermanent());
this.addAbility(limitedAbility); this.addAbility(limitedAbility);

View file

@ -32,6 +32,7 @@ import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.constants.TimingRule;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.util.CardUtil; import mage.util.CardUtil;
@ -119,6 +120,9 @@ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl {
if (condition != null) { if (condition != null) {
sb.append("only ").append(condition.toString()).append(" and "); sb.append("only ").append(condition.toString()).append(" and ");
} }
if (getTiming().equals(TimingRule.SORCERY)) {
sb.append("only any time you could cast a sorcery and ");
}
switch (maxActivationsPerTurn) { switch (maxActivationsPerTurn) {
case 1: case 1:
sb.append("only once"); sb.append("only once");