diff --git a/Mage.Sets/src/mage/sets/avacynrestored/MidvastProtector.java b/Mage.Sets/src/mage/sets/avacynrestored/MidvastProtector.java
index 941226fde58..a90f16db820 100644
--- a/Mage.Sets/src/mage/sets/avacynrestored/MidvastProtector.java
+++ b/Mage.Sets/src/mage/sets/avacynrestored/MidvastProtector.java
@@ -28,15 +28,13 @@
package mage.sets.avacynrestored;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.target.common.TargetControlledCreaturePermanent;
/**
@@ -58,7 +56,6 @@ public class MidvastProtector extends CardImpl {
// When Midvast Protector enters the battlefield, target creature you control gains protection from the color of your choice until end of turn.
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), false);
ability.addTarget(new TargetControlledCreaturePermanent());
- ability.addChoice(new ChoiceColor());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MoonlitStrider.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MoonlitStrider.java
index 9e9e447afa6..3d7b424ee65 100644
--- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/MoonlitStrider.java
+++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/MoonlitStrider.java
@@ -28,9 +28,6 @@
package mage.sets.betrayersofkamigawa;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@@ -38,8 +35,9 @@ import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.abilities.keyword.SoulshiftAbility;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@@ -59,7 +57,6 @@ public class MoonlitStrider extends CardImpl {
// Sacrifice Moonlit Strider: Target creature you control gains protection from the color of your choice until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), new SacrificeSourceCost());
- ability.addChoice(new ChoiceColor());
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BlessedBreath.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BlessedBreath.java
index 9737b1b5e03..fb345bb4d59 100644
--- a/Mage.Sets/src/mage/sets/championsofkamigawa/BlessedBreath.java
+++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BlessedBreath.java
@@ -31,7 +31,6 @@ import java.util.UUID;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.abilities.keyword.SpliceOntoArcaneAbility;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@@ -52,7 +51,6 @@ public class BlessedBreath extends CardImpl {
// Target creature you control gains protection from the color of your choice until end of turn.
this.getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn));
- this.getSpellAbility().addChoice(new ChoiceColor());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
// Splice onto Arcane {W}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/AbzanBattlePriest.java b/Mage.Sets/src/mage/sets/khansoftarkir/AbzanBattlePriest.java
index cab74d8d5d1..52ca7ec44cd 100644
--- a/Mage.Sets/src/mage/sets/khansoftarkir/AbzanBattlePriest.java
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/AbzanBattlePriest.java
@@ -53,7 +53,6 @@ import mage.filter.predicate.permanent.CounterPredicate;
public class AbzanBattlePriest extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent();
-
static {
filter.add(new CardTypePredicate(CardType.CREATURE));
filter.add(new ControllerPredicate(TargetController.YOU));
@@ -73,10 +72,10 @@ public class AbzanBattlePriest extends CardImpl {
this.toughness = new MageInt(2);
// Outlast {W}
- this.addAbility(new OutlastAbility(new ManaCostsImpl("{W}")));
+ this.addAbility(new OutlastAbility(new ManaCostsImpl<>("{W}")));
+
// Each creature you control with a +1/+1 counter on it has lifelink.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, filter, rule)));
-
}
public AbzanBattlePriest(final AbzanBattlePriest card) {
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/AbzanFalconer.java b/Mage.Sets/src/mage/sets/khansoftarkir/AbzanFalconer.java
new file mode 100644
index 00000000000..e21b219873c
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/AbzanFalconer.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.mana.ColoredManaCost;
+import mage.abilities.effects.common.continious.GainAbilityAllEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.abilities.keyword.OutlastAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.ColoredManaSymbol;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+import mage.filter.FilterPermanent;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.filter.predicate.permanent.CounterPredicate;
+
+/**
+ *
+ * @author emerald000
+ */
+public class AbzanFalconer extends CardImpl {
+
+ private static final FilterPermanent filter = new FilterPermanent();
+ static {
+ filter.add(new CardTypePredicate(CardType.CREATURE));
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ filter.add(new CounterPredicate(CounterType.P1P1));
+ }
+
+ public AbzanFalconer(UUID ownerId) {
+ super(ownerId, 2, "Abzan Falconer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "KTK";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+
+ this.color.setWhite(true);
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // Outlast {W}
+ this.addAbility(new OutlastAbility(new ColoredManaCost(ColoredManaSymbol.W)));
+
+ // Each creature you control with a +1/+1 counter on it has flying.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter, "Each creature you control with a +1/+1 counter on it has flying")));
+ }
+
+ public AbzanFalconer(final AbzanFalconer card) {
+ super(card);
+ }
+
+ @Override
+ public AbzanFalconer copy() {
+ return new AbzanFalconer(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/BraveTheSands.java b/Mage.Sets/src/mage/sets/khansoftarkir/BraveTheSands.java
new file mode 100644
index 00000000000..f0d4cf2eb51
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/BraveTheSands.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureAllEffect;
+import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
+import mage.abilities.keyword.VigilanceAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterControlledCreaturePermanent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class BraveTheSands extends CardImpl {
+
+ public BraveTheSands(UUID ownerId) {
+ super(ownerId, 5, "Brave the Sands", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
+ this.expansionSetCode = "KTK";
+
+ this.color.setWhite(true);
+
+ // Creatures you control have vigilance.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures"))));
+
+ // Each creature you control can block an additional creature.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureAllEffect(1, new FilterControlledCreaturePermanent("Each creature you control"), Duration.WhileOnBattlefield)));
+ }
+
+ public BraveTheSands(final BraveTheSands card) {
+ super(card);
+ }
+
+ @Override
+ public BraveTheSands copy() {
+ return new BraveTheSands(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/DazzlingRamparts.java b/Mage.Sets/src/mage/sets/khansoftarkir/DazzlingRamparts.java
new file mode 100644
index 00000000000..5f6dda7fa6c
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/DazzlingRamparts.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.TapTargetEffect;
+import mage.abilities.keyword.DefenderAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class DazzlingRamparts extends CardImpl {
+
+ public DazzlingRamparts(UUID ownerId) {
+ super(ownerId, 6, "Dazzling Ramparts", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
+ this.expansionSetCode = "KTK";
+ this.subtype.add("Wall");
+
+ this.color.setWhite(true);
+ this.power = new MageInt(0);
+ this.toughness = new MageInt(7);
+
+ // Defender
+ this.addAbility(DefenderAbility.getInstance());
+
+ // {1}{W}, {T}: Tap target creature.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new ManaCostsImpl<>("{1}{W}"));
+ ability.addCost(new TapSourceCost());
+ ability.addTarget(new TargetCreaturePermanent());
+ this.addAbility(ability);
+ }
+
+ public DazzlingRamparts(final DazzlingRamparts card) {
+ super(card);
+ }
+
+ @Override
+ public DazzlingRamparts copy() {
+ return new DazzlingRamparts(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/DefiantStrike.java b/Mage.Sets/src/mage/sets/khansoftarkir/DefiantStrike.java
new file mode 100644
index 00000000000..5491f26446c
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/DefiantStrike.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.continious.BoostTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class DefiantStrike extends CardImpl {
+
+ public DefiantStrike(UUID ownerId) {
+ super(ownerId, 7, "Defiant Strike", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}");
+ this.expansionSetCode = "KTK";
+
+ this.color.setWhite(true);
+
+ // Target creature gets +1/+0 until end of turn.
+ this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0, Duration.EndOfTurn));
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+
+ // Draw a card.
+ Effect effect = new DrawCardSourceControllerEffect(1);
+ effect.setText("
Draw a card");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public DefiantStrike(final DefiantStrike card) {
+ super(card);
+ }
+
+ @Override
+ public DefiantStrike copy() {
+ return new DefiantStrike(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/DigThroughTime.java b/Mage.Sets/src/mage/sets/khansoftarkir/DigThroughTime.java
new file mode 100644
index 00000000000..11985e68db2
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/DigThroughTime.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.abilities.dynamicvalue.common.StaticValue;
+import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
+import mage.abilities.keyword.DelveAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.FilterCard;
+
+/**
+ *
+ * @author emerald000
+ */
+public class DigThroughTime extends CardImpl {
+
+ public DigThroughTime(UUID ownerId) {
+ super(ownerId, 36, "Dig Through Time", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{6}{U}{U}");
+ this.expansionSetCode = "KTK";
+
+ this.color.setBlue(true);
+
+ // Delve
+ this.addAbility(new DelveAbility());
+
+ // Look at the top seven cards of your library. Put two of them into your hand and the rest on the bottom of your library in any order.
+ this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(7), false, new StaticValue(2), new FilterCard(), Zone.LIBRARY, false, false));
+ }
+
+ public DigThroughTime(final DigThroughTime card) {
+ super(card);
+ }
+
+ @Override
+ public DigThroughTime copy() {
+ return new DigThroughTime(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/FeatOfResistance.java b/Mage.Sets/src/mage/sets/khansoftarkir/FeatOfResistance.java
new file mode 100644
index 00000000000..65070df31f4
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/FeatOfResistance.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
+import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.counters.CounterType;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class FeatOfResistance extends CardImpl {
+
+ public FeatOfResistance(UUID ownerId) {
+ super(ownerId, 10, "Feat of Resistance", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
+ this.expansionSetCode = "KTK";
+
+ this.color.setWhite(true);
+
+ // Put a +1/+1 counter on target creature you control. It gains protection from the color of your choice until end of turn.
+ this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
+ this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
+ Effect effect = new GainProtectionFromColorTargetEffect(Duration.EndOfTurn);
+ effect.setText("It gains protection from the color of your choice until end of turn");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public FeatOfResistance(final FeatOfResistance card) {
+ super(card);
+ }
+
+ @Override
+ public FeatOfResistance copy() {
+ return new FeatOfResistance(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/FirehoofCavalry.java b/Mage.Sets/src/mage/sets/khansoftarkir/FirehoofCavalry.java
new file mode 100644
index 00000000000..79f6bc61e09
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/FirehoofCavalry.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continious.BoostSourceEffect;
+import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
+import mage.abilities.keyword.TrampleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author emerald000
+ */
+public class FirehoofCavalry extends CardImpl {
+
+ public FirehoofCavalry(UUID ownerId) {
+ super(ownerId, 11, "Firehoof Cavalry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}");
+ this.expansionSetCode = "KTK";
+ this.subtype.add("Human");
+ this.subtype.add("Berserker");
+
+ this.color.setWhite(true);
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(1);
+
+ // {3}{R}: Firehoof Cavalry gets +2/+0 and gains trample until end of turn.
+ Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn);
+ effect.setText("{this} gets +2/+0");
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{3}{R}"));
+ effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains trample until end of turn");
+ ability.addEffect(effect);
+ this.addAbility(ability);
+ }
+
+ public FirehoofCavalry(final FirehoofCavalry card) {
+ super(card);
+ }
+
+ @Override
+ public FirehoofCavalry copy() {
+ return new FirehoofCavalry(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/KheruBloodsucker.java b/Mage.Sets/src/mage/sets/khansoftarkir/KheruBloodsucker.java
new file mode 100644
index 00000000000..6c0061a9aee
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/KheruBloodsucker.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.DiesCreatureTriggeredAbility;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.common.SacrificeTargetCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.effects.common.LoseLifeOpponentsEffect;
+import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+import mage.filter.Filter.ComparisonType;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.common.FilterControlledPermanent;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.ToughnessPredicate;
+import mage.filter.predicate.permanent.AnotherPredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.target.common.TargetControlledPermanent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class KheruBloodsucker extends CardImpl {
+
+ private static final FilterControlledPermanent anotherFilter = new FilterControlledCreaturePermanent("another creature");
+ private static final FilterCreaturePermanent toughnessFilter = new FilterCreaturePermanent("a creature you control with toughness 4 or greater");
+
+ static {
+ anotherFilter.add(new AnotherPredicate());
+ toughnessFilter.add(new AnotherPredicate());
+ toughnessFilter.add(new ControllerPredicate(TargetController.YOU));
+ toughnessFilter.add(new ToughnessPredicate(ComparisonType.GreaterThan, 3));
+ }
+
+ public KheruBloodsucker(UUID ownerId) {
+ super(ownerId, 75, "Kheru Bloodsucker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
+ this.expansionSetCode = "KTK";
+ this.subtype.add("Vampire");
+
+ this.color.setBlack(true);
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(2);
+
+ // Whenever a creature you control with toughness 4 or greater dies, each opponent loses 2 life and you gain 2 life.
+ Ability ability = new DiesCreatureTriggeredAbility(new LoseLifeOpponentsEffect(2), false, toughnessFilter);
+ Effect effect = new GainLifeEffect(2);
+ effect.setText("and you gain 2 life");
+ ability.addEffect(effect);
+ this.addAbility(ability);
+
+ // {2}{B}, Sacrifice another creature: Put a +1/+1 counter on Kheru Bloodsucker.
+ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl<>("{2}{B}"));
+ ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(anotherFilter)));
+ this.addAbility(ability);
+ }
+
+ public KheruBloodsucker(final KheruBloodsucker card) {
+ super(card);
+ }
+
+ @Override
+ public KheruBloodsucker copy() {
+ return new KheruBloodsucker(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/KheruDreadmaw.java b/Mage.Sets/src/mage/sets/khansoftarkir/KheruDreadmaw.java
new file mode 100644
index 00000000000..c6408538c53
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/KheruDreadmaw.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.common.SacrificeTargetCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesToughness;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.keyword.DefenderAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.common.FilterControlledPermanent;
+import mage.filter.predicate.permanent.AnotherPredicate;
+import mage.target.common.TargetControlledPermanent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class KheruDreadmaw extends CardImpl {
+
+ private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature");
+ static {
+ filter.add(new AnotherPredicate());
+ }
+
+ public KheruDreadmaw(UUID ownerId) {
+ super(ownerId, 76, "Kheru Dreadmaw", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}");
+ this.expansionSetCode = "KTK";
+ this.subtype.add("Zombie");
+ this.subtype.add("Crocodile");
+
+ this.color.setBlack(true);
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(4);
+
+ // Defender
+ this.addAbility(DefenderAbility.getInstance());
+
+ // {1}{G}, Sacrifice another creature: You gain life equal to the sacrificed creature's toughness.
+ Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness());
+ effect.setText("You gain life equal to the sacrificed creature's toughness");
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}{G}"));
+ ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
+ this.addAbility(ability);
+ }
+
+ public KheruDreadmaw(final KheruDreadmaw card) {
+ super(card);
+ }
+
+ @Override
+ public KheruDreadmaw copy() {
+ return new KheruDreadmaw(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/MerEkNightblade.java b/Mage.Sets/src/mage/sets/khansoftarkir/MerEkNightblade.java
new file mode 100644
index 00000000000..5eeb5ec3735
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/MerEkNightblade.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.continious.GainAbilityAllEffect;
+import mage.abilities.keyword.DeathtouchAbility;
+import mage.abilities.keyword.OutlastAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+import mage.filter.FilterPermanent;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.filter.predicate.permanent.CounterPredicate;
+
+/**
+ *
+ * @author emerald000
+ */
+public class MerEkNightblade extends CardImpl {
+
+ private static final FilterPermanent filter = new FilterPermanent();
+ static {
+ filter.add(new CardTypePredicate(CardType.CREATURE));
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ filter.add(new CounterPredicate(CounterType.P1P1));
+ }
+
+ public MerEkNightblade(UUID ownerId) {
+ super(ownerId, 79, "Mer-Ek Nightblade", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
+ this.expansionSetCode = "KTK";
+ this.subtype.add("Orc");
+ this.subtype.add("Assassin");
+
+ this.color.setBlack(true);
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // Outlast {B}
+ this.addAbility(new OutlastAbility(new ManaCostsImpl<>("{B}")));
+
+ // Each creature you control with a +1/+1 counter on it has deathtouch.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, filter, "Each creature you control with a +1/+1 counter on it has deathtouch")));
+ }
+
+ public MerEkNightblade(final MerEkNightblade card) {
+ super(card);
+ }
+
+ @Override
+ public MerEkNightblade copy() {
+ return new MerEkNightblade(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/MoltingSnakeskin.java b/Mage.Sets/src/mage/sets/khansoftarkir/MoltingSnakeskin.java
new file mode 100644
index 00000000000..1069e95c8c0
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/MoltingSnakeskin.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.RegenerateSourceEffect;
+import mage.abilities.effects.common.continious.BoostEnchantedEffect;
+import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.cards.CardImpl;
+import mage.constants.AttachmentType;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class MoltingSnakeskin extends CardImpl {
+
+ public MoltingSnakeskin(UUID ownerId) {
+ super(ownerId, 80, "Molting Snakeskin", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}");
+ this.expansionSetCode = "KTK";
+ this.subtype.add("Aura");
+
+ this.color.setBlack(true);
+
+ // Enchant creature
+ TargetPermanent auraTarget = new TargetCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // Enchanted creature gets +2/+0 and has "{2}{B}: Regenerate this creature."
+ ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0));
+ Effect effect = new GainAbilityAttachedEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{2}{B}")), AttachmentType.AURA);
+ effect.setText("and has \"{2}{B}: Regenerate this creature.\"");
+ ability.addEffect(effect);
+ this.addAbility(ability);
+ }
+
+ public MoltingSnakeskin(final MoltingSnakeskin card) {
+ super(card);
+ }
+
+ @Override
+ public MoltingSnakeskin copy() {
+ return new MoltingSnakeskin(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/RakshasasSecret.java b/Mage.Sets/src/mage/sets/khansoftarkir/RakshasasSecret.java
new file mode 100644
index 00000000000..278e2d0c4b5
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/RakshasasSecret.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.sets.khansoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect;
+import mage.abilities.effects.common.discard.DiscardTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.target.common.TargetOpponent;
+
+/**
+ *
+ * @author emerald000
+ */
+public class RakshasasSecret extends CardImpl {
+
+ public RakshasasSecret(UUID ownerId) {
+ super(ownerId, 84, "Rakshasa's Secret", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}");
+ this.expansionSetCode = "KTK";
+
+ this.color.setBlack(true);
+
+ // Target opponent discards two cards. Put the top two cards of your library into your graveyard.
+ this.getSpellAbility().addEffect(new DiscardTargetEffect(2));
+ this.getSpellAbility().addTarget(new TargetOpponent());
+ Effect effect = new PutTopCardOfLibraryIntoGraveControllerEffect(2);
+ effect.setText("Put the top two cards of your library into your graveyard");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public RakshasasSecret(final RakshasasSecret card) {
+ super(card);
+ }
+
+ @Override
+ public RakshasasSecret copy() {
+ return new RakshasasSecret(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/lorwyn/SyggRiverGuide.java b/Mage.Sets/src/mage/sets/lorwyn/SyggRiverGuide.java
index f24811ace6a..ff0e7ba70ce 100644
--- a/Mage.Sets/src/mage/sets/lorwyn/SyggRiverGuide.java
+++ b/Mage.Sets/src/mage/sets/lorwyn/SyggRiverGuide.java
@@ -28,9 +28,6 @@
package mage.sets.lorwyn;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@@ -38,8 +35,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.abilities.keyword.IslandwalkAbility;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
@@ -74,7 +72,6 @@ public class SyggRiverGuide extends CardImpl {
this.addAbility(new IslandwalkAbility());
// {1}{W}: Target Merfolk you control gains protection from the color of your choice until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{W}"));
- ability.addChoice(new ChoiceColor());
Target target = new TargetControlledCreaturePermanent(1,1,filter, false);
ability.addTarget(target);
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/sets/magic2012/StaveOff.java b/Mage.Sets/src/mage/sets/magic2012/StaveOff.java
index b1c1a8217fd..60301d46f6b 100644
--- a/Mage.Sets/src/mage/sets/magic2012/StaveOff.java
+++ b/Mage.Sets/src/mage/sets/magic2012/StaveOff.java
@@ -28,13 +28,11 @@
package mage.sets.magic2012;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.target.common.TargetCreaturePermanent;
/**
@@ -52,7 +50,6 @@ public class StaveOff extends CardImpl {
// Target creature gains protection from the color of your choice until end of turn.
this.getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
- this.getSpellAbility().addChoice(new ChoiceColor());
}
public StaveOff(final StaveOff card) {
diff --git a/Mage.Sets/src/mage/sets/odyssey/ResilientWanderer.java b/Mage.Sets/src/mage/sets/odyssey/ResilientWanderer.java
index 9fbe46f4ced..4832a6e9df9 100644
--- a/Mage.Sets/src/mage/sets/odyssey/ResilientWanderer.java
+++ b/Mage.Sets/src/mage/sets/odyssey/ResilientWanderer.java
@@ -68,7 +68,6 @@ public class ResilientWanderer extends CardImpl {
this.addAbility(FirstStrikeAbility.getInstance());
// Discard a card: Resilient Wanderer gains protection from the color of your choice until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainProtectionFromColorSourceEffect(), new DiscardCardCost());
- ability.addChoice(new ChoiceColor());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/sets/odyssey/Shelter.java b/Mage.Sets/src/mage/sets/odyssey/Shelter.java
index 46569d4855e..39ab7c838a6 100644
--- a/Mage.Sets/src/mage/sets/odyssey/Shelter.java
+++ b/Mage.Sets/src/mage/sets/odyssey/Shelter.java
@@ -31,7 +31,6 @@ import java.util.UUID;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@@ -51,7 +50,6 @@ public class Shelter extends CardImpl {
// Target creature you control gains protection from the color of your choice until end of turn.
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
- this.getSpellAbility().addChoice(new ChoiceColor());
this.getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn));
//
// Draw a card.
diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmergeUnscathed.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmergeUnscathed.java
index 7fbfb4be0a5..4d14655b634 100644
--- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmergeUnscathed.java
+++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmergeUnscathed.java
@@ -28,14 +28,12 @@
package mage.sets.riseoftheeldrazi;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.abilities.keyword.ReboundAbility;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.target.common.TargetControlledCreaturePermanent;
/**
@@ -53,7 +51,6 @@ public class EmergeUnscathed extends CardImpl {
// Target creature you control gains protection from the color of your choice until end of turn.
this.getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
- this.getSpellAbility().addChoice(new ChoiceColor());
// Rebound
this.addAbility(new ReboundAbility());
diff --git a/Mage.Sets/src/mage/sets/theros/GodsWilling.java b/Mage.Sets/src/mage/sets/theros/GodsWilling.java
index dff93c4093d..121c854c7e5 100644
--- a/Mage.Sets/src/mage/sets/theros/GodsWilling.java
+++ b/Mage.Sets/src/mage/sets/theros/GodsWilling.java
@@ -31,8 +31,6 @@ import java.util.UUID;
import mage.abilities.effects.common.ScryEffect;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.cards.CardImpl;
-import mage.choices.Choice;
-import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
@@ -52,8 +50,6 @@ public class GodsWilling extends CardImpl {
// Target creature you control gains protection from the color of your choice until end of turn. Scry 1.
this.getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn));
- Choice colorChoice = new ChoiceColor();
- this.getSpellAbility().addChoice(colorChoice);
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addEffect(new ScryEffect(1));
}
diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/MotherOfRunes.java b/Mage.Sets/src/mage/sets/urzaslegacy/MotherOfRunes.java
index 4bb9cc9fb34..df87afbe1b3 100644
--- a/Mage.Sets/src/mage/sets/urzaslegacy/MotherOfRunes.java
+++ b/Mage.Sets/src/mage/sets/urzaslegacy/MotherOfRunes.java
@@ -28,17 +28,15 @@
package mage.sets.urzaslegacy;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
@@ -60,7 +58,6 @@ public class MotherOfRunes extends CardImpl {
// {tap}: Target creature you control gains protection from the color of your choice until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), new TapSourceCost());
- ability.addChoice(new ChoiceColor());
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java b/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java
index 1d2b52d6f60..c92934866c5 100644
--- a/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java
+++ b/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java
@@ -29,15 +29,14 @@
package mage.sets.worldwake;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.Rarity;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continious.GainProtectionFromColorTargetEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
-import mage.choices.ChoiceColor;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.target.common.TargetControlledCreaturePermanent;
/**
@@ -52,7 +51,6 @@ public class SejiriSteppe extends CardImpl {
this.addAbility(new EntersBattlefieldTappedAbility());
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), false);
ability.addTarget(new TargetControlledCreaturePermanent());
- ability.addChoice(new ChoiceColor());
this.addAbility(ability);
this.addAbility(new WhiteManaAbility());
}
diff --git a/Mage/src/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureAllEffect.java b/Mage/src/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureAllEffect.java
new file mode 100644
index 00000000000..919e0d9c219
--- /dev/null
+++ b/Mage/src/mage/abilities/effects/common/combat/CanBlockAdditionalCreatureAllEffect.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.abilities.effects.common.combat;
+
+import mage.abilities.Ability;
+import mage.abilities.effects.ContinuousEffectImpl;
+import mage.constants.Duration;
+import mage.constants.Layer;
+import mage.constants.Outcome;
+import mage.constants.SubLayer;
+import mage.filter.FilterPermanent;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.util.CardUtil;
+
+/**
+ *
+ * @author emerald000
+ */
+
+public class CanBlockAdditionalCreatureAllEffect extends ContinuousEffectImpl {
+
+ protected int amount;
+ protected FilterPermanent filter;
+
+ public CanBlockAdditionalCreatureAllEffect(int amount, FilterPermanent filter, Duration duration) {
+ super(duration, Outcome.Benefit);
+ this.amount = amount;
+ this.filter = filter;
+ staticText = setText();
+ }
+
+ public CanBlockAdditionalCreatureAllEffect(final CanBlockAdditionalCreatureAllEffect effect) {
+ super(effect);
+ this.amount = effect.amount;
+ this.filter = effect.filter;
+ }
+
+ @Override
+ public CanBlockAdditionalCreatureAllEffect copy() {
+ return new CanBlockAdditionalCreatureAllEffect(this);
+ }
+
+ @Override
+ public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
+ for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
+ if (permanent != null) {
+ // maxBlocks = 0 equals to "can block any number of creatures"
+ if (amount > 0) {
+ permanent.setMaxBlocks(permanent.getMaxBlocks() + amount);
+ }
+ else {
+ permanent.setMaxBlocks(0);
+ }
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return false;
+ }
+
+ private String setText() {
+ StringBuilder sb = new StringBuilder(filter.getMessage());
+ sb.append(" can block ");
+ switch(amount) {
+ case 0:
+ sb.append("any number of creatures");
+ break;
+ default:
+ sb.append(CardUtil.numberToText(amount, "an")).append(" additional creature").append(amount > 1 ? "s" : "");
+ }
+ return sb.toString();
+ }
+
+ @Override
+ public boolean hasLayer(Layer layer) {
+ return layer == Layer.RulesEffects;
+ }
+}
diff --git a/Mage/src/mage/abilities/effects/common/continious/GainProtectionFromColorTargetEffect.java b/Mage/src/mage/abilities/effects/common/continious/GainProtectionFromColorTargetEffect.java
index 97971894898..8d4cbeda66f 100644
--- a/Mage/src/mage/abilities/effects/common/continious/GainProtectionFromColorTargetEffect.java
+++ b/Mage/src/mage/abilities/effects/common/continious/GainProtectionFromColorTargetEffect.java
@@ -28,28 +28,34 @@
package mage.abilities.effects.common.continious;
-import mage.constants.Duration;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.keyword.ProtectionAbility;
import mage.choices.ChoiceColor;
+import mage.constants.Duration;
+import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
+import mage.players.Player;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect {
+
+ protected ChoiceColor choice;
public GainProtectionFromColorTargetEffect(Duration duration) {
super(new ProtectionAbility(new FilterCard()), duration);
+ choice = new ChoiceColor();
}
public GainProtectionFromColorTargetEffect(final GainProtectionFromColorTargetEffect effect) {
super(effect);
+ choice = effect.choice;
}
@Override
@@ -60,8 +66,11 @@ public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect
@Override
public boolean apply(Game game, Ability source) {
Permanent creature = game.getPermanent(source.getFirstTarget());
- if (creature != null) {
- ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
+ Player player = game.getPlayer(source.getControllerId());
+ if (creature != null && player != null) {
+ while (!choice.isChosen()) {
+ player.choose(Outcome.Protect, choice, game);
+ }
FilterCard protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter();
protectionFilter.add(new ColorPredicate(choice.getColor()));
protectionFilter.setMessage(choice.getChoice());
@@ -74,6 +83,11 @@ public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect
@Override
public String getText(Mode mode) {
- return "target creature you control gains protection from the color of your choice " + duration.toString();
+ if (staticText != null && !staticText.isEmpty()) {
+ return staticText;
+ }
+ else {
+ return "target creature you control gains protection from the color of your choice " + duration.toString();
+ }
}
}