forked from External/mage
Implemented Chandra's Embercat
This commit is contained in:
parent
01e4193b09
commit
58c8202c7c
2 changed files with 85 additions and 0 deletions
84
Mage.Sets/src/mage/cards/c/ChandrasEmbercat.java
Normal file
84
Mage.Sets/src/mage/cards/c/ChandrasEmbercat.java
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.mana.ConditionalColoredManaAbility;
|
||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||
import mage.abilities.mana.conditional.CreatureCastManaCondition;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ChandrasEmbercat extends CardImpl {
|
||||
|
||||
public ChandrasEmbercat(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {T}: Add {R}. Spend this mana only to cast an Elemental spell or a Chandra planeswalker spell.
|
||||
this.addAbility(new ConditionalColoredManaAbility(
|
||||
new TapSourceCost(), Mana.RedMana(1),
|
||||
new ChandrasEmbercatManaBuilder()
|
||||
));
|
||||
}
|
||||
|
||||
private ChandrasEmbercat(final ChandrasEmbercat card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChandrasEmbercat copy() {
|
||||
return new ChandrasEmbercat(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ChandrasEmbercatManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
return new ChandrasEmbercatConditionalMana(this.mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Spend this mana only to cast an Elemental spell or a Chandra planeswalker spell.";
|
||||
}
|
||||
}
|
||||
|
||||
class ChandrasEmbercatManaCondition extends CreatureCastManaCondition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (super.apply(game, source)) {
|
||||
MageObject object = game.getObject(source.getSourceId());
|
||||
if (object != null && object.hasSubtype(SubType.ELEMENTAL, game)
|
||||
|| (object.hasSubtype(SubType.CHANDRA, game) && object.isPlaneswalker())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class ChandrasEmbercatConditionalMana extends ConditionalMana {
|
||||
|
||||
ChandrasEmbercatConditionalMana(Mana mana) {
|
||||
super(mana);
|
||||
addCondition(new ChandrasEmbercatManaCondition());
|
||||
}
|
||||
}
|
||||
|
|
@ -32,6 +32,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Barkhide Troll", 165, Rarity.UNCOMMON, mage.cards.b.BarkhideTroll.class));
|
||||
cards.add(new SetCardInfo("Bone Splinters", 92, Rarity.COMMON, mage.cards.b.BoneSplinters.class));
|
||||
cards.add(new SetCardInfo("Captivating Gyre", 51, Rarity.UNCOMMON, mage.cards.c.CaptivatingGyre.class));
|
||||
cards.add(new SetCardInfo("Chandra's Embercat", 129, Rarity.COMMON, mage.cards.c.ChandrasEmbercat.class));
|
||||
cards.add(new SetCardInfo("Chandra's Spitfire", 132, Rarity.UNCOMMON, mage.cards.c.ChandrasSpitfire.class));
|
||||
cards.add(new SetCardInfo("Chandra, Acolyte of Flame", 126, Rarity.RARE, mage.cards.c.ChandraAcolyteOfFlame.class));
|
||||
cards.add(new SetCardInfo("Chandra, Awakened Inferno", 127, Rarity.MYTHIC, mage.cards.c.ChandraAwakenedInferno.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue