[MH2] Implemented Lightning Spear

This commit is contained in:
Evan Kranzler 2021-06-02 22:03:17 -04:00
parent 5f61112a45
commit 2bcb06775b
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,59 @@
package mage.cards.l;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class LightningSpear extends CardImpl {
public LightningSpear(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{R}");
this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +1/+0 and has trample.
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(1, 0));
ability.addEffect(new GainAbilityAttachedEffect(
TrampleAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has trample"));
this.addAbility(ability);
// {2}{R}, Sacrifice Lightning Spear: It deals 3 damage to any target.
ability = new SimpleActivatedAbility(
new DamageTargetEffect(3, "it"), new ManaCostsImpl<>("{2}{R}")
);
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
// Equip {1}
this.addAbility(new EquipAbility(1));
}
private LightningSpear(final LightningSpear card) {
super(card);
}
@Override
public LightningSpear copy() {
return new LightningSpear(this);
}
}

View file

@ -153,6 +153,7 @@ public final class ModernHorizons2 extends ExpansionSet {
cards.add(new SetCardInfo("Lazotep Chancellor", 203, Rarity.UNCOMMON, mage.cards.l.LazotepChancellor.class));
cards.add(new SetCardInfo("Legion Vanguard", 90, Rarity.UNCOMMON, mage.cards.l.LegionVanguard.class));
cards.add(new SetCardInfo("Lens Flare", 20, Rarity.COMMON, mage.cards.l.LensFlare.class));
cards.add(new SetCardInfo("Lightning Spear", 134, Rarity.COMMON, mage.cards.l.LightningSpear.class));
cards.add(new SetCardInfo("Liquimetal Torque", 228, Rarity.UNCOMMON, mage.cards.l.LiquimetalTorque.class));
cards.add(new SetCardInfo("Lose Focus", 49, Rarity.COMMON, mage.cards.l.LoseFocus.class));
cards.add(new SetCardInfo("Lucid Dreams", 50, Rarity.UNCOMMON, mage.cards.l.LucidDreams.class));