mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[40K] Implemented Epistolary Librarian
This commit is contained in:
parent
5c557f6e40
commit
dc8a2ad400
2 changed files with 65 additions and 0 deletions
64
Mage.Sets/src/mage/cards/e/EpistolaryLibrarian.java
Normal file
64
Mage.Sets/src/mage/cards/e/EpistolaryLibrarian.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.effects.common.cost.CastFromHandForFreeEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class EpistolaryLibrarian extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a spell with mana value X or less");
|
||||
|
||||
static {
|
||||
filter.add(EpistolaryLibrarianPredicate.instance);
|
||||
}
|
||||
|
||||
public EpistolaryLibrarian(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
|
||||
|
||||
this.subtype.add(SubType.ASTARTES);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Veil of Time -- Whenever Epistolary Librarian attacks, you may cast a spell with mana value X or less from your hand without paying its mana cost, where X is the number of attacking creatures.
|
||||
Ability ability = new AttacksTriggeredAbility(new CastFromHandForFreeEffect(filter));
|
||||
ability.addEffect(new InfoEffect(", where X is the number of attacking creatures"));
|
||||
this.addAbility(ability.withFlavorWord("Veil of Time"));
|
||||
}
|
||||
|
||||
private EpistolaryLibrarian(final EpistolaryLibrarian card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EpistolaryLibrarian copy() {
|
||||
return new EpistolaryLibrarian(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum EpistolaryLibrarianPredicate implements Predicate<Card> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Card input, Game game) {
|
||||
return input.getManaValue() <= game
|
||||
.getBattlefield()
|
||||
.count(StaticFilters.FILTER_ATTACKING_CREATURE, null, null, game);
|
||||
}
|
||||
}
|
|
@ -80,6 +80,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dread Return", 200, Rarity.UNCOMMON, mage.cards.d.DreadReturn.class));
|
||||
cards.add(new SetCardInfo("Endless Atlas", 237, Rarity.RARE, mage.cards.e.EndlessAtlas.class));
|
||||
cards.add(new SetCardInfo("Entrapment Maneuver", 185, Rarity.RARE, mage.cards.e.EntrapmentManeuver.class));
|
||||
cards.add(new SetCardInfo("Epistolary Librarian", 118, Rarity.RARE, mage.cards.e.EpistolaryLibrarian.class));
|
||||
cards.add(new SetCardInfo("Everflowing Chalice", 238, Rarity.RARE, mage.cards.e.EverflowingChalice.class));
|
||||
cards.add(new SetCardInfo("Evolving Wilds", 277, Rarity.COMMON, mage.cards.e.EvolvingWilds.class));
|
||||
cards.add(new SetCardInfo("Exalted Flamer of Tzeentch", 119, Rarity.RARE, mage.cards.e.ExaltedFlamerOfTzeentch.class));
|
||||
|
|
Loading…
Reference in a new issue