mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
[TDM] Implement Sunpearl Kirin
This commit is contained in:
parent
aad92581ce
commit
31f1528360
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/s/SunpearlKirin.java
Normal file
95
Mage.Sets/src/mage/cards/s/SunpearlKirin.java
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.PermanentToken;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class SunpearlKirin extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterNonlandPermanent("other target nonland permanent you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
filter.add(TargetController.YOU.getControllerPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SunpearlKirin(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.KIRIN);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Flash
|
||||||
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// When this creature enters, return up to one other target nonland permanent you control to its owner's hand. If it was a token, draw a card.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new SunpearlKirinEffect());
|
||||||
|
ability.addTarget(new TargetPermanent(0, 1, filter));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SunpearlKirin(final SunpearlKirin card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SunpearlKirin copy() {
|
||||||
|
return new SunpearlKirin(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SunpearlKirinEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
SunpearlKirinEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "return up to one other target nonland permanent " +
|
||||||
|
"you control to its owner's hand. If it was a token, draw a card";
|
||||||
|
}
|
||||||
|
|
||||||
|
private SunpearlKirinEffect(final SunpearlKirinEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SunpearlKirinEffect copy() {
|
||||||
|
return new SunpearlKirinEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
|
if (player == null || permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
boolean isToken = permanent instanceof PermanentToken;
|
||||||
|
player.moveCards(permanent, Zone.HAND, source, game);
|
||||||
|
if (isToken) {
|
||||||
|
player.drawCards(1, source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -212,6 +212,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Sultai Devotee", 160, Rarity.COMMON, mage.cards.s.SultaiDevotee.class));
|
cards.add(new SetCardInfo("Sultai Devotee", 160, Rarity.COMMON, mage.cards.s.SultaiDevotee.class));
|
||||||
cards.add(new SetCardInfo("Sultai Monument", 247, Rarity.UNCOMMON, mage.cards.s.SultaiMonument.class));
|
cards.add(new SetCardInfo("Sultai Monument", 247, Rarity.UNCOMMON, mage.cards.s.SultaiMonument.class));
|
||||||
cards.add(new SetCardInfo("Summit Intimidator", 125, Rarity.COMMON, mage.cards.s.SummitIntimidator.class));
|
cards.add(new SetCardInfo("Summit Intimidator", 125, Rarity.COMMON, mage.cards.s.SummitIntimidator.class));
|
||||||
|
cards.add(new SetCardInfo("Sunpearl Kirin", 29, Rarity.UNCOMMON, mage.cards.s.SunpearlKirin.class));
|
||||||
cards.add(new SetCardInfo("Sunset Strikemaster", 126, Rarity.UNCOMMON, mage.cards.s.SunsetStrikemaster.class));
|
cards.add(new SetCardInfo("Sunset Strikemaster", 126, Rarity.UNCOMMON, mage.cards.s.SunsetStrikemaster.class));
|
||||||
cards.add(new SetCardInfo("Swamp", 281, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Swamp", 281, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Swiftwater Cliffs", 268, Rarity.COMMON, mage.cards.s.SwiftwaterCliffs.class));
|
cards.add(new SetCardInfo("Swiftwater Cliffs", 268, Rarity.COMMON, mage.cards.s.SwiftwaterCliffs.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue