forked from External/mage
[CLB] Implemented Javelin of Lightning
This commit is contained in:
parent
0855832a9f
commit
3350c5d8d8
21 changed files with 149 additions and 191 deletions
|
|
@ -1,17 +1,13 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
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;
|
||||
|
||||
|
|
@ -26,11 +22,7 @@ public final class BrambleArmor extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Bramble Armor 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +2/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 1)));
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -11,9 +9,7 @@ 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.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -28,11 +24,7 @@ public final class CliffhavenKitesail extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Cliffhaven Kitesail 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature has flying.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||
|
|
|
|||
|
|
@ -1,18 +1,14 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
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;
|
||||
|
||||
|
|
@ -30,11 +26,7 @@ public final class DuelingRapier extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Dueling Rapier 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +2/+0.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 0)));
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.AttackingCreatureCount;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect;
|
||||
|
|
@ -18,7 +17,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -43,14 +41,10 @@ public final class Embercleave extends CardImpl {
|
|||
).addHint(new ValueHint("Attacking creature you control", xValue)));
|
||||
|
||||
// When Embercleave 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +1/+1 and has double strike and trample.
|
||||
ability = new SimpleStaticAbility(new BoostEquippedEffect(1, 1));
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(1, 1));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(
|
||||
DoubleStrikeAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
).setText("and has double strike"));
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@ import mage.MageInt;
|
|||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.effects.common.continuous.LookAtTopCardOfLibraryAnyTimeEffect;
|
||||
import mage.abilities.effects.common.continuous.PlayTheTopCardEffect;
|
||||
|
|
@ -21,7 +20,6 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -123,7 +121,8 @@ class GaleaKindlerOfHopeEffect extends ContinuousEffectImpl {
|
|||
|
||||
private final MageObjectReference spellRef;
|
||||
private final MageObjectReference permRef;
|
||||
private final Ability ability = makeAbility();
|
||||
private final Ability ability = new EntersBattlefieldAttachToTarget()
|
||||
.setTriggerPhrase("When this Equipment enters the battlefield, ");
|
||||
|
||||
GaleaKindlerOfHopeEffect(Spell spell, Game game) {
|
||||
super(Duration.Custom, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.Benefit);
|
||||
|
|
@ -157,12 +156,4 @@ class GaleaKindlerOfHopeEffect extends ContinuousEffectImpl {
|
|||
permanent.addAbility(ability, source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
|
||||
private static Ability makeAbility() {
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(
|
||||
Outcome.BoostCreature, "attach it to target creature you control"
|
||||
), false).setTriggerPhrase("When this Equipment enters the battlefield, ");
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
return ability;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
59
Mage.Sets/src/mage/cards/j/JavelinOfLightning.java
Normal file
59
Mage.Sets/src/mage/cards/j/JavelinOfLightning.java
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.hint.common.MyTurnHint;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class JavelinOfLightning extends CardImpl {
|
||||
|
||||
public JavelinOfLightning(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Javelin of Lightning enters the battlefield, attach it to target creature you control.
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// As long as it's your turn, equipped creature gets +2/+0 and has first strike.
|
||||
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new BoostEquippedEffect(2, 0), MyTurnCondition.instance,
|
||||
"as long as it's your turn, equipped creature gets +2/+0"));
|
||||
ability.addEffect(new ConditionalContinuousEffect(new GainAbilityAttachedEffect(
|
||||
FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
), MyTurnCondition.instance, "and first strike"));
|
||||
this.addAbility(ability.addHint(MyTurnHint.instance));
|
||||
|
||||
// Equip {4}
|
||||
this.addAbility(new EquipAbility(4));
|
||||
}
|
||||
|
||||
private JavelinOfLightning(final JavelinOfLightning card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JavelinOfLightning copy() {
|
||||
return new JavelinOfLightning(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
|
@ -16,7 +15,6 @@ import mage.constants.AttachmentType;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -31,14 +29,10 @@ public final class MaulOfTheSkyclaves extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Maul of the Skyclaves 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +2/+2 and has flying and first strike.
|
||||
ability = new SimpleStaticAbility(new BoostEquippedEffect(2, 2));
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(2, 2));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(
|
||||
FlyingAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
).setText("and has flying"));
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CardsInOpponentGraveyardCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
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.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -29,11 +26,7 @@ public final class MindCarver extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Mind Carver 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped Creature gets +1/+0. It gets +3/+1 instead as long as an opponent has eight or more cards in their graveyard.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
|
|
|
|||
|
|
@ -1,23 +1,18 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class PaladinsShield extends CardImpl {
|
||||
|
|
@ -31,11 +26,7 @@ public final class PaladinsShield extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Paladin's Shield 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")
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +0/+2.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(0, 2)));
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
|
||||
package mage.cards.p;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -14,23 +11,18 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PiratesCutlass extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Pirate you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.PIRATE.getPredicate());
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.PIRATE);
|
||||
|
||||
public PiratesCutlass(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
|
@ -38,9 +30,7 @@ public final class PiratesCutlass extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Pirate's Cutlass enters the battlefield, attach it to target Pirate you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(Outcome.BoostCreature, "attach it to target Pirate you control"), false);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget(filter));
|
||||
|
||||
// Equipped creature gets +2/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1)));
|
||||
|
|
|
|||
|
|
@ -2,45 +2,39 @@
|
|||
|
||||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
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.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Viserion, North
|
||||
*/
|
||||
public final class PistonSledge extends CardImpl {
|
||||
|
||||
private static FilterControlledPermanent filter = new FilterControlledPermanent("an artifact");
|
||||
|
||||
static {
|
||||
static {
|
||||
filter.add(CardType.ARTIFACT.getPredicate());
|
||||
}
|
||||
|
||||
public PistonSledge (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
public PistonSledge(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Piston Sledge 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +3/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 1)));
|
||||
|
|
@ -49,7 +43,7 @@ public final class PistonSledge extends CardImpl {
|
|||
this.addAbility(new EquipAbility(Outcome.AddAbility, new SacrificeTargetCost(new TargetControlledPermanent(filter)), false));
|
||||
}
|
||||
|
||||
public PistonSledge (final PistonSledge card) {
|
||||
public PistonSledge(final PistonSledge card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
package mage.cards.q;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
|
@ -13,9 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -33,14 +30,11 @@ public final class QuickDrawDagger extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Quick-Draw Dagger enters the battlefield, attach it to target creature you control. That creature gains first strike until end of turn.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new AttachEffect(
|
||||
Outcome.BoostCreature, "attach it to target creature you control"
|
||||
), false);
|
||||
Ability ability = new EntersBattlefieldAttachToTarget();
|
||||
ability.addEffect(new GainAbilityTargetEffect(
|
||||
FirstStrikeAbility.getInstance(), Duration.EndOfTurn,
|
||||
"That creature gains first strike until end of turn"
|
||||
));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Equipped creature gets +1/+1.
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.PartyCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.hint.common.PartyCountHint;
|
||||
|
|
@ -18,7 +17,6 @@ import mage.constants.AttachmentType;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -33,14 +31,10 @@ public final class RavagersMace extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Ravager's Mace 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +1/+0 for each creature in your party and has menace.
|
||||
ability = new SimpleStaticAbility(new BoostEquippedEffect(
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(
|
||||
PartyCount.instance, StaticValue.get(0)
|
||||
).setText("equipped creature gets +1/+0 for each creature in your party"));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(
|
||||
|
|
|
|||
|
|
@ -1,20 +1,16 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
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;
|
||||
|
||||
|
|
@ -31,11 +27,7 @@ public final class RelicAxe extends CardImpl {
|
|||
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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +1/+1. If it's a Warrior, it gets +2/+1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
|
|
|
|||
|
|
@ -1,20 +1,16 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
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.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -36,11 +32,7 @@ public final class RosethornHalberd extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Rosethorn Halberd enters the battlefield, attach it to target non-Human creature you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new AttachEffect(Outcome.Benefit, "attach it to target non-Human creature you control")
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget(filter));
|
||||
|
||||
// Equipped creature gets +2/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 1)));
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -12,7 +10,6 @@ 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;
|
||||
|
||||
|
|
@ -27,11 +24,7 @@ public final class ScavengedBlade extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Scavenged Blade 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +2/+0.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 0)));
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
|
@ -13,11 +12,9 @@ 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.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -37,14 +34,10 @@ public final class ShiningArmor extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Shining Armor enters the battlefield, attach it to target Knight you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new AttachEffect(Outcome.Benefit, "attach it to target Knight you control")
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget(filter));
|
||||
|
||||
// Equipped creature gets +0/+2 and has vigilance.
|
||||
ability = new SimpleStaticAbility(new BoostEquippedEffect(0, 2));
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(0, 2));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(
|
||||
VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
).setText("and has vigilance"));
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -15,7 +14,6 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -31,11 +29,7 @@ public final class SkyclavePickAxe extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Skyclave Pick-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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Landfall — Whenever a land enters the battlefield under your control, equipped creature gets +2/+2 until end of turn.
|
||||
this.addAbility(new LandfallAbility(new SkyclavePickAxeEffect()));
|
||||
|
|
|
|||
|
|
@ -1,17 +1,13 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAttachToTarget;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
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;
|
||||
|
||||
|
|
@ -26,11 +22,7 @@ public final class UtilityKnife extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// When Utility Knife 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);
|
||||
this.addAbility(new EntersBattlefieldAttachToTarget());
|
||||
|
||||
// Equipped creature gets +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(1, 1)));
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Jaheira's Respite", 238, Rarity.RARE, mage.cards.j.JaheirasRespite.class));
|
||||
cards.add(new SetCardInfo("Jaheira, Friend of the Forest", 237, Rarity.RARE, mage.cards.j.JaheiraFriendOfTheForest.class));
|
||||
cards.add(new SetCardInfo("Jan Jansen, Chaos Crafter", 277, Rarity.RARE, mage.cards.j.JanJansenChaosCrafter.class));
|
||||
cards.add(new SetCardInfo("Javelin of Lightning", 185, Rarity.COMMON, mage.cards.j.JavelinOfLightning.class));
|
||||
cards.add(new SetCardInfo("Karlach, Fury of Avernus", 186, Rarity.MYTHIC, mage.cards.k.KarlachFuryOfAvernus.class));
|
||||
cards.add(new SetCardInfo("Kindred Discovery", 81, Rarity.RARE, mage.cards.k.KindredDiscovery.class));
|
||||
cards.add(new SetCardInfo("Korlessa, Scale Singer", 280, Rarity.UNCOMMON, mage.cards.k.KorlessaScaleSinger.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class EntersBattlefieldAttachToTarget extends EntersBattlefieldTriggeredAbility {
|
||||
|
||||
public EntersBattlefieldAttachToTarget() {
|
||||
this(StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
}
|
||||
|
||||
public EntersBattlefieldAttachToTarget(FilterPermanent filter) {
|
||||
super(new AttachEffect(Outcome.BoostCreature, "attach it to target" + filter.getMessage()));
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private EntersBattlefieldAttachToTarget(final EntersBattlefieldAttachToTarget ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntersBattlefieldAttachToTarget copy() {
|
||||
return new EntersBattlefieldAttachToTarget(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue