mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Added Furnace Dragon. Fixed duplicate verse type in CounterType.
This commit is contained in:
parent
4b5401c825
commit
dd6f0f86a0
2 changed files with 107 additions and 1 deletions
107
Mage.Sets/src/mage/sets/darksteel/FurnaceDragon.java
Normal file
107
Mage.Sets/src/mage/sets/darksteel/FurnaceDragon.java
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.sets.darksteel;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
|
import mage.abilities.effects.common.ExileAllEffect;
|
||||||
|
import mage.abilities.keyword.AffinityForArtifactsAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.watchers.Watcher;
|
||||||
|
import mage.watchers.common.CastFromHandWatcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fireshoes
|
||||||
|
*/
|
||||||
|
public class FurnaceDragon extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterPermanent("artifacts");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||||
|
}
|
||||||
|
|
||||||
|
public FurnaceDragon(UUID ownerId) {
|
||||||
|
super(ownerId, 62, "Furnace Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{R}{R}{R}");
|
||||||
|
this.expansionSetCode = "DST";
|
||||||
|
this.subtype.add("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 EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(new ExileAllEffect(filter), new FurnaceDragonCondition()), false), new CastFromHandWatcher());
|
||||||
|
}
|
||||||
|
|
||||||
|
public FurnaceDragon(final FurnaceDragon card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FurnaceDragon copy() {
|
||||||
|
return new FurnaceDragon(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FurnaceDragonCondition implements Condition {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
boolean applies = false;
|
||||||
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
|
if (permanent != null) {
|
||||||
|
Watcher watcher = game.getState().getWatchers().get("CastFromHand", source.getSourceId());
|
||||||
|
if (watcher != null && watcher.conditionMet()) {
|
||||||
|
applies = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return applies;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "you cast it from your hand";
|
||||||
|
}
|
||||||
|
}
|
|
@ -87,7 +87,6 @@ public enum CounterType {
|
||||||
VELOCITY("velocity"),
|
VELOCITY("velocity"),
|
||||||
VERSE("verse"),
|
VERSE("verse"),
|
||||||
VILE("vile"),
|
VILE("vile"),
|
||||||
VERSE("verse"),
|
|
||||||
WISH("wish");
|
WISH("wish");
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
Loading…
Reference in a new issue