finished implementing Capashen Unicorn, Crusading Knight, Marauding Knight and Stun

This commit is contained in:
mnapoleon 2015-03-03 13:32:11 -05:00
parent 801103bbda
commit 4d6dce82bc
5 changed files with 53 additions and 8 deletions

37
Mage.Client/test.dck Normal file
View file

@ -0,0 +1,37 @@
NAME:Boros Battalion
1 [GTC:200] Sunhome Guildmage
1 [GTC:102] Mugging
2 [GTC:227] Boros Keyrune
1 [GTC:163] Firemane Avenger
1 [GTC:1] Aerial Maneuver
1 [GTC:90] Firefist Striker
2 [M13:122] Canyon Minotaur
1 [GTC:86] Bomber Corps
1 [GTC:239] Boros Guildgate
1 [GTC:99] Mark for Death
3 [RTR:266] Mountain
3 [RTR:265] Mountain
2 [GTC:197] Skyknight Legionnaire
1 [GTC:8] Court Street Denizen
2 [RTR:269] Mountain
2 [RTR:268] Mountain
2 [RTR:267] Mountain
1 [GTC:89] Ember Beast
2 [GTC:211] Arrows of Justice
1 [GTC:23] Righteous Charge
1 [GTC:24] Shielded Passage
2 [M13:40] Warclamp Mastiff
1 [GTC:184] Ordruun Veteran
3 [RTR:250] Plains
2 [GTC:111] Warmind Infantry
3 [RTR:251] Plains
1 [GTC:226] Armored Transport
1 [GTC:165] Foundry Champion
2 [GTC:164] Fortress Cyclops
3 [GTC:208] Wojek Halberdiers
2 [GTC:9] Daring Skyjek
1 [GTC:85] Act of Treason
2 [RTR:253] Plains
1 [GTC:7] Boros Elite
2 [RTR:252] Plains
2 [RTR:254] Plains

View file

@ -31,7 +31,6 @@ import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -53,7 +52,8 @@ public class CapashenUnicorn extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment"); private static final FilterPermanent filter = new FilterPermanent("artifact or enchantment");
static { static {
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.ENCHANTMENT))); filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),
new CardTypePredicate(CardType.ENCHANTMENT)));
} }
public CapashenUnicorn(UUID ownerId) { public CapashenUnicorn(UUID ownerId) {
@ -64,7 +64,7 @@ public class CapashenUnicorn extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// {1}{W}, {tap}, Sacrifice Capashen Unicorn: Destroy target artifact or enchantment. // {1}{W}, {tap}, Sacrifice Capashen Unicorn: Destroy target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl<>("{W}{1}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{W}"));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetPermanent(filter)); ability.addTarget(new TargetPermanent(filter));

View file

@ -32,11 +32,13 @@ import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.*; import mage.constants.*;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
/** /**
@ -46,8 +48,9 @@ import mage.filter.predicate.permanent.ControllerPredicate;
public class CrusadingKnight extends CardImpl { public class CrusadingKnight extends CardImpl {
private static final FilterCard filterBlack = new FilterCard("Black"); private static final FilterCard filterBlack = new FilterCard("Black");
private static final FilterLandPermanent filterSwamps = new FilterLandPermanent("Swamps your opponent controls"); private static final FilterLandPermanent filterSwamps = new FilterLandPermanent("Swamp your opponent controls");
static { static {
filterSwamps.add(new SubtypePredicate("Swamp"));
filterSwamps.add(new ControllerPredicate(TargetController.OPPONENT)); filterSwamps.add(new ControllerPredicate(TargetController.OPPONENT));
} }
@ -64,7 +67,7 @@ public class CrusadingKnight extends CardImpl {
// Crusading Knight gets +1/+1 for each Swamp your opponents control. // Crusading Knight gets +1/+1 for each Swamp your opponents control.
PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterSwamps, 1); PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterSwamps, 1);
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -29,14 +29,17 @@ package mage.sets.invasion;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.*; import mage.constants.*;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
/** /**
@ -48,6 +51,7 @@ public class MaraudingKnight extends CardImpl {
private static final FilterCard filterWhite = new FilterCard("White"); private static final FilterCard filterWhite = new FilterCard("White");
private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains your opponent controls"); private static final FilterLandPermanent filterPlains = new FilterLandPermanent("Plains your opponent controls");
static { static {
filterPlains.add(new SubtypePredicate("Plains"));
filterPlains.add(new ControllerPredicate(TargetController.OPPONENT)); filterPlains.add(new ControllerPredicate(TargetController.OPPONENT));
} }
@ -64,7 +68,7 @@ public class MaraudingKnight extends CardImpl {
// Marauding Knight gets +1/+1 for each Plains your opponents control. // Marauding Knight gets +1/+1 for each Plains your opponents control.
PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterPlains, 1); PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filterPlains, 1);
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -28,6 +28,7 @@
package mage.sets.tempest; package mage.sets.tempest;
import java.util.UUID; import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@ -53,9 +54,9 @@ public class Stun extends CardImpl {
effect.setText("Target creature can't block this turn."); effect.setText("Target creature can't block this turn.");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Draw a card. // Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
} }
public Stun(final Stun card) { public Stun(final Stun card) {