mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Implemented Nicol Bolas, the Ravager/Nicol Bolas, the Arisen
This commit is contained in:
parent
f55d0e6706
commit
64e7deab81
3 changed files with 175 additions and 0 deletions
110
Mage.Sets/src/mage/cards/n/NicolBolasTheArisen.java
Normal file
110
Mage.Sets/src/mage/cards/n/NicolBolasTheArisen.java
Normal file
|
@ -0,0 +1,110 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NicolBolasTheArisen extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("creature or planeswalker card from a graveyard");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.PLANESWALKER)
|
||||
));
|
||||
}
|
||||
|
||||
public NicolBolasTheArisen(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.BOLAS);
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setRed(true);
|
||||
this.nightCard = true;
|
||||
this.transformable = true;
|
||||
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(7));
|
||||
|
||||
// +2: Draw two cards.
|
||||
this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(2), 2));
|
||||
|
||||
// −3: Nicol Bolas, the Arisen deals 10 damage to target creature or planeswalker.
|
||||
Ability ability = new LoyaltyAbility(new DamageTargetEffect(10), -3);
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
|
||||
// −4: Put target creature or planeswalker card from a graveyard onto the battlefield under your control.
|
||||
ability = new LoyaltyAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), -4);
|
||||
ability.addTarget(new TargetCardInGraveyard(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// −12: Exile all but the bottom card of target player's library.
|
||||
ability = new LoyaltyAbility(new NicolBolasTheArisenEffect(), -12);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public NicolBolasTheArisen(final NicolBolasTheArisen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NicolBolasTheArisen copy() {
|
||||
return new NicolBolasTheArisen(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NicolBolasTheArisenEffect extends OneShotEffect {
|
||||
|
||||
public NicolBolasTheArisenEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Exile all but the bottom card of target player's library.";
|
||||
}
|
||||
|
||||
public NicolBolasTheArisenEffect(final NicolBolasTheArisenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NicolBolasTheArisenEffect copy() {
|
||||
return new NicolBolasTheArisenEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (targetPlayer == null || controller == null) {
|
||||
return false;
|
||||
}
|
||||
return controller.moveCards(targetPlayer.getLibrary().getTopCards(game, targetPlayer.getLibrary().size() - 1), Zone.EXILED, source, game);
|
||||
}
|
||||
}
|
63
Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java
Normal file
63
Mage.Sets/src/mage/cards/n/NicolBolasTheRavager.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Gender;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NicolBolasTheRavager extends CardImpl {
|
||||
|
||||
public NicolBolasTheRavager(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ELDER);
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
this.transformable = true;
|
||||
this.secondSideCardClazz = NicolBolasTheArisen.class;
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Nicol Bolas, the Ravager enters the battlefield, each opponent discards a card.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(new StaticValue(1), false, TargetController.OPPONENT)));
|
||||
|
||||
// {4}{U}{B}{R}: Exile Nicol Bolas, the Ravager, then return him to the battlefield transformed under his owner's control. Activate this ability only any time you could cast a sorcerry.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new ActivateAsSorceryActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ExileAndReturnTransformedSourceEffect(Gender.MALE),
|
||||
new ManaCostsImpl("{4}{U}{B}{R}")
|
||||
));
|
||||
}
|
||||
|
||||
public NicolBolasTheRavager(final NicolBolasTheRavager card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NicolBolasTheRavager copy() {
|
||||
return new NicolBolasTheRavager(this);
|
||||
}
|
||||
}
|
|
@ -102,6 +102,8 @@ public final class CoreSet2019 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mist-Cloaked Herald", 310, Rarity.COMMON, mage.cards.m.MistCloakedHerald.class));
|
||||
cards.add(new SetCardInfo("Murder", 110, Rarity.UNCOMMON, mage.cards.m.Murder.class));
|
||||
cards.add(new SetCardInfo("Nexus of Fate", 306, Rarity.MYTHIC, mage.cards.n.NexusOfFate.class));
|
||||
cards.add(new SetCardInfo("Nicol Bolas, the Arisen", 218, Rarity.MYTHIC, mage.cards.n.NicolBolasTheArisen.class));
|
||||
cards.add(new SetCardInfo("Nicol Bolas, the Ravager", 218, Rarity.MYTHIC, mage.cards.n.NicolBolasTheRavager.class));
|
||||
cards.add(new SetCardInfo("Oakenform", 191, Rarity.COMMON, mage.cards.o.Oakenform.class));
|
||||
cards.add(new SetCardInfo("Omenspeaker", 64, Rarity.COMMON, mage.cards.o.Omenspeaker.class));
|
||||
cards.add(new SetCardInfo("Onakke Ogre", 153, Rarity.COMMON, mage.cards.o.OnakkeOgre.class));
|
||||
|
|
Loading…
Reference in a new issue