diff --git a/Mage.Sets/src/mage/cards/l/LeatherArmor.java b/Mage.Sets/src/mage/cards/l/LeatherArmor.java new file mode 100644 index 0000000000..63c83f260a --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LeatherArmor.java @@ -0,0 +1,54 @@ +package mage.cards.l; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.WardAbility; +import mage.constants.AttachmentType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author weirddan455 + */ +public final class LeatherArmor extends CardImpl { + + public LeatherArmor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +0/+1 and has ward {1}. + Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(0, 1)); + ability.addEffect(new GainAbilityAttachedEffect( + new WardAbility(new GenericManaCost(1)), + AttachmentType.EQUIPMENT, + Duration.WhileOnBattlefield, + "and has ward {1}" + )); + this.addAbility(ability); + + // Equip {0}. Activate only once each turn. + EquipAbility equipAbility = new EquipAbility(0); + equipAbility.setMaxActivationsPerTurn(1); + this.addAbility(equipAbility); + } + + private LeatherArmor(final LeatherArmor card) { + super(card); + } + + @Override + public LeatherArmor copy() { + return new LeatherArmor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index ff89908475..e6907977b2 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -134,6 +134,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet { cards.add(new SetCardInfo("Jaded Sell-Sword", 152, Rarity.COMMON, mage.cards.j.JadedSellSword.class)); cards.add(new SetCardInfo("Kick in the Door", 153, Rarity.COMMON, mage.cards.k.KickInTheDoor.class)); cards.add(new SetCardInfo("Krydle of Baldur's Gate", 226, Rarity.UNCOMMON, mage.cards.k.KrydleOfBaldursGate.class)); + cards.add(new SetCardInfo("Leather Armor", 248, Rarity.COMMON, mage.cards.l.LeatherArmor.class)); cards.add(new SetCardInfo("Lightfoot Rogue", 111, Rarity.UNCOMMON, mage.cards.l.LightfootRogue.class)); cards.add(new SetCardInfo("Lolth, Spider Queen", 112, Rarity.MYTHIC, mage.cards.l.LolthSpiderQueen.class)); cards.add(new SetCardInfo("Lurking Roper", 194, Rarity.UNCOMMON, mage.cards.l.LurkingRoper.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/EquipAbility.java b/Mage/src/main/java/mage/abilities/keyword/EquipAbility.java index aad2d3ae72..030a35f806 100644 --- a/Mage/src/main/java/mage/abilities/keyword/EquipAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EquipAbility.java @@ -14,7 +14,7 @@ import mage.target.common.TargetControlledCreaturePermanent; * @author BetaSteward_at_googlemail.com */ public class EquipAbility extends ActivatedAbilityImpl { - + public EquipAbility(int cost) { this(Outcome.AddAbility, new GenericManaCost(cost)); } @@ -41,12 +41,19 @@ public class EquipAbility extends ActivatedAbilityImpl { @Override public String getRule() { String targetText = getTargets().get(0) != null ? getTargets().get(0).getFilter().getMessage() : "creature"; - - return "Equip " - + (targetText.equals("creature you control") ? "" : targetText + " ") - + costs.getText() - + manaCosts.getText() - + " <i>(" + manaCosts.getText() + ": Attach to target " + targetText + " you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.)</i>"; - } + String reminderText = " <i>(" + manaCosts.getText() + ": Attach to target " + targetText + ". Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.)</i>"; + StringBuilder sb = new StringBuilder("Equip "); + if (!targetText.equals("creature you control")) { + sb.append(targetText); + sb.append(' '); + } + sb.append(costs.getText()); + sb.append(manaCosts.getText()); + if (maxActivationsPerTurn == 1) { + sb.append(" Activate only once each turn."); + } + sb.append(reminderText); + return sb.toString(); + } }