mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
Implemented Dwarven Mine
This commit is contained in:
parent
0d4bea3c4d
commit
61bf0f758d
3 changed files with 93 additions and 0 deletions
64
Mage.Sets/src/mage/cards/d/DwarvenMine.java
Normal file
64
Mage.Sets/src/mage/cards/d/DwarvenMine.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldUntappedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.permanent.token.DwarfToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DwarvenMine extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent(SubType.MOUNTAIN);
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
private static final Condition condition
|
||||
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3);
|
||||
|
||||
public DwarvenMine(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
this.subtype.add(SubType.MOUNTAIN);
|
||||
|
||||
// ({T}: Add {R}.)
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
||||
// Dwarven Mine enters the battlefield tapped unless you control three or more other Mountains.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new ConditionalOneShotEffect(new TapSourceEffect(), condition),
|
||||
"tapped unless you control three or more other Mountains"
|
||||
));
|
||||
|
||||
// When Dwarven Mine enters the battlefield untapped, create a 1/1 red Dwarf creature token.
|
||||
this.addAbility(new EntersBattlefieldUntappedTriggeredAbility(new CreateTokenEffect(new DwarfToken()), false));
|
||||
}
|
||||
|
||||
private DwarvenMine(final DwarvenMine card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DwarvenMine copy() {
|
||||
return new DwarvenMine(this);
|
||||
}
|
||||
}
|
|
@ -76,6 +76,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Didn't Say Please", 42, Rarity.COMMON, mage.cards.d.DidntSayPlease.class));
|
||||
cards.add(new SetCardInfo("Doom Foretold", 187, Rarity.RARE, mage.cards.d.DoomForetold.class));
|
||||
cards.add(new SetCardInfo("Drown in the Loch", 188, Rarity.UNCOMMON, mage.cards.d.DrownInTheLoch.class));
|
||||
cards.add(new SetCardInfo("Dwarven Mine", 243, Rarity.COMMON, mage.cards.d.DwarvenMine.class));
|
||||
cards.add(new SetCardInfo("Edgewall Innkeeper", 151, Rarity.UNCOMMON, mage.cards.e.EdgewallInnkeeper.class));
|
||||
cards.add(new SetCardInfo("Elite Headhunter", 209, Rarity.UNCOMMON, mage.cards.e.EliteHeadhunter.class));
|
||||
cards.add(new SetCardInfo("Embercleave", 120, Rarity.MYTHIC, mage.cards.e.Embercleave.class));
|
||||
|
|
28
Mage/src/main/java/mage/game/permanent/token/DwarfToken.java
Normal file
28
Mage/src/main/java/mage/game/permanent/token/DwarfToken.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DwarfToken extends TokenImpl {
|
||||
|
||||
public DwarfToken() {
|
||||
super("Dwarf", "1/1 red Dwarf creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add(SubType.DWARF);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
|
||||
private DwarfToken(final DwarfToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public DwarfToken copy() {
|
||||
return new DwarfToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue