From 4d6dce82bc948bac95f8be19689798e4548eec11 Mon Sep 17 00:00:00 2001 From: mnapoleon Date: Tue, 3 Mar 2015 13:32:11 -0500 Subject: [PATCH] finished implementing Capashen Unicorn, Crusading Knight, Marauding Knight and Stun --- Mage.Client/test.dck | 37 +++++++++++++++++++ .../mage/sets/invasion/CapashenUnicorn.java | 6 +-- .../mage/sets/invasion/CrusadingKnight.java | 7 +++- .../mage/sets/invasion/MaraudingKnight.java | 6 ++- Mage.Sets/src/mage/sets/tempest/Stun.java | 5 ++- 5 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 Mage.Client/test.dck diff --git a/Mage.Client/test.dck b/Mage.Client/test.dck new file mode 100644 index 0000000000..3640ae4769 --- /dev/null +++ b/Mage.Client/test.dck @@ -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 diff --git a/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java b/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java index acf6d799e1..0234a0e83d 100644 --- a/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java +++ b/Mage.Sets/src/mage/sets/invasion/CapashenUnicorn.java @@ -31,7 +31,6 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; 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"); 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) { @@ -64,7 +64,7 @@ public class CapashenUnicorn extends CardImpl { this.toughness = new MageInt(2); // {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 SacrificeSourceCost()); ability.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java index 87c101ce4d..7feb0ef233 100644 --- a/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/CrusadingKnight.java @@ -32,11 +32,13 @@ import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; /** @@ -46,8 +48,9 @@ import mage.filter.predicate.permanent.ControllerPredicate; public class CrusadingKnight extends CardImpl { 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 { + filterSwamps.add(new SubtypePredicate("Swamp")); 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. 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); } diff --git a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java index 1f09d0f9bc..df93347d43 100644 --- a/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java +++ b/Mage.Sets/src/mage/sets/invasion/MaraudingKnight.java @@ -29,14 +29,17 @@ package mage.sets.invasion; import java.util.UUID; import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; 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 FilterLandPermanent filterPlains = new FilterLandPermanent("Plains your opponent controls"); static { + filterPlains.add(new SubtypePredicate("Plains")); 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. 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); } diff --git a/Mage.Sets/src/mage/sets/tempest/Stun.java b/Mage.Sets/src/mage/sets/tempest/Stun.java index 9275be39a8..82cc6f5cb7 100644 --- a/Mage.Sets/src/mage/sets/tempest/Stun.java +++ b/Mage.Sets/src/mage/sets/tempest/Stun.java @@ -28,6 +28,7 @@ package mage.sets.tempest; import java.util.UUID; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -53,9 +54,9 @@ public class Stun extends CardImpl { effect.setText("Target creature can't block this turn."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - + // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } public Stun(final Stun card) {