forked from External/mage
[MID] Implemented Flame Channeler / Embodiment of Flame
This commit is contained in:
parent
7c62d9ef4f
commit
3e679afcfa
4 changed files with 174 additions and 0 deletions
93
Mage.Sets/src/mage/cards/e/EmbodimentOfFlame.java
Normal file
93
Mage.Sets/src/mage/cards/e/EmbodimentOfFlame.java
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.ExileTopXMayPlayUntilEndOfTurnEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EmbodimentOfFlame extends CardImpl {
|
||||
|
||||
public EmbodimentOfFlame(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
this.color.setRed(true);
|
||||
this.nightCard = true;
|
||||
this.transformable = true;
|
||||
|
||||
// Whenever a spell you control deals damage, put a flame counter on Embodiment of Flame.
|
||||
this.addAbility(new EmbodimentOfFlameTriggeredAbility());
|
||||
|
||||
// {1}, Remove a flame counter from Embodiment of Flame: Exile the top card of your library. You may play that card this turn.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new ExileTopXMayPlayUntilEndOfTurnEffect(1)
|
||||
.setText("exile the top card of your library. You may play that card this turn"),
|
||||
new GenericManaCost(1)
|
||||
);
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.FLAME.createInstance()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private EmbodimentOfFlame(final EmbodimentOfFlame card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmbodimentOfFlame copy() {
|
||||
return new EmbodimentOfFlame(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EmbodimentOfFlameTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
EmbodimentOfFlameTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.FLAME.createInstance()));
|
||||
}
|
||||
|
||||
private EmbodimentOfFlameTriggeredAbility(final EmbodimentOfFlameTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmbodimentOfFlameTriggeredAbility copy() {
|
||||
return new EmbodimentOfFlameTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PERMANENT
|
||||
|| event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Spell spell = game.getSpellOrLKIStack(event.getSourceId());
|
||||
return spell != null && isControlledBy(spell.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a spell you control deals damage, put a flame counter on {this}.";
|
||||
}
|
||||
}
|
||||
78
Mage.Sets/src/mage/cards/f/FlameChanneler.java
Normal file
78
Mage.Sets/src/mage/cards/f/FlameChanneler.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FlameChanneler extends CardImpl {
|
||||
|
||||
public FlameChanneler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
this.transformable=true;this.secondSideCardClazz=mage.cards.e.EmbodimentOfFlame.class;
|
||||
|
||||
// When a spell you control deals damage, transform Flame Channeler.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new FlameChannelerTriggeredAbility());
|
||||
}
|
||||
|
||||
private FlameChanneler(final FlameChanneler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlameChanneler copy() {
|
||||
return new FlameChanneler(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FlameChannelerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
FlameChannelerTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new TransformSourceEffect(true));
|
||||
}
|
||||
|
||||
private FlameChannelerTriggeredAbility(final FlameChannelerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlameChannelerTriggeredAbility copy() {
|
||||
return new FlameChannelerTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PERMANENT
|
||||
|| event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Spell spell = game.getSpellOrLKIStack(event.getSourceId());
|
||||
return spell != null && isControlledBy(spell.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When a spell you control deals damage, transform {this}.";
|
||||
}
|
||||
}
|
||||
|
|
@ -51,9 +51,11 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dire-Strain Demolisher", 174, Rarity.UNCOMMON, mage.cards.d.DireStrainDemolisher.class));
|
||||
cards.add(new SetCardInfo("Diregraf Rebirth", 220, Rarity.UNCOMMON, mage.cards.d.DiregrafRebirth.class));
|
||||
cards.add(new SetCardInfo("Dissipate", 49, Rarity.UNCOMMON, mage.cards.d.Dissipate.class));
|
||||
cards.add(new SetCardInfo("Embodiment of Flame", 141, Rarity.UNCOMMON, mage.cards.e.EmbodimentOfFlame.class));
|
||||
cards.add(new SetCardInfo("Faithful Mending", 221, Rarity.UNCOMMON, mage.cards.f.FaithfulMending.class));
|
||||
cards.add(new SetCardInfo("Famished Foragers", 138, Rarity.COMMON, mage.cards.f.FamishedForagers.class));
|
||||
cards.add(new SetCardInfo("Festival Crasher", 140, Rarity.COMMON, mage.cards.f.FestivalCrasher.class));
|
||||
cards.add(new SetCardInfo("Flame Channeler", 141, Rarity.UNCOMMON, mage.cards.f.FlameChanneler.class));
|
||||
cards.add(new SetCardInfo("Fleshtaker", 222, Rarity.UNCOMMON, mage.cards.f.Fleshtaker.class));
|
||||
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class));
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ public enum CounterType {
|
|||
FETCH("fetch"),
|
||||
FILIBUSTER("filibuster"),
|
||||
FIRST_STRIKE("first strike"),
|
||||
FLAME("flame"),
|
||||
FLOOD("flood"),
|
||||
FLYING("flying"),
|
||||
FORESHADOW("foreshadow"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue