foul-magics/Mage.Sets/src/mage/cards/f/FurnaceDragon.java
ninthworld 86107de54e Merge remote-tracking branch 'upstream/master'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2018-07-16 21:16:20 -07:00

60 lines
2 KiB
Java

package mage.cards.f;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.CastFromHandSourceCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.ExileAllEffect;
import mage.abilities.keyword.AffinityForArtifactsAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.watchers.common.CastFromHandWatcher;
/**
*
* @author fireshoes
*/
public final class FurnaceDragon extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("artifacts");
static {
filter.add(new CardTypePredicate(CardType.ARTIFACT));
}
public FurnaceDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{R}{R}{R}");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Affinity for artifacts
this.addAbility(new AffinityForArtifactsAbility());
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Furnace Dragon enters the battlefield, if you cast it from your hand, exile all artifacts.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new ExileAllEffect(filter), false),
CastFromHandSourceCondition.instance,
"When {this} enters the battlefield, if you cast it from your hand, exile all artifacts."),
new CastFromHandWatcher());
}
public FurnaceDragon(final FurnaceDragon card) {
super(card);
}
@Override
public FurnaceDragon copy() {
return new FurnaceDragon(this);
}
}