mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Implemented Emiel the Blessed
This commit is contained in:
parent
f589d861f4
commit
7750dde6b8
2 changed files with 97 additions and 0 deletions
96
Mage.Sets/src/mage/cards/e/EmielTheBlessed.java
Normal file
96
Mage.Sets/src/mage/cards/e/EmielTheBlessed.java
Normal file
|
@ -0,0 +1,96 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.ExileTargetForSourceEffect;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EmielTheBlessed extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another target creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public EmielTheBlessed(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.UNICORN);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// {3}: Exile another target creature you control, then return it to the battlefield under its owner's control.
|
||||
Ability ability = new SimpleActivatedAbility(new ExileTargetForSourceEffect(), new GenericManaCost(3));
|
||||
ability.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever another creature enters the battlefield under your control, you may pay {G/W}. If you do, put a +1/+1 counter on it. If it's a Unicorn, put two +1/+1 counters on it instead.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new DoIfCostPaid(new EmielTheBlessedEffect(), new ManaCostsImpl<>("{G/W}")),
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false, SetTargetPointer.PERMANENT,
|
||||
"Whenever another creature enters the battlefield under your control, you may pay {G/W}. " +
|
||||
"If you do, put a +1/+1 counter on it. If it's a Unicorn, put two +1/+1 counters on it instead."
|
||||
));
|
||||
}
|
||||
|
||||
private EmielTheBlessed(final EmielTheBlessed card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmielTheBlessed copy() {
|
||||
return new EmielTheBlessed(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EmielTheBlessedEffect extends OneShotEffect {
|
||||
|
||||
EmielTheBlessedEffect() {
|
||||
super(Outcome.Benefit);
|
||||
}
|
||||
|
||||
private EmielTheBlessedEffect(final EmielTheBlessedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmielTheBlessedEffect copy() {
|
||||
return new EmielTheBlessedEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
int counters = permanent.hasSubtype(SubType.UNICORN, game) ? 2 : 1;
|
||||
return permanent.addCounters(CounterType.P1P1.createInstance(counters), source, game);
|
||||
}
|
||||
}
|
|
@ -148,6 +148,7 @@ public final class Jumpstart extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Elemental Uprising", 390, Rarity.COMMON, mage.cards.e.ElementalUprising.class));
|
||||
cards.add(new SetCardInfo("Elvish Archdruid", 391, Rarity.RARE, mage.cards.e.ElvishArchdruid.class));
|
||||
cards.add(new SetCardInfo("Emancipation Angel", 102, Rarity.UNCOMMON, mage.cards.e.EmancipationAngel.class));
|
||||
cards.add(new SetCardInfo("Emiel the Blessed", 3, Rarity.MYTHIC, mage.cards.e.EmielTheBlessed.class));
|
||||
cards.add(new SetCardInfo("Enlarge", 392, Rarity.UNCOMMON, mage.cards.e.Enlarge.class));
|
||||
cards.add(new SetCardInfo("Entomber Exarch", 227, Rarity.UNCOMMON, mage.cards.e.EntomberExarch.class));
|
||||
cards.add(new SetCardInfo("Erratic Visionary", 150, Rarity.COMMON, mage.cards.e.ErraticVisionary.class));
|
||||
|
|
Loading…
Reference in a new issue