[AFR] Implemented Leather Armor

This commit is contained in:
Daniel Bomar 2021-07-07 13:53:44 -05:00
parent 3bf876b520
commit 7f68cef222
No known key found for this signature in database
GPG key ID: C86C8658F4023918
3 changed files with 70 additions and 8 deletions

View file

@ -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();
}
}