mirror of
https://github.com/correl/mage.git
synced 2025-04-11 09:11:12 -09:00
[MH2] Implemented Ragavan, Nimble Pilferer
This commit is contained in:
parent
ffd681a0ec
commit
395faf8115
2 changed files with 87 additions and 0 deletions
Mage.Sets/src/mage
86
Mage.Sets/src/mage/cards/r/RagavanNimblePilferer.java
Normal file
86
Mage.Sets/src/mage/cards/r/RagavanNimblePilferer.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.keyword.DashAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RagavanNimblePilferer extends CardImpl {
|
||||
|
||||
public RagavanNimblePilferer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.MONKEY);
|
||||
this.subtype.add(SubType.PIRATE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever Ragavan, Nimble Pilferer deals combat damage to a player, create a Treasure token and exile the top card of that player's library. Until end of turn, you may cast that card.
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new CreateTokenEffect(new TreasureToken()), false, true
|
||||
);
|
||||
ability.addEffect(new RagavanNimblePilfererEffect());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Dash {1}{R}
|
||||
this.addAbility(new DashAbility(this, "{1}{R}"));
|
||||
}
|
||||
|
||||
private RagavanNimblePilferer(final RagavanNimblePilferer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RagavanNimblePilferer copy() {
|
||||
return new RagavanNimblePilferer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RagavanNimblePilfererEffect extends OneShotEffect {
|
||||
|
||||
RagavanNimblePilfererEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "and exile the top card of that player's library. Until end of turn, you may cast that card";
|
||||
}
|
||||
|
||||
private RagavanNimblePilfererEffect(final RagavanNimblePilfererEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RagavanNimblePilfererEffect copy() {
|
||||
return new RagavanNimblePilfererEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (controller == null || player == null) {
|
||||
return false;
|
||||
}
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
return PlayFromNotOwnHandZoneTargetEffect.exileAndPlayFromExile(
|
||||
game, source, card, TargetController.YOU, Duration.EndOfTurn, false, true
|
||||
);
|
||||
}
|
||||
}
|
|
@ -213,6 +213,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Prophetic Titan", 209, Rarity.UNCOMMON, mage.cards.p.PropheticTitan.class));
|
||||
cards.add(new SetCardInfo("Quirion Ranger", 285, Rarity.UNCOMMON, mage.cards.q.QuirionRanger.class));
|
||||
cards.add(new SetCardInfo("Radiant Epicure", 98, Rarity.UNCOMMON, mage.cards.r.RadiantEpicure.class));
|
||||
cards.add(new SetCardInfo("Ragavan, Nimble Pilferer", 138, Rarity.MYTHIC, mage.cards.r.RagavanNimblePilferer.class));
|
||||
cards.add(new SetCardInfo("Rakdos Headliner", 210, Rarity.UNCOMMON, mage.cards.r.RakdosHeadliner.class));
|
||||
cards.add(new SetCardInfo("Ravenous Squirrel", 211, Rarity.UNCOMMON, mage.cards.r.RavenousSquirrel.class));
|
||||
cards.add(new SetCardInfo("Raving Visionary", 56, Rarity.UNCOMMON, mage.cards.r.RavingVisionary.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue