mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Sword of Sinew and Steel
This commit is contained in:
parent
4a42b6b3f7
commit
6abfb1370f
5 changed files with 112 additions and 9 deletions
63
Mage.Sets/src/mage/cards/s/SwordOfSinewAndSteel.java
Normal file
63
Mage.Sets/src/mage/cards/s/SwordOfSinewAndSteel.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetPlaneswalkerPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SwordOfSinewAndSteel extends CardImpl {
|
||||
|
||||
public SwordOfSinewAndSteel(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature gets +2/+2 and has protection from black and from red.
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(2, 2));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(ProtectionAbility.from(
|
||||
ObjectColor.BLACK, ObjectColor.RED
|
||||
), AttachmentType.EQUIPMENT).setText("and has protection from black and from red"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever equipped creature deals combat damage to a player, destroy up to one target planeswalker and up to one target artifact.
|
||||
ability = new DealsDamageToAPlayerAttachedTriggeredAbility(
|
||||
new DestroyTargetEffect(false, true)
|
||||
.setText("destroy up to one target planeswalker and up to one target artifact."),
|
||||
"equipped", false
|
||||
);
|
||||
ability.addTarget(new TargetPlaneswalkerPermanent(0, 1));
|
||||
ability.addTarget(new TargetArtifactPermanent(0, 1));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
|
||||
}
|
||||
|
||||
private SwordOfSinewAndSteel(final SwordOfSinewAndSteel card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwordOfSinewAndSteel copy() {
|
||||
return new SwordOfSinewAndSteel(this);
|
||||
}
|
||||
}
|
|
@ -120,6 +120,7 @@ public final class ModernHorizons extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Squirrel Nest", 182, Rarity.UNCOMMON, mage.cards.s.SquirrelNest.class));
|
||||
cards.add(new SetCardInfo("Stream of Thought", 71, Rarity.COMMON, mage.cards.s.StreamOfThought.class));
|
||||
cards.add(new SetCardInfo("Sunbaked Canyon", 247, Rarity.RARE, mage.cards.s.SunbakedCanyon.class));
|
||||
cards.add(new SetCardInfo("Sword of Sinew and Steel", 228, Rarity.MYTHIC, mage.cards.s.SwordOfSinewAndSteel.class));
|
||||
cards.add(new SetCardInfo("Sword of Truth and Justice", 229, Rarity.MYTHIC, mage.cards.s.SwordOfTruthAndJustice.class));
|
||||
cards.add(new SetCardInfo("Tempered Sliver", 183, Rarity.UNCOMMON, mage.cards.t.TemperedSliver.class));
|
||||
cards.add(new SetCardInfo("The First Sliver", 200, Rarity.MYTHIC, mage.cards.t.TheFirstSliver.class));
|
||||
|
|
|
@ -151,13 +151,13 @@ public final class StaticFilters {
|
|||
FILTER_PERMANENTS.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT_ARTIFACT = new FilterArtifactPermanent("artifact");
|
||||
public static final FilterArtifactPermanent FILTER_PERMANENT_ARTIFACT = new FilterArtifactPermanent("artifact");
|
||||
|
||||
static {
|
||||
FILTER_PERMANENT_ARTIFACT.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_AN = new FilterArtifactPermanent("an artifact");
|
||||
public static final FilterArtifactPermanent FILTER_PERMANENT_ARTIFACT_AN = new FilterArtifactPermanent("an artifact");
|
||||
|
||||
static {
|
||||
FILTER_PERMANENT_ARTIFACT_AN.setLockedFilter(true);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
|
||||
package mage.target.common;
|
||||
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
|
@ -9,22 +8,22 @@ import mage.target.TargetPermanent;
|
|||
* @author ayratn
|
||||
*/
|
||||
public class TargetArtifactPermanent extends TargetPermanent {
|
||||
|
||||
|
||||
public TargetArtifactPermanent() {
|
||||
this(1, 1, new FilterArtifactPermanent(), false);
|
||||
this(1, 1, StaticFilters.FILTER_PERMANENT_ARTIFACT, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public TargetArtifactPermanent(FilterArtifactPermanent filter) {
|
||||
this(1, 1, filter, false);
|
||||
}
|
||||
|
||||
public TargetArtifactPermanent(int numTargets) {
|
||||
this(numTargets, numTargets, new FilterArtifactPermanent(), false);
|
||||
this(numTargets, numTargets, StaticFilters.FILTER_PERMANENT_ARTIFACT, false);
|
||||
}
|
||||
|
||||
public TargetArtifactPermanent(int minNumTargets, int maxNumTargets) {
|
||||
this(minNumTargets, maxNumTargets, new FilterArtifactPermanent(), false);
|
||||
this(minNumTargets, maxNumTargets, StaticFilters.FILTER_PERMANENT_ARTIFACT, false);
|
||||
}
|
||||
|
||||
public TargetArtifactPermanent(int minNumTargets, int maxNumTargets, FilterArtifactPermanent filter, boolean notTarget) {
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package mage.target.common;
|
||||
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class TargetPlaneswalkerPermanent extends TargetPermanent {
|
||||
|
||||
public TargetPlaneswalkerPermanent() {
|
||||
this(1, 1, StaticFilters.FILTER_PERMANENT_PLANESWALKER, false);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(FilterPlaneswalkerPermanent filter) {
|
||||
this(1, 1, filter, false);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(int numTargets) {
|
||||
this(numTargets, numTargets, StaticFilters.FILTER_PERMANENT_PLANESWALKER, false);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(int minNumTargets, int maxNumTargets) {
|
||||
this(minNumTargets, maxNumTargets, StaticFilters.FILTER_PERMANENT_PLANESWALKER, false);
|
||||
}
|
||||
|
||||
public TargetPlaneswalkerPermanent(int minNumTargets, int maxNumTargets, FilterPlaneswalkerPermanent filter, boolean notTarget) {
|
||||
super(minNumTargets, maxNumTargets, filter, notTarget);
|
||||
}
|
||||
|
||||
private TargetPlaneswalkerPermanent(final TargetPlaneswalkerPermanent target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TargetPlaneswalkerPermanent copy() {
|
||||
return new TargetPlaneswalkerPermanent(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue