[ZNR] Implemented Relic Axe

This commit is contained in:
Evan Kranzler 2020-09-10 11:40:37 -04:00
parent 818b4d9ef1
commit 88b76c4fdb
2 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,58 @@
package mage.cards.r;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.EquippedHasSubtypeCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RelicAxe extends CardImpl {
private static final Condition condition = new EquippedHasSubtypeCondition(SubType.WARRIOR);
public RelicAxe(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
this.subtype.add(SubType.EQUIPMENT);
// When Relic Axe enters the battlefield, attach it to target creature you control.
Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(
Outcome.BoostCreature, "attach it to target creature you control"
), false);
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
// Equipped creature gets +1/+1. If it's a Warrior, it gets +2/+1 instead.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostEquippedEffect(2, 1), new BoostEquippedEffect(1, 1),
condition, "equipped creature gets +1/+1. If it's a Warrior, it gets +2/+1 instead"
)));
// Equip {2}
this.addAbility(new EquipAbility(2));
}
private RelicAxe(final RelicAxe card) {
super(card);
}
@Override
public RelicAxe copy() {
return new RelicAxe(this);
}
}

View file

@ -274,6 +274,7 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Ravager's Mace", 235, Rarity.UNCOMMON, mage.cards.r.RavagersMace.class));
cards.add(new SetCardInfo("Reclaim the Wastes", 200, Rarity.COMMON, mage.cards.r.ReclaimTheWastes.class));
cards.add(new SetCardInfo("Relic Amulet", 247, Rarity.UNCOMMON, mage.cards.r.RelicAmulet.class));
cards.add(new SetCardInfo("Relic Axe", 248, Rarity.UNCOMMON, mage.cards.r.RelicAxe.class));
cards.add(new SetCardInfo("Relic Golem", 249, Rarity.UNCOMMON, mage.cards.r.RelicGolem.class));
cards.add(new SetCardInfo("Relic Robber", 153, Rarity.RARE, mage.cards.r.RelicRobber.class));
cards.add(new SetCardInfo("Relic Vial", 250, Rarity.UNCOMMON, mage.cards.r.RelicVial.class));