* Metalcraft abilities - added card hints about artifacts count, fixed missing ability word;

This commit is contained in:
Oleg Agafonov 2020-07-25 05:40:59 +04:00
parent 97c427375d
commit 043785b1d1
38 changed files with 347 additions and 252 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -9,10 +7,13 @@ import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import java.util.UUID;
/**
* @author Loki
*/
@ -32,6 +33,7 @@ public final class ArdentRecruit extends CardImpl {
"{this} gets +2/+2 as long as you control three or more artifacts");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}

View file

@ -1,7 +1,5 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@ -12,6 +10,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -20,8 +19,9 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class ArgentSphinx extends CardImpl {
@ -39,6 +39,7 @@ public final class ArgentSphinx extends CardImpl {
// <i>Metalcraft</i> &mdash; {U}: Exile Argent Sphinx. Return it to the battlefield under your control at the beginning of the next end step. Activate this ability only if you control three or more artifacts.
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ArgentSphinxEffect(), new ManaCostsImpl("{U}"), MetalcraftCondition.instance);
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}

View file

@ -1,23 +1,20 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author maurer.it_at_gmail.com
*/
public final class AuriokEdgewright extends CardImpl {
@ -25,7 +22,7 @@ public final class AuriokEdgewright extends CardImpl {
protected static String effectText = "<i>Metalcraft</i> &mdash; Auriok Edgewright has double strike as long as you control three or more artifacts.";
public AuriokEdgewright(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
@ -33,7 +30,12 @@ public final class AuriokEdgewright extends CardImpl {
this.toughness = new MageInt(2);
ContinuousEffect effect = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, effectText)));
this.addAbility(new SimpleStaticAbility(
Zone.BATTLEFIELD,
new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, effectText))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public AuriokEdgewright(final AuriokEdgewright card) {

View file

@ -1,7 +1,5 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
@ -9,16 +7,15 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author maurer.it_at_gmail.com
*/
public final class AuriokSunchaser extends CardImpl {
@ -27,7 +24,7 @@ public final class AuriokSunchaser extends CardImpl {
protected static String effect2Text = "<i>Metalcraft</i> &mdash; As long as you control three or more artifacts, Auriok Sunchaser has flying";
public AuriokSunchaser(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER);
@ -35,9 +32,18 @@ public final class AuriokSunchaser extends CardImpl {
this.toughness = new MageInt(1);
ContinuousEffect effect1 = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect1, MetalcraftCondition.instance, effect1Text)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(effect1, MetalcraftCondition.instance, effect1Text))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
ContinuousEffect effect2 = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect2, MetalcraftCondition.instance, effect2Text)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(effect2, MetalcraftCondition.instance, effect2Text))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public AuriokSunchaser(final AuriokSunchaser card) {

View file

@ -1,7 +1,5 @@
package mage.cards.b;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -9,15 +7,18 @@ import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/**
*
* @author North
*/
public final class BladeTribeBerserkers extends CardImpl {
@ -25,7 +26,7 @@ public final class BladeTribeBerserkers extends CardImpl {
private static final String effectText = "<i>Metalcraft</i> &mdash; When Blade-Tribe Berserkers enters the battlefield, if you control three or more artifacts, Blade-Tribe Berserkers gets +3/+3 and gains haste until end of turn.";
public BladeTribeBerserkers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.HUMAN, SubType.BERSERKER);
this.power = new MageInt(3);
@ -34,7 +35,10 @@ public final class BladeTribeBerserkers extends CardImpl {
//<i>Metalcraft</i> &mdash; When Blade-Tribe Berserkers enters the battlefield, if you control three or more artifacts, Blade-Tribe Berserkers gets +3/+3 and gains haste until end of turn.
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), false);
ability.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText)
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public BladeTribeBerserkers(final BladeTribeBerserkers card) {

View file

@ -1,7 +1,5 @@
package mage.cards.b;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -9,15 +7,18 @@ import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.Target;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author North
*/
public final class BleakCovenVampires extends CardImpl {
@ -25,7 +26,7 @@ public final class BleakCovenVampires extends CardImpl {
private static final String effectText = "<i>Metalcraft</i> &mdash; When Bleak Coven Vampires enters the battlefield, if you control three or more artifacts, target player loses 4 life and you gain 4 life.";
public BleakCovenVampires(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
this.subtype.add(SubType.VAMPIRE, SubType.WARRIOR);
this.power = new MageInt(4);
@ -37,7 +38,10 @@ public final class BleakCovenVampires extends CardImpl {
Target target = new TargetPlayer();
ability.addTarget(target);
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText)
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public BleakCovenVampires(final BleakCovenVampires card) {

View file

@ -1,5 +1,3 @@
package mage.cards.c;
import mage.MageInt;
@ -7,12 +5,10 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
@ -35,8 +31,9 @@ public final class CarapaceForger extends CardImpl {
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
MetalcraftCondition.instance, "<i>Metalcraft</i> &mdash; {this} gets " +
"+2/+2 as long as you control three or more artifacts"
)
));
))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance));
}
public CarapaceForger(final CarapaceForger card) {

View file

@ -1,5 +1,3 @@
package mage.cards.c;
import mage.MageInt;
@ -7,12 +5,10 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
@ -33,8 +29,9 @@ public final class ChromeSteed extends CardImpl {
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
MetalcraftCondition.instance, "<i>Metalcraft</i> &mdash; {this} gets " +
"+2/+2 as long as you control three or more artifacts"
)
));
))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance));
}
public ChromeSteed(final ChromeSteed card) {

View file

@ -5,8 +5,10 @@ import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
@ -28,9 +30,12 @@ public final class ConcussiveBolt extends CardImpl {
// Concussive Bolt deals 4 damage to target player.
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
// <i>Metalcraft</i> &mdash; If you control three or more artifacts, creatures that player controls can't block this turn.
this.getSpellAbility().addEffect(new ConcussiveBoltEffect());
this.getSpellAbility().addEffect(new ConcussiveBoltRestrictionEffect());
this.getSpellAbility().setAbilityWord(AbilityWord.METALCRAFT);
this.getSpellAbility().addHint(MetalcraftHint.instance);
}
public ConcussiveBolt(final ConcussiveBolt card) {

View file

@ -1,32 +1,37 @@
package mage.cards.d;
import java.util.UUID;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class Dispatch extends CardImpl {
public Dispatch (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
public Dispatch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
// Tap target creature.
this.getSpellAbility().addEffect(new TapTargetEffect());
// Metalcraft If you control three or more artifacts, exile that creature.
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ExileTargetEffect(), MetalcraftCondition.instance, "<i>Metalcraft</i> &mdash; If you control three or more artifacts, exile that creature"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().setAbilityWord(AbilityWord.METALCRAFT);
this.getSpellAbility().addHint(MetalcraftHint.instance);
}
public Dispatch (final Dispatch card) {
public Dispatch(final Dispatch card) {
super(card);
}

View file

@ -1,35 +1,38 @@
package mage.cards.d;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterAttackingCreature;
import mage.game.Game;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author maurer.it_at_gmail.com
*/
public final class DispenseJustice extends CardImpl {
public DispenseJustice (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}");
public DispenseJustice(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
// Target player sacrifices an attacking creature.
// Metalcraft That player sacrifices two attacking creatures instead if you control three or more artifacts.
this.getSpellAbility().addEffect(new DispenseJusticeEffect());
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().setAbilityWord(AbilityWord.METALCRAFT);
this.getSpellAbility().addHint(MetalcraftHint.instance);
}
public DispenseJustice (final DispenseJustice card) {
public DispenseJustice(final DispenseJustice card) {
super(card);
}
@ -47,21 +50,20 @@ class DispenseJusticeEffect extends OneShotEffect {
private static final FilterAttackingCreature filter = new FilterAttackingCreature();
DispenseJusticeEffect ( ) {
DispenseJusticeEffect() {
super(Outcome.Sacrifice);
staticText = effectText;
}
DispenseJusticeEffect ( DispenseJusticeEffect effect ) {
DispenseJusticeEffect(DispenseJusticeEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
if ( MetalcraftCondition.instance.apply(game, source) ) {
if (MetalcraftCondition.instance.apply(game, source)) {
return new SacrificeEffect(filter, 2, effectText).apply(game, source);
}
else {
} else {
return new SacrificeEffect(filter, 1, effectText).apply(game, source);
}
}

View file

@ -1,7 +1,5 @@
package mage.cards.e;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility;
@ -9,19 +7,18 @@ import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import java.util.UUID;
/**
*
* @author North
*/
public final class EtchedChampion extends CardImpl {
@ -39,14 +36,19 @@ public final class EtchedChampion extends CardImpl {
}
public EtchedChampion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Metalcraft Etched Champion has protection from all colors as long as you control three or more artifacts.
ContinuousEffect effect = new GainAbilitySourceEffect(new ProtectionAbility(filter), Duration.WhileOnBattlefield);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, ruleText)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, ruleText))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public EtchedChampion(final EtchedChampion card) {

View file

@ -1,8 +1,5 @@
package mage.cards.e;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -11,36 +8,38 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class EzurisBrigade extends CardImpl {
private static final String rule = "<i>Metalcraft</i> &mdash; As long as you control three or more artifacts, Ezuri's Brigade gets +4/+4 and has trample";
public EzurisBrigade (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
public EzurisBrigade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Metalcraft As long as you control three or more artifacts, Ezuris Brigade gets +4/+4 and has trample.
ContinuousEffect boostSource = new BoostSourceEffect(4, 4, Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, MetalcraftCondition.instance, rule);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), MetalcraftCondition.instance, ""));
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}
public EzurisBrigade (final EzurisBrigade card) {
public EzurisBrigade(final EzurisBrigade card) {
super(card);
}

View file

@ -3,8 +3,10 @@ package mage.cards.g;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.target.common.TargetAnyTarget;
@ -29,6 +31,8 @@ public final class GalvanicBlast extends CardImpl {
MetalcraftCondition.instance, effectText
));
this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getSpellAbility().setAbilityWord(AbilityWord.METALCRAFT);
this.getSpellAbility().addHint(MetalcraftHint.instance);
}
public GalvanicBlast(final GalvanicBlast card) {

View file

@ -1,42 +1,42 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class GhalmasWarden extends CardImpl {
private static final String rule = "<i>Metalcraft</i> &mdash; Ghalma's Warden gets +2/+2 as long as you control three or more artifacts";
public GhalmasWarden (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
public GhalmasWarden(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.ELEPHANT);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// Metalcraft Ghalmas Warden gets +2/+2 as long as you control three or more artifacts.
ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(boostSource, MetalcraftCondition.instance, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public GhalmasWarden (final GhalmasWarden card) {
public GhalmasWarden(final GhalmasWarden card) {
super(card);
}

View file

@ -1,24 +1,21 @@
package mage.cards.i;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.ShroudAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.FilterPermanent;
import java.util.UUID;
/**
* @author nantuko
*/
@ -33,15 +30,21 @@ public final class IndomitableArchangel extends CardImpl {
}
public IndomitableArchangel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
this.subtype.add(SubType.ANGEL);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Metalcraft Artifacts you control have shroud as long as you control three or more artifacts. (An artifact with shroud cant be the target of spells or abilities.)
ContinuousEffect gainAbilityEffect = new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filter);
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(gainAbilityEffect, MetalcraftCondition.instance, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public IndomitableArchangel(final IndomitableArchangel card) {

View file

@ -1,7 +1,5 @@
package mage.cards.i;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
@ -11,9 +9,11 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
@ -24,8 +24,9 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class InventorsFair extends CardImpl {
@ -37,7 +38,7 @@ public final class InventorsFair extends CardImpl {
}
public InventorsFair(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
addSuperType(SuperType.LEGENDARY);
// At the beginning of your upkeep, if you control three or more artifacts, you gain 1 life.
@ -52,6 +53,8 @@ public final class InventorsFair extends CardImpl {
new GenericManaCost(4), MetalcraftCondition.instance);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}

View file

@ -1,24 +1,20 @@
package mage.cards.j;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author North
*/
public final class JorKadeenThePrevailer extends CardImpl {
@ -40,7 +36,9 @@ public final class JorKadeenThePrevailer extends CardImpl {
// <i>Metalcraft</i> &mdash; Creatures you control get +3/+0 as long as you control three or more artifacts.
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostControlledEffect(3, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, false),
MetalcraftCondition.instance, effectText);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance));
}
public JorKadeenThePrevailer(final JorKadeenThePrevailer card) {

View file

@ -1,7 +1,5 @@
package mage.cards.k;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.condition.CompoundCondition;
@ -10,24 +8,22 @@ import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public final class KuldothaPhoenix extends CardImpl {
public KuldothaPhoenix(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{R}");
this.subtype.add(SubType.PHOENIX);
this.power = new MageInt(4);
@ -36,16 +32,17 @@ public final class KuldothaPhoenix extends CardImpl {
// Flying, haste
this.addAbility(FlyingAbility.getInstance());
this.addAbility(HasteAbility.getInstance());
// <i>Metalcraft</i> &mdash; {4}: Return Kuldotha Phoenix from your graveyard to the battlefield.
// Activate this ability only during your upkeep and only if you control three or more artifacts.
Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD,
new ReturnSourceFromGraveyardToBattlefieldEffect(),
new ManaCostsImpl("{4}"),
Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD,
new ReturnSourceFromGraveyardToBattlefieldEffect(),
new ManaCostsImpl("{4}"),
new CompoundCondition("during your upkeep and only if you control three or more artifacts",
new IsStepCondition(PhaseStep.UPKEEP), MetalcraftCondition.instance)
);
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}

View file

@ -1,20 +1,22 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author ayrat
*/
@ -23,7 +25,7 @@ public final class LumengridDrake extends CardImpl {
private static final String ruleText = "<i>Metalcraft</i> &mdash; When {this} enters the battlefield, if you control three or more artifacts, return target creature to its owner's hand.";
public LumengridDrake(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.DRAKE);
this.color.setBlue(true);
@ -37,6 +39,8 @@ public final class LumengridDrake extends CardImpl {
TriggeredAbility conditional = new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), MetalcraftCondition.instance, ruleText);
conditional.addTarget(new TargetCreaturePermanent());
conditional.setAbilityWord(AbilityWord.METALCRAFT);
conditional.addHint(MetalcraftHint.instance);
this.addAbility(conditional);
}

View file

@ -1,19 +1,20 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.condition.LockedInCondition;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author North
*/
public final class MirranMettle extends CardImpl {
@ -21,14 +22,17 @@ public final class MirranMettle extends CardImpl {
private static final String effectText = "<i>Metalcraft</i> &mdash; That creature gets +4/+4 until end of turn instead if you control three or more artifacts.";
public MirranMettle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
// Target creature gets +2/+2 until end of turn.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn),
// Metalcraft That creature gets +4/+4 until end of turn instead if you control three or more artifacts.
this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn),
new LockedInCondition(MetalcraftCondition.instance), effectText));
this.getSpellAbility().setAbilityWord(AbilityWord.METALCRAFT);
this.getSpellAbility().addHint(MetalcraftHint.instance);
}
public MirranMettle(final MirranMettle card) {

View file

@ -3,12 +3,10 @@ package mage.cards.m;
import mage.abilities.Ability;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.WatcherScope;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
@ -31,6 +29,8 @@ public final class MoltenPsyche extends CardImpl {
// <i>Metalcraft</i> &mdash; If you control three or more artifacts, Molten Psyche deals damage to each opponent equal to the number of cards that player has drawn this turn.
this.getSpellAbility().addEffect(new MoltenPsycheEffect());
this.getSpellAbility().addWatcher(new MoltenPsycheWatcher());
this.getSpellAbility().setAbilityWord(AbilityWord.METALCRAFT);
this.getSpellAbility().addHint(MetalcraftHint.instance);
}
public MoltenPsyche(final MoltenPsyche card) {

View file

@ -1,11 +1,10 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.mana.ActivateIfConditionManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -14,14 +13,15 @@ import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com, Loki
*/
public final class MoxOpal extends CardImpl {
public MoxOpal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{0}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{0}");
addSuperType(SuperType.LEGENDARY);
Ability ability = new ActivateIfConditionManaAbility(
@ -30,6 +30,7 @@ public final class MoxOpal extends CardImpl {
new TapSourceCost(),
MetalcraftCondition.instance);
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}

View file

@ -1,8 +1,5 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -11,6 +8,7 @@ import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -18,6 +16,8 @@ import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import java.util.UUID;
/**
* @author Loki
*/
@ -29,7 +29,7 @@ public final class PuresteelPaladin extends CardImpl {
}
public PuresteelPaladin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
@ -38,11 +38,15 @@ public final class PuresteelPaladin extends CardImpl {
// Whenever an Equipment enters the battlefield under your control, you may draw a card.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), filter, true));
// <i>Metalcraft</i> &mdash; Equipment you control have equip {0} as long as you control three or more artifacts
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
new GainAbilityControlledEffect(new EquipAbility(Outcome.AddAbility, new GenericManaCost(0)), Duration.WhileOnBattlefield, filter),
MetalcraftCondition.instance,
"<i>Metalcraft</i> &mdash; Equipment you control have equip {0} as long as you control three or more artifacts")));
"<i>Metalcraft</i> &mdash; Equipment you control have equip {0} as long as you control three or more artifacts"))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public PuresteelPaladin(final PuresteelPaladin card) {

View file

@ -1,37 +1,37 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class RazorfieldRhino extends CardImpl {
public RazorfieldRhino (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}");
public RazorfieldRhino(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
this.subtype.add(SubType.RHINO);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Metalcraft Razorfield Rhino gets +2/+2 as long as you control three or more artifacts.
ContinuousEffect effect1 = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect1, MetalcraftCondition.instance, "<i>Metalcraft</i> &mdash; Razorfield Rhino gets +2/+2 as long as you control three or more artifacts")));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect1, MetalcraftCondition.instance, "<i>Metalcraft</i> &mdash; Razorfield Rhino gets +2/+2 as long as you control three or more artifacts"))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance));
}
public RazorfieldRhino (final RazorfieldRhino card) {
public RazorfieldRhino(final RazorfieldRhino card) {
super(card);
}

View file

@ -1,38 +1,38 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class RustedRelic extends CardImpl {
public RustedRelic (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
public RustedRelic(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
// Metalcraft Rusted Relic is a 5/5 Golem artifact creature as long as you control three or more artifacts.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(
new BecomesCreatureSourceEffect(new RustedRelicToken(), "artifact", Duration.WhileOnBattlefield),
MetalcraftCondition.instance,
"<i>Metalcraft</i> &mdash; {this} is a 5/5 Golem artifact creature as long as you control three or more artifacts")));
new ConditionalContinuousEffect(
new BecomesCreatureSourceEffect(new RustedRelicToken(), "artifact", Duration.WhileOnBattlefield),
MetalcraftCondition.instance,
"<i>Metalcraft</i> &mdash; {this} is a 5/5 Golem artifact creature as long as you control three or more artifacts"))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public RustedRelic (final RustedRelic card) {
public RustedRelic(final RustedRelic card) {
super(card);
}
@ -51,6 +51,7 @@ class RustedRelicToken extends TokenImpl {
power = new MageInt(5);
toughness = new MageInt(5);
}
public RustedRelicToken(final RustedRelicToken token) {
super(token);
}

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import mage.MageInt;
@ -7,9 +6,11 @@ import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
@ -23,10 +24,10 @@ public final class ScreechingSilcaw extends CardImpl {
public ScreechingSilcaw(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.subtype.add(SubType.BIRD);
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// Flying
this.addAbility(FlyingAbility.getInstance());
//"<i>Metalcraft</i> &mdash; Whenever Screeching Silcaw deals combat damage to a player, if you control three or more artifacts, that player puts the top four cards of their library into their graveyard.
@ -36,6 +37,8 @@ public final class ScreechingSilcaw extends CardImpl {
), MetalcraftCondition.instance, "<i>Metalcraft</i> &mdash; Whenever {this} " +
"deals combat damage to a player, if you control three or more artifacts, that player mills four cards."
);
conditional.setAbilityWord(AbilityWord.METALCRAFT);
conditional.addHint(MetalcraftHint.instance);
this.addAbility(conditional);
}

View file

@ -1,40 +1,40 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author Loki, nantuko
*/
public final class SnapsailGlider extends CardImpl {
protected static String rule = "<i>Metalcraft</i> &mdash; Snapsail Glider has flying as long as you control three or more artifacts";
public SnapsailGlider (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}");
public SnapsailGlider(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
this.subtype.add(SubType.CONSTRUCT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Metalcraft Snapsail Glider has flying as long as you control three or more artifacts.
ContinuousEffect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, rule)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, rule))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance));
}
public SnapsailGlider (final SnapsailGlider card) {
public SnapsailGlider(final SnapsailGlider card) {
super(card);
}

View file

@ -1,23 +1,20 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author North
*/
public final class SpiralingDuelist extends CardImpl {
@ -25,15 +22,17 @@ public final class SpiralingDuelist extends CardImpl {
private static final String effectText = "<i>Metalcraft</i> &mdash; Spiraling Duelist has double strike as long as you control three or more artifacts.";
public SpiralingDuelist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.BERSERKER);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// Metalcraft Spiraling Duelist has double strike as long as you control three or more artifacts.
ContinuousEffect effect = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, effectText)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(effect, MetalcraftCondition.instance, effectText))
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance));
}
public SpiralingDuelist(final SpiralingDuelist card) {

View file

@ -1,7 +1,5 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@ -11,16 +9,15 @@ import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.*;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public final class SpireSerpent extends CardImpl {
@ -28,19 +25,24 @@ public final class SpireSerpent extends CardImpl {
private static final String abilityText1 = "<i>Metalcraft</i> &mdash; As long as you control three or more artifacts, {this} gets +2/+2";
public SpireSerpent(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
this.subtype.add(SubType.SERPENT);
this.color.setBlue(true);
this.power = new MageInt(3);
this.toughness = new MageInt(5);
// Defender
this.addAbility(DefenderAbility.getInstance());
// Metalcraft As long as you control three or more artifacts, Spire Serpent gets +2/+2 and can attack as though it didnt have defender.
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), MetalcraftCondition.instance, abilityText1);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1);
Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
MetalcraftCondition.instance);
effect.setText("and can attack as though it didn't have defender");
ability.addEffect(effect);
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}

View file

@ -1,11 +1,11 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
@ -13,6 +13,8 @@ import mage.constants.CardType;
import mage.constants.Zone;
import mage.target.TargetSpell;
import java.util.UUID;
/**
* @author ayrat
*/
@ -25,6 +27,7 @@ public final class StoicRebuttal extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(1, MetalcraftCondition.instance));
ability.setRuleAtTheTop(true);
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
// Counter target spell.

View file

@ -1,6 +1,5 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.condition.common.MetalcraftCondition;
@ -8,16 +7,19 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.GetEmblemEffect;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.game.command.emblems.TezzeretArtificeMasterEmblem;
import mage.game.permanent.token.ThopterColorlessToken;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class TezzeretArtificeMaster extends CardImpl {
@ -38,8 +40,10 @@ public final class TezzeretArtificeMaster extends CardImpl {
new DrawCardSourceControllerEffect(1),
MetalcraftCondition.instance,
"Draw a card. If you control three or "
+ "more artifacts, draw two cards instead"
), 0));
+ "more artifacts, draw two cards instead"
), 0)
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance));
// 9: You get an emblem with "At the beginning of your end step, search your library for a permanent card, put it into the battlefield, then shuffle your library."
this.addAbility(new LoyaltyAbility(

View file

@ -1,14 +1,12 @@
package mage.cards.v;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
@ -19,9 +17,10 @@ import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class VedalkenCertarch extends CardImpl {
@ -34,22 +33,22 @@ public final class VedalkenCertarch extends CardImpl {
CardType.LAND.getPredicate()));
}
public VedalkenCertarch (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
public VedalkenCertarch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
this.subtype.add(SubType.VEDALKEN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// <i>Metalcraft</i> &mdash; {T}: Tap target artifact, creature, or land. Activate this ability only if you control three or more artifacts.
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost(), MetalcraftCondition.instance);
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addTarget(new TargetPermanent(filter));
ability.setAbilityWord(AbilityWord.METALCRAFT);
ability.addHint(MetalcraftHint.instance);
this.addAbility(ability);
}
public VedalkenCertarch (final VedalkenCertarch card) {
public VedalkenCertarch(final VedalkenCertarch card) {
super(card);
}

View file

@ -1,6 +1,5 @@
package mage.cards.v;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.AttacksTriggeredAbility;
@ -8,15 +7,18 @@ import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.continuous.LoseAllAbilitiesAllEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessAllEffect;
import mage.constants.SubType;
import mage.abilities.hint.common.MetalcraftHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class VedalkenHumiliator extends CardImpl {
@ -44,10 +46,12 @@ public final class VedalkenHumiliator extends CardImpl {
this.addAbility(new ConditionalTriggeredAbility(
ability, MetalcraftCondition.instance,
"<i>Metalcraft</i> &mdash; Whenever {this} attacks, "
+ "if you control three or more artifacts, "
+ "creatures your opponents control lose all abilities "
+ "and have base power and toughness 1/1 until end of turn."
));
+ "if you control three or more artifacts, "
+ "creatures your opponents control lose all abilities "
+ "and have base power and toughness 1/1 until end of turn.")
.setAbilityWord(AbilityWord.METALCRAFT)
.addHint(MetalcraftHint.instance)
);
}
public VedalkenHumiliator(final VedalkenHumiliator card) {

View file

@ -453,7 +453,7 @@ public interface Ability extends Controllable, Serializable {
*
* @param abilityWord
*/
void setAbilityWord(AbilityWord abilityWord);
Ability setAbilityWord(AbilityWord abilityWord);
/**
* Creates the message about the ability casting/triggering/activating to

View file

@ -1,9 +1,5 @@
package mage.abilities;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.costs.*;
import mage.abilities.costs.common.PayLifeCost;
@ -35,6 +31,11 @@ import mage.util.ThreadLocalStringBuilder;
import mage.watchers.Watcher;
import org.apache.log4j.Logger;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -1021,8 +1022,9 @@ public abstract class AbilityImpl implements Ability {
}
@Override
public void setAbilityWord(AbilityWord abilityWord) {
public Ability setAbilityWord(AbilityWord abilityWord) {
this.abilityWord = abilityWord;
return this;
}
@Override

View file

@ -0,0 +1,34 @@
package mage.abilities.hint.common;
import mage.abilities.Ability;
import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.game.Game;
/**
* @author JayDi85
*/
public enum MetalcraftHint implements Hint {
instance;
private static final ConditionHint hint = new ConditionHint(MetalcraftCondition.instance, "You control three or more artifacts");
private static final FilterPermanent filter = new FilterPermanent("artifact");
static {
filter.add(CardType.ARTIFACT.getPredicate());
}
@Override
public String getText(Game game, Ability ability) {
int amount = game.getBattlefield().countAll(filter, ability.getControllerId(), game);
return hint.getText(game, ability) + " (current: " + amount + ")";
}
@Override
public Hint copy() {
return instance;
}
}

View file

@ -472,7 +472,7 @@ public class StackAbility extends StackObjImpl implements Ability {
}
@Override
public void setAbilityWord(AbilityWord abilityWord) {
public Ability setAbilityWord(AbilityWord abilityWord) {
throw new UnsupportedOperationException("Not supported.");
}