mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[40K] Implemented Lychguard
This commit is contained in:
parent
aa4a86f940
commit
14bf203960
2 changed files with 80 additions and 0 deletions
79
Mage.Sets/src/mage/cards/l/Lychguard.java
Normal file
79
Mage.Sets/src/mage/cards/l/Lychguard.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Lychguard extends CardImpl {
|
||||
|
||||
public Lychguard(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
this.subtype.add(SubType.NECRON);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Guardian Patrols -- {3}{B}, Sacrifice Lychguard: Return all legendary creature cards from your graveyard to your hand.
|
||||
Ability ability = new SimpleActivatedAbility(new LychguardEffect(), new ManaCostsImpl<>("{3}{B}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private Lychguard(final Lychguard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Lychguard copy() {
|
||||
return new Lychguard(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LychguardEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard();
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
LychguardEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "return all legendary creature cards from your graveyard to your hand";
|
||||
}
|
||||
|
||||
private LychguardEffect(final LychguardEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LychguardEffect copy() {
|
||||
return new LychguardEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(player.getGraveyard().getCards(filter, game));
|
||||
return player.moveCards(cards, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
|
@ -96,6 +96,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Living Death", 202, Rarity.RARE, mage.cards.l.LivingDeath.class));
|
||||
cards.add(new SetCardInfo("Lokhust Heavy Destroyer", 38, Rarity.RARE, mage.cards.l.LokhustHeavyDestroyer.class));
|
||||
cards.add(new SetCardInfo("Lord of Change", 24, Rarity.RARE, mage.cards.l.LordOfChange.class));
|
||||
cards.add(new SetCardInfo("Lychguard", 39, Rarity.RARE, mage.cards.l.Lychguard.class));
|
||||
cards.add(new SetCardInfo("Mind Stone", 245, Rarity.UNCOMMON, mage.cards.m.MindStone.class));
|
||||
cards.add(new SetCardInfo("Molten Slagheap", 284, Rarity.UNCOMMON, mage.cards.m.MoltenSlagheap.class));
|
||||
cards.add(new SetCardInfo("Mountain", 315, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
Loading…
Reference in a new issue