mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
[ECL] Implement Creakwood Safewright
This commit is contained in:
parent
6e3f83246e
commit
67f86b21d9
2 changed files with 67 additions and 0 deletions
66
Mage.Sets/src/mage/cards/c/CreakwoodSafewright.java
Normal file
66
Mage.Sets/src/mage/cards/c/CreakwoodSafewright.java
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.CompoundCondition;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CreakwoodSafewright extends CardImpl {
|
||||
|
||||
private static final Condition condition = new CompoundCondition(
|
||||
"there is an Elf card in your graveyard and {this} has a -1/-1 counter on it",
|
||||
new CardsInControllerGraveyardCondition(1, new FilterCard(SubType.ELF)),
|
||||
new SourceHasCounterCondition(CounterType.M1M1)
|
||||
);
|
||||
private static final Hint hint = new ConditionHint(
|
||||
new CardsInControllerGraveyardCondition(1, new FilterCard(SubType.ELF)),
|
||||
"There is an Elf card in your graveyard"
|
||||
);
|
||||
|
||||
public CreakwoodSafewright(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// This creature enters with three -1/-1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.M1M1.createInstance(3)),
|
||||
"with three -1/-1 counters on it"
|
||||
));
|
||||
|
||||
// At the beginning of your end step, if there is an Elf card in your graveyard and this creature has a -1/-1 counter on it, remove a -1/-1 counter from this creature.
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||
new RemoveCounterSourceEffect(CounterType.M1M1.createInstance())
|
||||
).withInterveningIf(condition).addHint(hint));
|
||||
}
|
||||
|
||||
private CreakwoodSafewright(final CreakwoodSafewright card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreakwoodSafewright copy() {
|
||||
return new CreakwoodSafewright(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +86,7 @@ public final class LorwynEclipsed extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Chomping Changeling", 172, Rarity.UNCOMMON, mage.cards.c.ChompingChangeling.class));
|
||||
cards.add(new SetCardInfo("Cinder Strike", 131, Rarity.COMMON, mage.cards.c.CinderStrike.class));
|
||||
cards.add(new SetCardInfo("Clachan Festival", 10, Rarity.UNCOMMON, mage.cards.c.ClachanFestival.class));
|
||||
cards.add(new SetCardInfo("Creakwood Safewright", 96, Rarity.UNCOMMON, mage.cards.c.CreakwoodSafewright.class));
|
||||
cards.add(new SetCardInfo("Crib Swap", 11, Rarity.UNCOMMON, mage.cards.c.CribSwap.class));
|
||||
cards.add(new SetCardInfo("Crossroads Watcher", 173, Rarity.COMMON, mage.cards.c.CrossroadsWatcher.class));
|
||||
cards.add(new SetCardInfo("Darkness Descends", 97, Rarity.UNCOMMON, mage.cards.d.DarknessDescends.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue