add Knight of the Reliquary
parent
3c3f80fa8f
commit
8cea9dd238
|
@ -0,0 +1,39 @@
|
|||
[
|
||||
new MagicStatic(MagicLayer.SetPT) {
|
||||
@Override
|
||||
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
||||
final int amt = source.getGame().filterCards(source.getController(), MagicTargetFilter.LAND_CARD_FROM_YOUR_GRAVEYARD).size();
|
||||
pt.add(amt, amt);
|
||||
}
|
||||
},
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Land),
|
||||
"Search"
|
||||
) {
|
||||
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [
|
||||
new MagicTapEvent(source),
|
||||
new MagicSacrificePermanentEvent(source, MagicTargetChoice.SACRIFICE_FOREST_OR_PLAINS)
|
||||
];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
this,
|
||||
"PN searches his or her library for a land card, put it on the battlefield, then shuffle his or her library."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
game.addEvent(new MagicSearchOntoBattlefieldEvent(
|
||||
event,
|
||||
MagicTargetChoice.LAND_CARD_FROM_LIBRARY
|
||||
));
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
name=Knight of the Reliquary
|
||||
url=http://magiccards.info/query?q=%21knight%20of%20the%20reliquary
|
||||
image=http://mtgimage.com/card/knight%20of%20the%20reliquary.jpg
|
||||
value=2.984
|
||||
rarity=R
|
||||
type=Creature
|
||||
subtype=Human,Knight
|
||||
cost={1}{G}{W}
|
||||
pt=2/2
|
||||
timing=main
|
||||
requires_groovy_code
|
|
@ -465,6 +465,9 @@ public class MagicTargetChoice extends MagicChoice {
|
|||
public static final MagicTargetChoice SACRIFICE_LAND =
|
||||
new MagicTargetChoice("a land to sacrifice");
|
||||
|
||||
public static final MagicTargetChoice SACRIFICE_FOREST_OR_PLAINS =
|
||||
new MagicTargetChoice("a Forest or Plains to sacrifice");
|
||||
|
||||
public static final MagicTargetChoice SACRIFICE_ENCHANTMENT =
|
||||
new MagicTargetChoice("an enchantment to sacrifice");
|
||||
|
||||
|
|
|
@ -528,6 +528,14 @@ public interface MagicTargetFilter<T extends MagicTarget> {
|
|||
}
|
||||
};
|
||||
|
||||
MagicPermanentFilterImpl TARGET_FOREST_OR_PLAINS_YOU_CONTROL=new MagicPermanentFilterImpl() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
|
||||
return target.isController(player) &&
|
||||
(target.hasSubType(MagicSubType.Forest) ||
|
||||
target.hasSubType(MagicSubType.Plains));
|
||||
}
|
||||
};
|
||||
|
||||
MagicPermanentFilterImpl TARGET_RED_OR_GREEN_CREATURE=new MagicPermanentFilterImpl() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
|
||||
return target.isCreature() &&
|
||||
|
@ -1112,6 +1120,8 @@ public interface MagicTargetFilter<T extends MagicTarget> {
|
|||
targetType==MagicTargetType.OpponentsGraveyard;
|
||||
}
|
||||
};
|
||||
|
||||
MagicCardFilterImpl LAND_CARD_FROM_YOUR_GRAVEYARD=Factory.card(MagicTargetType.Graveyard, MagicType.Land);
|
||||
|
||||
MagicCardFilterImpl TARGET_LAND_CARD_FROM_ALL_GRAVEYARDS=new MagicCardFilterImpl() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
|
||||
|
|
|
@ -89,6 +89,7 @@ public class MagicTargetFilterFactory {
|
|||
single.put("creature or Aura spell", TARGET_CREATURE_OR_AURA_SPELL);
|
||||
single.put("blue or black creature you control", TARGET_BLUE_OR_BLACK_CREATURE_YOU_CONTROL);
|
||||
single.put("red or green creature you control", TARGET_RED_OR_GREEN_CREATURE_YOU_CONTROL);
|
||||
single.put("Forest or Plains you control", TARGET_FOREST_OR_PLAINS_YOU_CONTROL);
|
||||
single.put("red or green creature",TARGET_RED_OR_GREEN_CREATURE);
|
||||
single.put("creature without flying you don't control", MagicTargetFilter.TARGET_CREATURE_WITHOUT_FLYING_YOUR_OPPONENT_CONTROLS);
|
||||
single.put("nonartifact creature", TARGET_NONARTIFACT_CREATURE);
|
||||
|
|
Loading…
Reference in New Issue