diff --git a/Mage.Server/pom.xml b/Mage.Server/pom.xml
index f9f5951f3d..c4f3e58f13 100644
--- a/Mage.Server/pom.xml
+++ b/Mage.Server/pom.xml
@@ -47,7 +47,10 @@
log4j
log4j
- jar
+
+
+ org.slf4j
+ slf4j-log4j12
${project.groupId}
diff --git a/Mage.Server/release/config/config.xml b/Mage.Server/release/config/config.xml
index 979d7b44e4..399aa60b39 100644
--- a/Mage.Server/release/config/config.xml
+++ b/Mage.Server/release/config/config.xml
@@ -27,6 +27,7 @@
+
@@ -71,6 +72,7 @@
+
diff --git a/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java b/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java
index c5a18998f1..92af4cd0f7 100644
--- a/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java
+++ b/Mage.Sets/src/mage/sets/avacynrestored/AbundantGrowth.java
@@ -58,7 +58,7 @@ public class AbundantGrowth extends CardImpl {
// Enchant land
TargetPermanent auraTarget = new TargetLandPermanent();
this.getSpellAbility().addTarget(auraTarget);
- this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/sets/avacynrestored/GiselaBladeOfGoldnight.java b/Mage.Sets/src/mage/sets/avacynrestored/GiselaBladeOfGoldnight.java
index 42bb99a7fe..871ff82d7a 100644
--- a/Mage.Sets/src/mage/sets/avacynrestored/GiselaBladeOfGoldnight.java
+++ b/Mage.Sets/src/mage/sets/avacynrestored/GiselaBladeOfGoldnight.java
@@ -27,7 +27,7 @@
*/
package mage.sets.avacynrestored;
-import mage.constants.*;
+import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
@@ -35,12 +35,19 @@ import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import static mage.game.events.GameEvent.EventType.DAMAGE_CREATURE;
+import static mage.game.events.GameEvent.EventType.DAMAGE_PLANESWALKER;
+import static mage.game.events.GameEvent.EventType.DAMAGE_PLAYER;
import mage.game.permanent.Permanent;
-import java.util.UUID;
-
/**
*
* @author noxx
@@ -53,8 +60,6 @@ public class GiselaBladeOfGoldnight extends CardImpl {
this.supertype.add("Legendary");
this.subtype.add("Angel");
- this.color.setRed(true);
- this.color.setWhite(true);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
@@ -93,8 +98,35 @@ class GiselaBladeOfGoldnightDoubleDamageEffect extends ReplacementEffectImpl {
return new GiselaBladeOfGoldnightDoubleDamageEffect(this);
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(EventType.DAMAGE_CREATURE) ||
+ event.getType().equals(EventType.DAMAGE_PLANESWALKER) ||
+ event.getType().equals(EventType.DAMAGE_PLAYER);
+ }
+
+
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
+ return true;
+ }
+
+ private void preventDamage(GameEvent event, Ability source, UUID target, Game game) {
+ int amount = (int)Math.ceil(event.getAmount() / 2.0);
+ GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, target, source.getSourceId(), source.getControllerId(), amount, false);
+ if (!game.replaceEvent(preventEvent)) {
+ event.setAmount(event.getAmount() - amount);
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, target, source.getSourceId(), source.getControllerId(), amount));
+ }
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return true;
+ }
+
+ @Override
+ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
switch (event.getType()) {
case DAMAGE_PLAYER:
if (event.getTargetId().equals(source.getControllerId())) {
@@ -116,25 +148,4 @@ class GiselaBladeOfGoldnightDoubleDamageEffect extends ReplacementEffectImpl {
}
return false;
}
-
- private void preventDamage(GameEvent event, Ability source, UUID target, Game game) {
- int amount = (int)Math.ceil(event.getAmount() / 2.0);
- GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, target, source.getSourceId(), source.getControllerId(), amount, false);
- if (!game.replaceEvent(preventEvent)) {
- event.setAmount(event.getAmount() - amount);
- game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, target, source.getSourceId(), source.getControllerId(), amount));
- }
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- return true;
- }
-
- @Override
- public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
- }
-
}
-
diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Overblaze.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Overblaze.java
index 0a18b424a3..50a66e1d77 100644
--- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Overblaze.java
+++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Overblaze.java
@@ -38,8 +38,6 @@ import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.game.Game;
import mage.game.events.GameEvent;
-import static mage.game.events.GameEvent.EventType.DAMAGE_CREATURE;
-import static mage.game.events.GameEvent.EventType.DAMAGE_PLAYER;
import mage.target.TargetPermanent;
/**
@@ -88,16 +86,15 @@ class FireServantEffect extends ReplacementEffectImpl {
return new FireServantEffect(this);
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(GameEvent.EventType.DAMAGE_CREATURE) ||
+ event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER);
+ }
+
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
- switch (event.getType()) {
- case DAMAGE_CREATURE:
- case DAMAGE_PLAYER:
- if (event.getSourceId().equals(this.getTargetPointer().getFirst(game, source))) {
- event.setAmount(event.getAmount() * 2);
- }
- }
- return false;
+ return event.getSourceId().equals(this.getTargetPointer().getFirst(game, source));
}
@Override
@@ -107,7 +104,8 @@ class FireServantEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
+ event.setAmount(event.getAmount() * 2);
+ return false;
}
}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java b/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java
index 56c09aec43..7cad13237f 100644
--- a/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java
+++ b/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java
@@ -34,7 +34,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.EnchantedCondition;
import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.effects.Effect;
-import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderEffect;
+import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
@@ -60,7 +60,7 @@ public class PillarOfWar extends CardImpl {
this.addAbility(DefenderAbility.getInstance());
// As long as Pillar of War is enchanted, it can attack as though it didn't have defender.
Effect effect = new ConditionalAsThoughEffect(
- new CanAttackAsThoughtItDidntHaveDefenderEffect(Duration.WhileOnBattlefield),
+ new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
new EnchantedCondition());
effect.setText("As long as {this} is enchanted, it can attack as though it didn't have defender");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
diff --git a/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java b/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java
index cd43c80ee8..8d3c8c2984 100644
--- a/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java
+++ b/Mage.Sets/src/mage/sets/commander/ChorusOfTheConclave.java
@@ -129,10 +129,14 @@ class ChorusOfTheConclaveReplacementEffect extends ReplacementEffectImpl {
return false;
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType() == GameEvent.EventType.CAST_SPELL;
+ }
+
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
- if ((event.getType() == GameEvent.EventType.CAST_SPELL)
- && event.getPlayerId() == source.getControllerId()) {
+ if (event.getPlayerId() == source.getControllerId()) {
MageObject spellObject = game.getObject(event.getSourceId());
if (spellObject != null) {
return spellObject.getCardType().contains(CardType.CREATURE);
diff --git a/Mage.Sets/src/mage/sets/darkascension/CurseOfBloodletting.java b/Mage.Sets/src/mage/sets/darkascension/CurseOfBloodletting.java
index 522e49f38d..7602ed7e91 100644
--- a/Mage.Sets/src/mage/sets/darkascension/CurseOfBloodletting.java
+++ b/Mage.Sets/src/mage/sets/darkascension/CurseOfBloodletting.java
@@ -41,9 +41,7 @@ import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
-import static mage.game.events.GameEvent.EventType.DAMAGE_PLAYER;
import mage.game.permanent.Permanent;
-import mage.players.Player;
import mage.target.TargetPlayer;
/**
@@ -96,16 +94,18 @@ class CurseOfBloodlettingEffect extends ReplacementEffectImpl {
return new CurseOfBloodlettingEffect(this);
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER);
+ }
+
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
- switch (event.getType()) {
- case DAMAGE_PLAYER:
- Permanent enchantment = game.getPermanent(source.getSourceId());
- if (enchantment != null &&
- enchantment.getAttachedTo() != null &&
- event.getTargetId().equals(enchantment.getAttachedTo())) {
- return true;
- }
+ Permanent enchantment = game.getPermanent(source.getSourceId());
+ if (enchantment != null &&
+ enchantment.getAttachedTo() != null &&
+ event.getTargetId().equals(enchantment.getAttachedTo())) {
+ return true;
}
return false;
}
diff --git a/Mage.Sets/src/mage/sets/darkascension/PyreheartWolf.java b/Mage.Sets/src/mage/sets/darkascension/PyreheartWolf.java
index 348c37b8fd..b7bad59029 100644
--- a/Mage.Sets/src/mage/sets/darkascension/PyreheartWolf.java
+++ b/Mage.Sets/src/mage/sets/darkascension/PyreheartWolf.java
@@ -28,19 +28,17 @@
package mage.sets.darkascension;
import java.util.UUID;
-
-import mage.constants.*;
import mage.MageInt;
-import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
-import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.combat.CantBeBlockedByOneEffect;
+import mage.abilities.effects.common.combat.CantBeBlockedByOneAllEffect;
import mage.abilities.keyword.UndyingAbility;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
/**
*
@@ -48,18 +46,26 @@ import mage.game.permanent.Permanent;
*/
public class PyreheartWolf extends CardImpl {
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ }
+
public PyreheartWolf(UUID ownerId) {
super(ownerId, 101, "Pyreheart Wolf", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.expansionSetCode = "DKA";
this.subtype.add("Wolf");
- this.color.setRed(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Whenever Pyreheart Wolf attacks, each creature you control can't be blocked this turn except by two or more creatures.
+ this.addAbility(new AttacksTriggeredAbility(new CantBeBlockedByOneAllEffect(2, filter, Duration.EndOfTurn), false));
+
+ // Undying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
this.addAbility(new UndyingAbility());
- this.addAbility(new AttacksTriggeredAbility(new PyreheartWolfEffect(), false));
+
}
public PyreheartWolf(final PyreheartWolf card) {
@@ -71,32 +77,3 @@ public class PyreheartWolf extends CardImpl {
return new PyreheartWolf(this);
}
}
-
-class PyreheartWolfEffect extends OneShotEffect {
-
- public PyreheartWolfEffect() {
- super(Outcome.Benefit);
- this.staticText = "creatures you control can't be blocked except by two or more creatures until end of turn";
- }
-
- public PyreheartWolfEffect(final PyreheartWolfEffect effect) {
- super(effect);
- }
-
- @Override
- public PyreheartWolfEffect copy() {
- return new PyreheartWolfEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
-
- FilterCreaturePermanent filter = new FilterCreaturePermanent();
- for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
- CantBeBlockedByOneEffect effect = new CantBeBlockedByOneEffect(2, Duration.EndOfTurn);
- SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
- perm.addAbility(ability, game);
- }
- return false;
- }
-}
diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java b/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java
index 5d0d62e940..640d5eb803 100644
--- a/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java
+++ b/Mage.Sets/src/mage/sets/dragonsmaze/Dragonshift.java
@@ -1,105 +1,104 @@
-/*
- * 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.dragonsmaze;
-
-import java.util.UUID;
-import mage.MageInt;
-import mage.abilities.Ability;
-import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.Effect;
-import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect;
-import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
-import mage.abilities.effects.common.continuous.LoseAllAbilitiesAllEffect;
-import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect;
-import mage.abilities.keyword.FlyingAbility;
-import mage.abilities.keyword.OverloadAbility;
-import mage.cards.CardImpl;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.Rarity;
-import mage.constants.TargetController;
-import mage.filter.common.FilterControlledCreaturePermanent;
-import mage.filter.common.FilterCreaturePermanent;
-import mage.filter.predicate.permanent.ControllerPredicate;
-import mage.game.permanent.token.Token;
-import mage.target.common.TargetControlledCreaturePermanent;
-
-/**
- *
- * @author LevelX2
- */
-public class Dragonshift extends CardImpl {
-
- private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all creatures you controls");
- static {
- filter.add(new ControllerPredicate(TargetController.YOU));
- }
-
- public Dragonshift(UUID ownerId) {
- super(ownerId, 66, "Dragonshift", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{U}{R}");
- this.expansionSetCode = "DGM";
-
- this.color.setRed(true);
- this.color.setBlue(true);
-
- // Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying.
- Effect effect = new BecomesCreatureTargetEffect(new DragonToken(), true, false, Duration.EndOfTurn);
- effect.setText("Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying.");
- this.getSpellAbility().addEffect(effect);
- this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
-
- // Overload {3}{U}{U}{R}{R}
- Ability ability = new OverloadAbility(this, new LoseAllAbilitiesAllEffect(new FilterControlledCreaturePermanent(""), Duration.EndOfTurn), new ManaCostsImpl("{3}{U}{U}{R}{R}"));
- ability.addEffect(new BecomesCreatureAllEffect(new DragonToken(), null, filter, Duration.EndOfTurn));
- this.addAbility(ability);
- }
-
- public Dragonshift(final Dragonshift card) {
- super(card);
- }
-
- @Override
- public Dragonshift copy() {
- return new Dragonshift(this);
- }
-
- private class DragonToken extends Token {
-
- public DragonToken() {
- super("Dragon", "blue and red Dragon with base power and toughness 4/4 and with flying");
- cardType.add(CardType.CREATURE);
- color.setBlue(true);
- color.setRed(true);
- subtype.add("Dragon");
- power = new MageInt(4);
- toughness = new MageInt(4);
- this.addAbility(FlyingAbility.getInstance());
- }
-
- }
-}
+/*
+ * 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.dragonsmaze;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect;
+import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
+import mage.abilities.effects.common.continuous.LoseAllAbilitiesAllEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.abilities.keyword.OverloadAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.game.permanent.token.Token;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class Dragonshift extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all creatures you controls");
+ static {
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ }
+
+ public Dragonshift(UUID ownerId) {
+ super(ownerId, 66, "Dragonshift", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{U}{R}");
+ this.expansionSetCode = "DGM";
+
+ this.color.setRed(true);
+ this.color.setBlue(true);
+
+ // Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying.
+ Effect effect = new BecomesCreatureTargetEffect(new DragonToken(), true, false, Duration.EndOfTurn);
+ effect.setText("Until end of turn, target creature you control becomes a blue and red Dragon with base power and toughness 4/4, loses all abilities, and gains flying.");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
+
+ // Overload {3}{U}{U}{R}{R}
+ Ability ability = new OverloadAbility(this, new LoseAllAbilitiesAllEffect(new FilterControlledCreaturePermanent(""), Duration.EndOfTurn), new ManaCostsImpl("{3}{U}{U}{R}{R}"));
+ ability.addEffect(new BecomesCreatureAllEffect(new DragonToken(), null, filter, Duration.EndOfTurn));
+ this.addAbility(ability);
+ }
+
+ public Dragonshift(final Dragonshift card) {
+ super(card);
+ }
+
+ @Override
+ public Dragonshift copy() {
+ return new Dragonshift(this);
+ }
+
+ private class DragonToken extends Token {
+
+ public DragonToken() {
+ super("Dragon", "blue and red Dragon with base power and toughness 4/4 and with flying");
+ cardType.add(CardType.CREATURE);
+ color.setBlue(true);
+ color.setRed(true);
+ subtype.add("Dragon");
+ power = new MageInt(4);
+ toughness = new MageInt(4);
+ this.addAbility(FlyingAbility.getInstance());
+ }
+
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java b/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java
index 51ee138fd7..6338e83699 100644
--- a/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java
+++ b/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java
@@ -108,9 +108,7 @@ class ScabClanGiantEffect extends OneShotEffect {
// 20110930 - 701.10
if (creature1 != null && creature2 != null) {
if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) {
- creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true);
- creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true);
- return true;
+ return creature1.fight(creature2, source, game);
}
}
return false;
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/AinokArtillerist.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/AinokArtillerist.java
new file mode 100644
index 0000000000..3440aa88f7
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/AinokArtillerist.java
@@ -0,0 +1,71 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.common.SourceHasCounterCondition;
+import mage.abilities.decorator.ConditionalContinuousEffect;
+import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.keyword.ReachAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class AinokArtillerist extends CardImpl {
+
+ public AinokArtillerist(UUID ownerId) {
+ super(ownerId, 171, "Ainok Artillerist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Hound");
+ this.subtype.add("Arch");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(1);
+
+ // Ainok Artillerist has reach as long as it has a +1/+1 counter on it.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
+ new ConditionalContinuousEffect(new GainAbilitySourceEffect(ReachAbility.getInstance()),
+ new SourceHasCounterCondition(CounterType.P1P1),"{this} has reach as long as it has a +1/+1 counter on it")));
+ }
+
+ public AinokArtillerist(final AinokArtillerist card) {
+ super(card);
+ }
+
+ @Override
+ public AinokArtillerist copy() {
+ return new AinokArtillerist(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/AssaultFormation.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/AssaultFormation.java
new file mode 100644
index 0000000000..75a189ac7a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/AssaultFormation.java
@@ -0,0 +1,127 @@
+/*
+ * 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.dragonsoftarkir;
+
+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.ContinuousEffectImpl;
+import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderTargetEffect;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.keyword.DefenderAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Layer;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.SubLayer;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.AbilityPredicate;
+import mage.filter.predicate.permanent.ControllerIdPredicate;
+import mage.game.Game;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class AssaultFormation extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with defender");
+
+ static {
+ filter.add(new AbilityPredicate(DefenderAbility.class));
+ }
+
+ public AssaultFormation(UUID ownerId) {
+ super(ownerId, 173, "Assault Formation", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Each creature you control assigns combat damage equal to its toughness rather than its power.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AssaultFormationCombatDamageRuleEffect()));
+
+ // {G}: Target creature with defender can attack this turn as though it didn't have defender.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{G}"));
+ ability.addTarget(new TargetCreaturePermanent(filter));
+ this.addAbility(ability);
+
+ // {2}{G}: Creatures you control get +0/+1 until end of turn.
+ this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0,1,Duration.EndOfTurn), new ManaCostsImpl("{2}{G}")));
+
+ }
+
+ public AssaultFormation(final AssaultFormation card) {
+ super(card);
+ }
+
+ @Override
+ public AssaultFormation copy() {
+ return new AssaultFormation(this);
+ }
+}
+
+class AssaultFormationCombatDamageRuleEffect extends ContinuousEffectImpl {
+
+ public AssaultFormationCombatDamageRuleEffect() {
+ super(Duration.WhileOnBattlefield, Outcome.Detriment);
+ staticText = "Each creature you control assigns combat damage equal to its toughness rather than its power";
+ }
+
+ public AssaultFormationCombatDamageRuleEffect(final AssaultFormationCombatDamageRuleEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public AssaultFormationCombatDamageRuleEffect copy() {
+ return new AssaultFormationCombatDamageRuleEffect(this);
+ }
+
+ @Override
+ public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
+ // Change the rule
+ FilterCreaturePermanent filter = new FilterCreaturePermanent();
+ filter.add(new ControllerIdPredicate(source.getControllerId()));
+ game.getCombat().setUseToughnessForDamage(true);
+ game.getCombat().addUseToughnessForDamageFilter(filter);
+ return true;
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return false;
+ }
+
+ @Override
+ public boolean hasLayer(Layer layer) {
+ return layer == Layer.RulesEffects;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaBeastbreaker.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaBeastbreaker.java
new file mode 100644
index 0000000000..d0fda78ed9
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaBeastbreaker.java
@@ -0,0 +1,76 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.ActivateIfConditionActivatedAbility;
+import mage.abilities.condition.common.FormidableCondition;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.AbilityWord;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class AtarkaBeastbreaker extends CardImpl {
+
+ public AtarkaBeastbreaker(UUID ownerId) {
+ super(ownerId, 174, "Atarka Beastbreaker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(2);
+
+ // Formidable - {4}{G}: Atarka Beastbreaker gets +4/+4 until end of turn. Activate this only if creatures you control have total power 8 or greater.
+ Ability ability = new ActivateIfConditionActivatedAbility(
+ Zone.BATTLEFIELD,
+ new BoostSourceEffect(4,4, Duration.EndOfTurn),
+ new ManaCostsImpl("{4}{G}"),
+ FormidableCondition.getInstance());
+ ability.setAbilityWord(AbilityWord.FORMIDABLE);
+ this.addAbility(ability);
+ }
+
+ public AtarkaBeastbreaker(final AtarkaBeastbreaker card) {
+ super(card);
+ }
+
+ @Override
+ public AtarkaBeastbreaker copy() {
+ return new AtarkaBeastbreaker(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaEfreet.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaEfreet.java
new file mode 100644
index 0000000000..355be7b29d
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaEfreet.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.abilities.keyword.MorphAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreatureOrPlayer;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class AtarkaEfreet extends CardImpl {
+
+ public AtarkaEfreet(UUID ownerId) {
+ super(ownerId, 128, "Atarka Efreet", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Efreet");
+ this.subtype.add("Shaman");
+ this.power = new MageInt(5);
+ this.toughness = new MageInt(1);
+
+ // Megamorph {2}{R}
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{R}"), true));
+
+ // When Atarka Efreet is turned face up, it deals 1 damage to target creature or player.
+ Effect effect = new DamageTargetEffect(1);
+ effect.setText("it deals 1 damage to target creature or player");
+ Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect, false, false);
+ ability.addTarget(new TargetCreatureOrPlayer());
+ this.addAbility(ability);
+
+ }
+
+ public AtarkaEfreet(final AtarkaEfreet card) {
+ super(card);
+ }
+
+ @Override
+ public AtarkaEfreet copy() {
+ return new AtarkaEfreet(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaPummeler.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaPummeler.java
new file mode 100644
index 0000000000..3fce0b5eb3
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/AtarkaPummeler.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.ActivateIfConditionActivatedAbility;
+import mage.abilities.condition.common.FormidableCondition;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.combat.CantBeBlockedByOneAllEffect;
+import mage.cards.CardImpl;
+import mage.constants.AbilityWord;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class AtarkaPummeler extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ }
+
+ public AtarkaPummeler(UUID ownerId) {
+ super(ownerId, 129, "Atarka Pummeler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Ogre");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(5);
+
+ // Formidable - {3}{R}{R}: Each creature you control can't be blocked this turn except by two or more creatures. Activate this ability only if creature you control have total power 8 or greater,
+ Ability ability = new ActivateIfConditionActivatedAbility(
+ Zone.BATTLEFIELD,
+ new CantBeBlockedByOneAllEffect(2, filter, Duration.EndOfTurn),
+ new ManaCostsImpl("{3}{R}{R}"),
+ FormidableCondition.getInstance());
+ ability.setAbilityWord(AbilityWord.FORMIDABLE);
+ this.addAbility(ability);
+
+ }
+
+ public AtarkaPummeler(final AtarkaPummeler card) {
+ super(card);
+ }
+
+ @Override
+ public AtarkaPummeler copy() {
+ return new AtarkaPummeler(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/AvatarOfTheResolute.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/AvatarOfTheResolute.java
index d1de1ad6ad..ac00d35b5d 100644
--- a/Mage.Sets/src/mage/sets/dragonsoftarkir/AvatarOfTheResolute.java
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/AvatarOfTheResolute.java
@@ -71,7 +71,8 @@ public class AvatarOfTheResolute extends CardImpl {
// Avatar of the Resolute enters the battlefield with a +1/+1 counter on it for each other creature you control with a +1/+1 counter on it.
DynamicValue numberCounters = new PermanentsOnBattlefieldCount(filter);
- this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), numberCounters, true)));
+ this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), numberCounters, true),
+ "with a +1/+1 counter on it for each other creature you control with a +1/+1 counter on it"));
}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/BerserkersOnslaught.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/BerserkersOnslaught.java
new file mode 100644
index 0000000000..15cf62da0a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/BerserkersOnslaught.java
@@ -0,0 +1,65 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
+import mage.abilities.keyword.DoubleStrikeAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterAttackingCreature;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class BerserkersOnslaught extends CardImpl {
+
+ public BerserkersOnslaught(UUID ownerId) {
+ super(ownerId, 130, "Berserkers' Onslaught", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}");
+ this.expansionSetCode = "DTK";
+
+ // Attacking creatures you control have double strike.
+ GainAbilityControlledEffect gainEffect = new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, new FilterAttackingCreature("Attacking creatures"), false);
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, gainEffect));
+
+ }
+
+ public BerserkersOnslaught(final BerserkersOnslaught card) {
+ super(card);
+ }
+
+ @Override
+ public BerserkersOnslaught copy() {
+ return new BerserkersOnslaught(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/BlessedReincarnation.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/BlessedReincarnation.java
new file mode 100644
index 0000000000..b2a0500f83
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/BlessedReincarnation.java
@@ -0,0 +1,143 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.Set;
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ExileTargetEffect;
+import mage.abilities.keyword.ReboundAbility;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.cards.Cards;
+import mage.cards.CardsImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Library;
+import mage.players.Player;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class BlessedReincarnation extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.OPPONENT));
+ }
+
+ public BlessedReincarnation(UUID ownerId) {
+ super(ownerId, 47, "Blessed Reincarnation", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}");
+ this.expansionSetCode = "DTK";
+
+ // Exile target creature an opponent controls.
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
+ this.getSpellAbility().addEffect(new ExileTargetEffect());
+
+ // That player reveals cards from the top of his or her library until a creature card is revealed.
+ // The player puts that card onto the battlefield, then shuffles the rest into his or her library.
+ this.getSpellAbility().addEffect(new BlessedReincarnationEffect());
+
+ // Rebound
+ this.addAbility(new ReboundAbility());
+ }
+
+ public BlessedReincarnation(final BlessedReincarnation card) {
+ super(card);
+ }
+
+ @Override
+ public BlessedReincarnation copy() {
+ return new BlessedReincarnation(this);
+ }
+}
+
+class BlessedReincarnationEffect extends OneShotEffect {
+
+ public BlessedReincarnationEffect() {
+ super(Outcome.PutCreatureInPlay);
+ this.staticText = "That player reveals cards from the top of his or her library until a creature card is revealed. The player puts that card onto the battlefield, then shuffles the rest into his or her library";
+ }
+
+ public BlessedReincarnationEffect(final BlessedReincarnationEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public BlessedReincarnationEffect copy() {
+ return new BlessedReincarnationEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Permanent permanent = game.getPermanent(source.getFirstTarget());
+ if (permanent == null) {
+ permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
+ }
+
+ if (permanent != null) {
+ Player player = game.getPlayer(permanent.getControllerId());
+ if (player != null) {
+ Library library = player.getLibrary();
+ if (library.size() > 0) {
+ Cards cards = new CardsImpl();
+ Card card = library.removeFromTop(game);
+ cards.add(card);
+ while (!card.getCardType().contains(CardType.CREATURE) && library.size() > 0) {
+ card = library.removeFromTop(game);
+ cards.add(card);
+ }
+
+ if (card.getCardType().contains(CardType.CREATURE)) {
+ card.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), player.getId());
+ }
+
+ if (cards.size() > 0) {
+ player.revealCards("BlessedReincarnation", cards, game);
+ Set cardsToShuffle = cards.getCards(game);
+ cardsToShuffle.remove(card);
+ library.addAll(cardsToShuffle, game);
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/CircleOfElders.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/CircleOfElders.java
new file mode 100644
index 0000000000..d91d3f2a86
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/CircleOfElders.java
@@ -0,0 +1,80 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.Mana;
+import mage.abilities.Ability;
+import mage.abilities.condition.common.FormidableCondition;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.effects.common.BasicManaEffect;
+import mage.abilities.keyword.VigilanceAbility;
+import mage.abilities.mana.ActivateIfConditionManaAbility;
+import mage.cards.CardImpl;
+import mage.constants.AbilityWord;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class CircleOfElders extends CardImpl {
+
+ public CircleOfElders(UUID ownerId) {
+ super(ownerId, 176, "Circle of Elders", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Shaman");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(4);
+
+ // Vigilance
+ this.addAbility(VigilanceAbility.getInstance());
+
+ // Formidable - {T}: Add {3} to your mana pool. Activate this only if creatures you control have total power 8 or greater.
+ Ability ability = new ActivateIfConditionManaAbility(
+ Zone.BATTLEFIELD,
+ new BasicManaEffect(new Mana(0,0,0,0,0,3,0)),
+ new TapSourceCost(),
+ FormidableCondition.getInstance());
+ ability.setAbilityWord(AbilityWord.FORMIDABLE);
+ this.addAbility(ability);
+ }
+
+ public CircleOfElders(final CircleOfElders card) {
+ super(card);
+ }
+
+ @Override
+ public CircleOfElders copy() {
+ return new CircleOfElders(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/CollectedCompany.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/CollectedCompany.java
index a2dcc66fb0..565b64438e 100644
--- a/Mage.Sets/src/mage/sets/dragonsoftarkir/CollectedCompany.java
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/CollectedCompany.java
@@ -32,6 +32,7 @@ import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
@@ -55,7 +56,7 @@ public class CollectedCompany extends CardImpl {
this.expansionSetCode = "DTK";
// Look at the top six cards of your library. Put up to two creature cards with converted mana cost 3 or less from among them onto the battlefield. Put the rest on the bottom of your library in any order.
- this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(6, 2, filter, true));
+ this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(6, 2, filter, false, true, Zone.BATTLEFIELD, false));
}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/Contradict.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/Contradict.java
new file mode 100644
index 0000000000..22f6022249
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/Contradict.java
@@ -0,0 +1,64 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.common.CounterTargetEffect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.target.TargetSpell;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class Contradict extends CardImpl {
+
+ public Contradict(UUID ownerId) {
+ super(ownerId, 49, "Contradict", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{U}{U}");
+ this.expansionSetCode = "DTK";
+
+ // Counter target spell.
+ this.getSpellAbility().addEffect(new CounterTargetEffect());
+ this.getSpellAbility().addTarget(new TargetSpell());
+
+ // Draw a card.
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
+ }
+
+ public Contradict(final Contradict card) {
+ super(card);
+ }
+
+ @Override
+ public Contradict copy() {
+ return new Contradict(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/CraterElemental.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/CraterElemental.java
index b24004f326..9227ad538f 100644
--- a/Mage.Sets/src/mage/sets/dragonsoftarkir/CraterElemental.java
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/CraterElemental.java
@@ -37,7 +37,6 @@ import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.StaticValue;
-import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.cards.CardImpl;
@@ -72,7 +71,7 @@ public class CraterElemental extends CardImpl {
ability = new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD,
new SetPowerSourceEffect(new StaticValue(8), Duration.EndOfTurn),
- new ManaCostsImpl("{4}{R}{R}"),
+ new ManaCostsImpl("{2}{R}"),
FormidableCondition.getInstance());
ability.setAbilityWord(AbilityWord.FORMIDABLE);
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DamnablePact.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DamnablePact.java
new file mode 100644
index 0000000000..7efdcaae86
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DamnablePact.java
@@ -0,0 +1,93 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.TargetPlayer;
+
+/**
+ *
+ * @author jeffwadsworth
+ */
+public class DamnablePact extends CardImpl {
+
+ public DamnablePact(UUID ownerId) {
+ super(ownerId, 93, "Damnable Pact", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{B}{B}");
+ this.expansionSetCode = "DTK";
+
+ // Target player draws X cards and loses X life.
+ this.getSpellAbility().addEffect(new DamnablePactEffect());
+ this.getSpellAbility().addTarget(new TargetPlayer());
+
+ }
+
+ public DamnablePact(final DamnablePact card) {
+ super(card);
+ }
+
+ @Override
+ public DamnablePact copy() {
+ return new DamnablePact(this);
+ }
+}
+
+class DamnablePactEffect extends OneShotEffect {
+
+ public DamnablePactEffect() {
+ super(Outcome.Neutral);
+ staticText = "Target player draws X cards and loses X life";
+ }
+
+ public DamnablePactEffect(DamnablePactEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
+ if (targetPlayer != null) {
+ targetPlayer.drawCards(source.getManaCostsToPay().getX(), game);
+ targetPlayer.loseLife(source.getManaCostsToPay().getX(), game);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public DamnablePactEffect copy() {
+ return new DamnablePactEffect(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DanceOfTheSkywise.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DanceOfTheSkywise.java
new file mode 100644
index 0000000000..b0f1e2bdda
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DanceOfTheSkywise.java
@@ -0,0 +1,82 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.game.permanent.token.Token;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class DanceOfTheSkywise extends CardImpl {
+
+ public DanceOfTheSkywise(UUID ownerId) {
+ super(ownerId, 50, "Dance of the Skywise", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
+ this.expansionSetCode = "DTK";
+
+ // Until end of turn, target creature you control becomes a blue Dragon Illusion with base power and toughness 4/4, loses all abilities, and gains flying.
+ Effect effect = new BecomesCreatureTargetEffect(new DragonIllusionToken(), true, false, Duration.EndOfTurn);
+ effect.setText("Until end of turn, target creature you control becomes a blue Dragon Illusion with base power and toughness 4/4, loses all abilities, and gains flying.");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
+ }
+
+ public DanceOfTheSkywise(final DanceOfTheSkywise card) {
+ super(card);
+ }
+
+ @Override
+ public DanceOfTheSkywise copy() {
+ return new DanceOfTheSkywise(this);
+ }
+
+ private class DragonIllusionToken extends Token {
+
+ public DragonIllusionToken() {
+ super("Dragon", "blue Dragon Illusion with base power and toughness 4/4 and with flying");
+ cardType.add(CardType.CREATURE);
+ color.setBlue(true);
+ subtype.add("Dragon");
+ subtype.add("Illusion");
+ power = new MageInt(4);
+ toughness = new MageInt(4);
+ this.addAbility(FlyingAbility.getInstance());
+ }
+
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DeathmistRaptor.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DeathmistRaptor.java
new file mode 100644
index 0000000000..b3aec80aac
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DeathmistRaptor.java
@@ -0,0 +1,109 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.TurnedFaceUpAllTriggeredAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.keyword.DeathtouchAbility;
+import mage.abilities.keyword.MorphAbility;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterControlledPermanent;
+import mage.game.Game;
+import mage.players.Player;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DeathmistRaptor extends CardImpl {
+
+ public DeathmistRaptor(UUID ownerId) {
+ super(ownerId, 180, "Deathmist Raptor", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Lizard");
+ this.subtype.add("Beast");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(3);
+
+ // Deathtouch
+ this.addAbility(DeathtouchAbility.getInstance());
+
+ // Whenever a permanent you control is turned face up, you may return Deathmist Raptor from your graveyard to the battlefield face up or face down.
+ this.addAbility(new TurnedFaceUpAllTriggeredAbility(Zone.GRAVEYARD, new DeathmistRaptorEffect(), new FilterControlledPermanent(), false, true));
+
+ // Megamorph {4}{G}
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{G}"), true));
+ }
+
+ public DeathmistRaptor(final DeathmistRaptor card) {
+ super(card);
+ }
+
+ @Override
+ public DeathmistRaptor copy() {
+ return new DeathmistRaptor(this);
+ }
+}
+
+class DeathmistRaptorEffect extends OneShotEffect {
+
+ public DeathmistRaptorEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "you may return {this} from your graveyard to the battlefield face up or face down";
+ }
+
+ public DeathmistRaptorEffect(final DeathmistRaptorEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public DeathmistRaptorEffect copy() {
+ return new DeathmistRaptorEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ Card card = game.getCard(source.getSourceId());
+ if (controller != null && card != null) {
+ controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId(), false,
+ controller.chooseUse(Outcome.Detriment, "Return " + card.getName() + " face down to battlefield?", game));
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DirgurNemesis.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DirgurNemesis.java
new file mode 100644
index 0000000000..f34717e1bc
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DirgurNemesis.java
@@ -0,0 +1,66 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.keyword.DefenderAbility;
+import mage.abilities.keyword.MorphAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class DirgurNemesis extends CardImpl {
+
+ public DirgurNemesis(UUID ownerId) {
+ super(ownerId, 51, "Dirgur Nemesis", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{U}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Serpent");
+ this.power = new MageInt(6);
+ this.toughness = new MageInt(5);
+
+ // Defender
+ this.addAbility(DefenderAbility.getInstance());
+ // Megamorph {6}{U}
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{U}"), true));
+ }
+
+ public DirgurNemesis(final DirgurNemesis card) {
+ super(card);
+ }
+
+ @Override
+ public DirgurNemesis copy() {
+ return new DirgurNemesis(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DisplayOfDominance.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DisplayOfDominance.java
new file mode 100644
index 0000000000..04b2d05bc3
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DisplayOfDominance.java
@@ -0,0 +1,133 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageObject;
+import mage.ObjectColor;
+import mage.abilities.Ability;
+import mage.abilities.Mode;
+import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
+import mage.abilities.effects.common.DestroyTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.filter.FilterPermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+import mage.filter.predicate.mageobject.ColorPredicate;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.game.permanent.Permanent;
+import mage.game.stack.Spell;
+import mage.target.TargetPermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DisplayOfDominance extends CardImpl {
+
+ private static final FilterPermanent filter = new FilterPermanent("blue or black noncreature permanent");
+
+ static {
+ filter.add(Predicates.or(
+ new ColorPredicate(ObjectColor.BLUE),
+ new ColorPredicate(ObjectColor.BLACK)));
+ filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
+ }
+
+ public DisplayOfDominance(UUID ownerId) {
+ super(ownerId, 182, "Display of Dominance", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Choose one -
+ this.getSpellAbility().getModes().setMinModes(1);
+ this.getSpellAbility().getModes().setMaxModes(1);
+
+ // Destroy target blue or black noncreature permanent
+ this.getSpellAbility().addEffect(new DestroyTargetEffect());
+ this.getSpellAbility().addTarget(new TargetPermanent(filter));
+
+ // or Permanents you control can't be the targets of blue or black spells your opponents control this turn
+ Mode mode = new Mode();
+ mode.getEffects().add(new DisplayOfDominanceEffect());
+ this.getSpellAbility().getModes().addMode(mode);
+ }
+
+ public DisplayOfDominance(final DisplayOfDominance card) {
+ super(card);
+ }
+
+ @Override
+ public DisplayOfDominance copy() {
+ return new DisplayOfDominance(this);
+ }
+}
+
+class DisplayOfDominanceEffect extends ContinuousRuleModifyingEffectImpl {
+
+ public DisplayOfDominanceEffect() {
+ super(Duration.EndOfTurn, Outcome.Benefit);
+ staticText = "permanents you control can't be the targets of blue or black spells your opponents control this turn";
+ }
+
+ public DisplayOfDominanceEffect(final DisplayOfDominanceEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public DisplayOfDominanceEffect copy() {
+ return new DisplayOfDominanceEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return true;
+ }
+
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.TARGET;
+ }
+
+ @Override
+ public boolean applies(GameEvent event, Ability ability, Game game) {
+ MageObject mageObject = game.getObject(event.getSourceId());
+ if (game.getPlayer(ability.getControllerId()).hasOpponent(event.getPlayerId(), game) &&
+ mageObject instanceof Spell &&
+ (mageObject.getColor().isBlack() || mageObject.getColor().isBlue())) {
+ Permanent permanent = game.getPermanent(event.getTargetId());
+ return permanent != null && permanent.getControllerId().equals(ability.getControllerId());
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DraconicRoar.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DraconicRoar.java
new file mode 100644
index 0000000000..6d5d4bc59d
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DraconicRoar.java
@@ -0,0 +1,179 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.costs.Cost;
+import mage.abilities.costs.common.RevealTargetFromHandCost;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.WatcherScope;
+import mage.filter.common.FilterCreatureCard;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.permanent.Permanent;
+import mage.game.stack.Spell;
+import mage.players.Player;
+import mage.target.common.TargetCardInHand;
+import mage.target.common.TargetCreaturePermanent;
+import mage.watchers.Watcher;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DraconicRoar extends CardImpl {
+
+ private static final FilterCreatureCard filter = new FilterCreatureCard("a Dragon card from your hand");
+
+ static {
+ filter.add(new SubtypePredicate("Dragon"));
+ }
+
+ public DraconicRoar(UUID ownerId) {
+ super(ownerId, 134, "Draconic Roar", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
+ this.expansionSetCode = "DTK";
+
+ // As an additional cost to cast Draconic Roar, you may reveal a Dragon card from your hand.
+ this.getSpellAbility().addCost(new RevealTargetFromHandCost(new TargetCardInHand(0,1, new FilterCreatureCard("a Dragon card"))));
+ // TODO: You may is missing
+
+ // Draconic Roar deals 3 damage to target creature. If you revealed a Dragon card or controlled a Dragon as you cast Draconic Roar, Draconic Roar deals 3 damage to that creature's controller.
+ this.getSpellAbility().addEffect(new DamageTargetEffect(3));
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ this.getSpellAbility().addEffect(new DraconicRoarEffect());
+ this.getSpellAbility().addWatcher(new DraconicRoarCastWatcher());
+ }
+
+ public DraconicRoar(final DraconicRoar card) {
+ super(card);
+ }
+
+ @Override
+ public DraconicRoar copy() {
+ return new DraconicRoar(this);
+ }
+}
+
+
+class DraconicRoarEffect extends OneShotEffect {
+
+ public DraconicRoarEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "If you revealed a Dragon card or controlled a Dragon as you cast {this}, {this} deals 3 damage to that creature's controller";
+ }
+
+ public DraconicRoarEffect(final DraconicRoarEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public DraconicRoarEffect copy() {
+ return new DraconicRoarEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ DraconicRoarCastWatcher watcher = (DraconicRoarCastWatcher) game.getState().getWatchers().get("DraconicRoarCastWatcher");
+ boolean condition = watcher != null && watcher.castWithConditionTrue(source.getId());
+ if (!condition) {
+ for (Cost cost: source.getCosts()) {
+ if (cost instanceof RevealTargetFromHandCost) {
+ condition = ((RevealTargetFromHandCost)cost).getNumberRevealedCards() > 0;
+ }
+ }
+ }
+ if (condition) {
+ Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
+ if (permanent != null) {
+ Player player = game.getPlayer(permanent.getControllerId());
+ if (player != null) {
+ player.damage(3, source.getSourceId(), game, false, true);
+ }
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+}
+
+class DraconicRoarCastWatcher extends Watcher {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dragon", "Dragons");
+
+ private final Set castWithDragonOnTheBattlefield = new HashSet<>();
+
+ public DraconicRoarCastWatcher() {
+ super("DraconicRoarCastWatcher", WatcherScope.GAME);
+ }
+
+ public DraconicRoarCastWatcher(final DraconicRoarCastWatcher watcher) {
+ super(watcher);
+ this.castWithDragonOnTheBattlefield.addAll(watcher.castWithDragonOnTheBattlefield);
+ }
+
+ @Override
+ public void watch(GameEvent event, Game game) {
+ if (event.getType() == GameEvent.EventType.SPELL_CAST) {
+ // targetId is the unique ID of the spell
+ Spell spell = game.getState().getStack().getSpell(event.getTargetId());
+ if (spell != null) {
+ if (game.getBattlefield().countAll(filter, spell.getControllerId(), game) > 0) {
+ castWithDragonOnTheBattlefield.add(spell.getId());
+ }
+
+ }
+ }
+ }
+
+ @Override
+ public void reset() {
+ castWithDragonOnTheBattlefield.clear();
+ }
+
+ public boolean castWithConditionTrue(UUID spellId) {
+ return castWithDragonOnTheBattlefield.contains(spellId);
+ }
+
+ @Override
+ public DraconicRoarCastWatcher copy() {
+ return new DraconicRoarCastWatcher(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DragonScarredBear.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DragonScarredBear.java
new file mode 100644
index 0000000000..283c45181b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DragonScarredBear.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.ActivateIfConditionActivatedAbility;
+import mage.abilities.condition.common.FormidableCondition;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.RegenerateSourceEffect;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.AbilityWord;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DragonScarredBear extends CardImpl {
+
+ public DragonScarredBear(UUID ownerId) {
+ super(ownerId, 183, "Dragon-Scarred Bear", Rarity.COMMON, new CardType[]{}, "{2}{G}");
+ this.expansionSetCode = "DTK";
+ this.supertype.add("Creaure");
+ this.supertype.add("Bear");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(2);
+
+ // Formidable - {1}{G}: Regenerate Dragon-Scarred Bear. Activate this only if creatures you control have total power 8 or greater.
+ Ability ability = new ActivateIfConditionActivatedAbility(
+ Zone.BATTLEFIELD,
+ new RegenerateSourceEffect(),
+ new ManaCostsImpl("{1}{G}"),
+ FormidableCondition.getInstance());
+ ability.setAbilityWord(AbilityWord.FORMIDABLE);
+ this.addAbility(ability);
+ }
+
+ public DragonScarredBear(final DragonScarredBear card) {
+ super(card);
+ }
+
+ @Override
+ public DragonScarredBear copy() {
+ return new DragonScarredBear(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DromokasGift.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DromokasGift.java
new file mode 100644
index 0000000000..100ee420e4
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DromokasGift.java
@@ -0,0 +1,58 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.keyword.BolsterEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class DromokasGift extends CardImpl {
+
+ public DromokasGift(UUID ownerId) {
+ super(ownerId, 184, "Dromoka's Gift", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Bolster 4.
+ this.getSpellAbility().addEffect(new BolsterEffect(4));
+ }
+
+ public DromokasGift(final DromokasGift card) {
+ super(card);
+ }
+
+ @Override
+ public DromokasGift copy() {
+ return new DromokasGift(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ElusiveSpellfist.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ElusiveSpellfist.java
new file mode 100644
index 0000000000..d9b89a020a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ElusiveSpellfist.java
@@ -0,0 +1,81 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SpellCastControllerTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.filter.FilterSpell;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class ElusiveSpellfist extends CardImpl {
+
+ private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell");
+
+ static {
+ filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
+ }
+
+ public ElusiveSpellfist(UUID ownerId) {
+ super(ownerId, 53, "Elusive Spellfist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Monk");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(3);
+
+ // Whenever you cast a noncreature spell, Elusive Spellfist gets +1/+0 until end of turn and can't be blocked this turn.
+ Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1,0,Duration.EndOfTurn), filterNonCreature, false);
+ Effect effect = new CantBeBlockedSourceEffect();
+ effect.setText("and can't be blocked this turn");
+ ability.addEffect(effect);
+ this.addAbility(ability);
+ }
+
+ public ElusiveSpellfist(final ElusiveSpellfist card) {
+ super(card);
+ }
+
+ @Override
+ public ElusiveSpellfist copy() {
+ return new ElusiveSpellfist(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/EnduringVictory.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/EnduringVictory.java
new file mode 100644
index 0000000000..62b52d5667
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/EnduringVictory.java
@@ -0,0 +1,63 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.common.DestroyTargetEffect;
+import mage.abilities.effects.keyword.BolsterEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.filter.common.FilterAttackingOrBlockingCreature;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class EnduringVictory extends CardImpl {
+
+ public EnduringVictory(UUID ownerId) {
+ super(ownerId, 16, "Enduring Victory", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{W}");
+ this.expansionSetCode = "DTK";
+
+ // Destroy target attacking or blocking creature. Bolster 1.
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterAttackingOrBlockingCreature()));
+ this.getSpellAbility().addEffect(new DestroyTargetEffect());
+ this.getSpellAbility().addEffect(new BolsterEffect(1));
+ }
+
+ public EnduringVictory(final EnduringVictory card) {
+ super(card);
+ }
+
+ @Override
+ public EnduringVictory copy() {
+ return new EnduringVictory(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/FoeRazerRegent.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/FoeRazerRegent.java
new file mode 100644
index 0000000000..93568ecf4f
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/FoeRazerRegent.java
@@ -0,0 +1,165 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.DelayedTriggeredAbility;
+import mage.abilities.TriggeredAbilityImpl;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
+import mage.abilities.effects.common.FightTargetSourceEffect;
+import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.game.permanent.Permanent;
+import mage.target.common.TargetCreaturePermanent;
+import mage.target.targetpointer.FixedTarget;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class FoeRazerRegent extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.NOT_YOU));
+ }
+
+ public FoeRazerRegent(UUID ownerId) {
+ super(ownerId, 187, "Foe-Razer Regent", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Dragon");
+ this.power = new MageInt(4);
+ this.toughness = new MageInt(5);
+
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+
+ // When Foe-Razer Regent enters the battlefield, you may have it fight target creature you don't control.
+ Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect(), true);
+ ability.addTarget(new TargetCreaturePermanent(filter));
+ this.addAbility(ability);
+
+ // Whenever a creature you control fights, put two +1/+1 counters on it at the beginning of the next end step.
+ this.addAbility(new FoeRazerRegentTriggeredAbility());
+ }
+
+ public FoeRazerRegent(final FoeRazerRegent card) {
+ super(card);
+ }
+
+ @Override
+ public FoeRazerRegent copy() {
+ return new FoeRazerRegent(this);
+ }
+}
+
+class FoeRazerRegentTriggeredAbility extends TriggeredAbilityImpl {
+
+ public FoeRazerRegentTriggeredAbility() {
+ super(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect(new FoeRazerRegentDelayedTriggeredAbility(), true), false);
+ }
+
+ public FoeRazerRegentTriggeredAbility(final FoeRazerRegentTriggeredAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public FoeRazerRegentTriggeredAbility copy() {
+ return new FoeRazerRegentTriggeredAbility(this);
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event.getType().equals(EventType.FIGHTED_PERMANENT);
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
+ if (permanent != null && permanent.getControllerId().equals(getControllerId())) {
+ for (Effect effect: this.getEffects()) {
+ effect.setTargetPointer(new FixedTarget(event.getSourceId()));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "Whenever a creature you control fights, put two +1/+1 counters on it at the beginning of the next end step.";
+ }
+}
+
+class FoeRazerRegentDelayedTriggeredAbility extends DelayedTriggeredAbility {
+
+ public FoeRazerRegentDelayedTriggeredAbility() {
+ super(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)));
+ }
+
+ public FoeRazerRegentDelayedTriggeredAbility(final FoeRazerRegentDelayedTriggeredAbility ability) {
+ super(ability);
+ }
+
+ @Override
+ public FoeRazerRegentDelayedTriggeredAbility copy() {
+ return new FoeRazerRegentDelayedTriggeredAbility(this);
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ if (event.getType() == EventType.END_TURN_STEP_PRE) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "put two +1/+1 counters on it at the beginning of the next end step";
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/GladeWatcher.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/GladeWatcher.java
new file mode 100644
index 0000000000..964d318d10
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/GladeWatcher.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.ActivateIfConditionActivatedAbility;
+import mage.abilities.condition.common.FormidableCondition;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.keyword.DefenderAbility;
+import mage.cards.CardImpl;
+import mage.constants.AbilityWord;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GladeWatcher extends CardImpl {
+
+ public GladeWatcher(UUID ownerId) {
+ super(ownerId, 188, "Glade Watcher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Elemental");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(3);
+
+ // Defender
+ this.addAbility(DefenderAbility.getInstance());
+ // Formidable - {G}: Glade Watcher can attack this turn as though it didn't have defender. Activate this ability only if creatures you control have total power 8 or greater.
+ Ability ability = new ActivateIfConditionActivatedAbility(
+ Zone.BATTLEFIELD,
+ new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.EndOfTurn),
+ new ManaCostsImpl("{G}"),
+ FormidableCondition.getInstance());
+ ability.setAbilityWord(AbilityWord.FORMIDABLE);
+ this.addAbility(ability);
+ }
+
+ public GladeWatcher(final GladeWatcher card) {
+ super(card);
+ }
+
+ @Override
+ public GladeWatcher copy() {
+ return new GladeWatcher(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/GlaringAegis.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/GlaringAegis.java
new file mode 100644
index 0000000000..0e9baa7917
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/GlaringAegis.java
@@ -0,0 +1,91 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.TapTargetEffect;
+import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class GlaringAegis extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.OPPONENT));
+ }
+
+ public GlaringAegis(UUID ownerId) {
+ super(ownerId, 18, "Glaring Aegis", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Aura");
+
+ // Enchant creature
+ TargetPermanent auraTarget = new TargetCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // When Glaring Aegis enters the battlefield, tap target creature an opponent controls.
+ Ability ability2 = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
+ ability2.addTarget(new TargetCreaturePermanent(filter));
+ this.addAbility(ability2);
+
+ // Enchanted creature gets +1/+3.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 3, Duration.WhileOnBattlefield)));
+ }
+
+ public GlaringAegis(final GlaringAegis card) {
+ super(card);
+ }
+
+ @Override
+ public GlaringAegis copy() {
+ return new GlaringAegis(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/Glint.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/Glint.java
new file mode 100644
index 0000000000..181250f057
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/Glint.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.HexproofAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class Glint extends CardImpl {
+
+ public Glint(UUID ownerId) {
+ super(ownerId, 55, "Glint", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
+ this.expansionSetCode = "DTK";
+
+ // Target creature you control gets +0/+3 and gains hexproof until end of turn.
+ this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
+ Effect effect = new BoostTargetEffect(0, 3, Duration.EndOfTurn);
+ effect.setText("Target creature you control gets +0/+3");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains hexproof until end of turn");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public Glint(final Glint card) {
+ super(card);
+ }
+
+ @Override
+ public Glint copy() {
+ return new Glint(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/GracebladeArtisan.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/GracebladeArtisan.java
new file mode 100644
index 0000000000..ad0d01bcf9
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/GracebladeArtisan.java
@@ -0,0 +1,68 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.dynamicvalue.common.AuraAttachedCount;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class GracebladeArtisan extends CardImpl {
+
+ public GracebladeArtisan(UUID ownerId) {
+ super(ownerId, 20, "Graceblade Artisan", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Monk");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(3);
+
+ // Graceblade Artisan gets +2/+2 for each Aura attached to it.
+ AuraAttachedCount count = new AuraAttachedCount(2);
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield)));
+ }
+
+ public GracebladeArtisan(final GracebladeArtisan card) {
+ super(card);
+ }
+
+ @Override
+ public GracebladeArtisan copy() {
+ return new GracebladeArtisan(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/GuardianShieldBearer.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/GuardianShieldBearer.java
new file mode 100644
index 0000000000..41856949b0
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/GuardianShieldBearer.java
@@ -0,0 +1,83 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.abilities.keyword.MorphAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.counters.CounterType;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.predicate.permanent.AnotherPredicate;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GuardianShieldBearer extends CardImpl {
+
+ private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control");
+
+ static {
+ filter.add(new AnotherPredicate());
+ }
+
+ public GuardianShieldBearer(UUID ownerId) {
+ super(ownerId, 189, "Guardian Shield-Bearer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(1);
+
+ // Megamorph {3}{G}
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{G}"), true));
+
+ // When Guardian Shield-Bearer is turned face up, put a +1/+1 counter on another target creature you control.
+ Ability ability = new TurnedFaceUpSourceTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false);
+ ability.addTarget(new TargetControlledCreaturePermanent(filter));
+ this.addAbility(ability);
+
+ }
+
+ public GuardianShieldBearer(final GuardianShieldBearer card) {
+ super(card);
+ }
+
+ @Override
+ public GuardianShieldBearer copy() {
+ return new GuardianShieldBearer(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/GurmagDrowner.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/GurmagDrowner.java
new file mode 100644
index 0000000000..945c5e3721
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/GurmagDrowner.java
@@ -0,0 +1,125 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.MageObject;
+import mage.abilities.Ability;
+import mage.abilities.common.ExploitCreatureTriggeredAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.keyword.ExploitAbility;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.cards.Cards;
+import mage.cards.CardsImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.FilterCard;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.TargetCard;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class GurmagDrowner extends CardImpl {
+
+ public GurmagDrowner(UUID ownerId) {
+ super(ownerId, 57, "Gurmag Drowner", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Naga");
+ this.subtype.add("Wizard");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(4);
+
+ // Exploit
+ this.addAbility(new ExploitAbility());
+
+ // When Gurmag Drowner exploits a creature, look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard.
+ this.addAbility(new ExploitCreatureTriggeredAbility(new GurmagDrownerEffect(), false));
+ }
+
+ public GurmagDrowner(final GurmagDrowner card) {
+ super(card);
+ }
+
+ @Override
+ public GurmagDrowner copy() {
+ return new GurmagDrowner(this);
+ }
+}
+
+class GurmagDrownerEffect extends OneShotEffect {
+
+ public GurmagDrownerEffect() {
+ super(Outcome.DrawCard);
+ this.staticText = "look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard";
+ }
+
+ public GurmagDrownerEffect(final GurmagDrownerEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public GurmagDrownerEffect copy() {
+ return new GurmagDrownerEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ MageObject sourceObject = game.getObject(source.getSourceId());
+ if (controller != null && sourceObject != null) {
+ Cards cards = new CardsImpl();
+ cards.addAll(controller.getLibrary().getTopCards(game, 4));
+
+ if (cards.size() > 0) {
+ controller.lookAtCards(sourceObject.getLogName(), cards, game);
+
+ TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand"));
+ if (controller.choose(Outcome.Benefit, cards, target, game)) {
+ Card card = cards.get(target.getFirstTarget(), game);
+ if (card != null) {
+ card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
+ cards.remove(card);
+ }
+ }
+
+ for (Card card : cards.getCards(game)) {
+ controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/HardenedBerserker.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/HardenedBerserker.java
new file mode 100644
index 0000000000..3a0e2611db
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/HardenedBerserker.java
@@ -0,0 +1,103 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.SpellAbility;
+import mage.abilities.common.AttacksTriggeredAbility;
+import mage.abilities.effects.common.cost.CostModificationEffectImpl;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.CostModificationType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.game.Game;
+import mage.util.CardUtil;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class HardenedBerserker extends CardImpl {
+
+ public HardenedBerserker(UUID ownerId) {
+ super(ownerId, 139, "Hardened Berserker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Berserker");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(2);
+
+ // Whenever Hardened Berserker attacks the next spell you cast this turn costs {1} less to cast.
+ this.addAbility(new AttacksTriggeredAbility(new HardenedBerserkerSpellsCostReductionEffect(), false));
+ }
+
+ public HardenedBerserker(final HardenedBerserker card) {
+ super(card);
+ }
+
+ @Override
+ public HardenedBerserker copy() {
+ return new HardenedBerserker(this);
+ }
+}
+
+class HardenedBerserkerSpellsCostReductionEffect extends CostModificationEffectImpl {
+
+ public HardenedBerserkerSpellsCostReductionEffect() {
+ super(Duration.EndOfTurn, Outcome.Benefit, CostModificationType.REDUCE_COST);
+ staticText = "the next spell you cast this turn costs {1} less to cast";
+ }
+
+ protected HardenedBerserkerSpellsCostReductionEffect(HardenedBerserkerSpellsCostReductionEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source, Ability abilityToModify) {
+ CardUtil.reduceCost(abilityToModify, 1);
+ discard(); // only one use
+ return true;
+ }
+
+ @Override
+ public boolean applies(Ability abilityToModify, Ability source, Game game) {
+ if (abilityToModify instanceof SpellAbility) {
+ return abilityToModify.getControllerId().equals(source.getControllerId());
+ }
+ return false;
+ }
+
+ @Override
+ public HardenedBerserkerSpellsCostReductionEffect copy() {
+ return new HardenedBerserkerSpellsCostReductionEffect(this);
+ }
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/HeraldOfDromoka.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/HeraldOfDromoka.java
new file mode 100644
index 0000000000..126e40d4ee
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/HeraldOfDromoka.java
@@ -0,0 +1,83 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.common.continuous.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.FilterPermanent;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+import mage.filter.predicate.mageobject.SubtypePredicate;
+import mage.filter.predicate.permanent.AnotherPredicate;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class HeraldOfDromoka extends CardImpl {
+
+ private static final FilterPermanent filter = new FilterPermanent("other Warrior creatures");
+
+ static {
+ filter.add(new CardTypePredicate(CardType.CREATURE));
+ filter.add(new SubtypePredicate("Warrior"));
+ filter.add(new AnotherPredicate());
+ }
+
+ public HeraldOfDromoka(UUID ownerId) {
+ super(ownerId, 22, "Herald of Dromoka", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(2);
+
+ // Vigilance
+ this.addAbility(VigilanceAbility.getInstance());
+
+ // Other Warrior creatures you control have vigilance.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect
+ (VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
+ }
+
+ public HeraldOfDromoka(final HeraldOfDromoka card) {
+ super(card);
+ }
+
+ @Override
+ public HeraldOfDromoka copy() {
+ return new HeraldOfDromoka(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/IllusoryGains.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/IllusoryGains.java
new file mode 100644
index 0000000000..e2c756460a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/IllusoryGains.java
@@ -0,0 +1,127 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.continuous.ControlEnchantedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.SetTargetPointer;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.FilterPermanent;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class IllusoryGains extends CardImpl {
+
+ private static final FilterPermanent filter = new FilterCreaturePermanent("a creature");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.OPPONENT));
+ }
+
+ public IllusoryGains(UUID ownerId) {
+ super(ownerId, 59, "Illusory Gains", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Aura");
+
+ // Enchant creature
+ TargetPermanent auraTarget = new TargetCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // You control enchanted creature.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect()));
+
+ // Whenever a creature enters the battlefield under an opponent's control, attach Illusory Gains to that creature.
+ this.addAbility(new EntersBattlefieldAllTriggeredAbility(
+ Zone.BATTLEFIELD, new IllusoryGainsEffect(), filter, false, SetTargetPointer.PERMANENT, "Whenever a creature enters the battlefield under an opponent's control, you attach Illusory Gains to that creature."));
+ }
+
+ public IllusoryGains(final IllusoryGains card) {
+ super(card);
+ }
+
+ @Override
+ public IllusoryGains copy() {
+ return new IllusoryGains(this);
+ }
+}
+
+class IllusoryGainsEffect extends OneShotEffect {
+
+ public IllusoryGainsEffect() {
+ super(Outcome.Detriment);
+ }
+
+ public IllusoryGainsEffect(final IllusoryGainsEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player you = game.getPlayer(source.getControllerId());
+ Permanent opponentCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
+ Permanent illusoryGains = game.getPermanent(source.getSourceId());
+ if (you != null && opponentCreature != null && illusoryGains != null) {
+ Permanent oldCreature = game.getPermanent(illusoryGains.getAttachedTo());
+ if (oldCreature == null) {
+ return false;
+ }
+ if (oldCreature.removeAttachment(illusoryGains.getId(), game)) {
+ return opponentCreature.addAttachment(illusoryGains.getId(), game);
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public IllusoryGainsEffect copy() {
+ return new IllusoryGainsEffect(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ImpactTremors.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ImpactTremors.java
new file mode 100644
index 0000000000..1822533339
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ImpactTremors.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
+import mage.abilities.dynamicvalue.common.StaticValue;
+import mage.abilities.effects.common.DamagePlayersEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ImpactTremors extends CardImpl {
+
+ public ImpactTremors(UUID ownerId) {
+ super(ownerId, 140, "Impact Tremors", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
+ this.expansionSetCode = "DTK";
+
+ // Whenever a creature enters the battlefield under your control, Impact Tremors deals 1 damage to each opponent.
+ this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD,
+ new DamagePlayersEffect(Outcome.Damage, new StaticValue(1), TargetController.OPPONENT),
+ new FilterCreaturePermanent("a creature"),
+ false));
+ }
+
+ public ImpactTremors(final ImpactTremors card) {
+ super(card);
+ }
+
+ @Override
+ public ImpactTremors copy() {
+ return new ImpactTremors(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/InspiringCall.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/InspiringCall.java
new file mode 100644
index 0000000000..57b4dfc73f
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/InspiringCall.java
@@ -0,0 +1,75 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
+import mage.abilities.keyword.IndestructibleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.counters.CounterType;
+import mage.filter.common.FilterControlledCreaturePermanent;
+import mage.filter.predicate.permanent.CounterPredicate;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class InspiringCall extends CardImpl {
+
+ private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it");
+
+ static {
+ filter.add(new CounterPredicate(CounterType.P1P1));
+ }
+
+ public InspiringCall(UUID ownerId) {
+ super(ownerId, 191, "Inspiring Call", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Draw a card for each creature you control with a +1/+1 counter on it. Those creatures gain indestructible until end of turn. (Damage and effects that say "destroy" don't destroy them.)
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)));
+ Effect effect = new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter);
+ effect.setText("Those creatures gain indestructible until end of turn. (Damage and effects that say \"destroy\" don't destroy them.)");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public InspiringCall(final InspiringCall card) {
+ super(card);
+ }
+
+ @Override
+ public InspiringCall copy() {
+ return new InspiringCall(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java
index c78e54933a..14cfeeed6d 100644
--- a/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/IreShaman.java
@@ -90,7 +90,7 @@ class IreShamanExileEffect extends OneShotEffect {
public IreShamanExileEffect() {
super(Outcome.Detriment);
- this.staticText = "Exile the top card of your library. Until end of turn, you may play that card";
+ this.staticText = "exile the top card of your library. Until end of turn, you may play that card";
}
public IreShamanExileEffect(final IreShamanExileEffect effect) {
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanAspirant.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanAspirant.java
new file mode 100644
index 0000000000..99e85891f4
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanAspirant.java
@@ -0,0 +1,64 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.BecomesBlockedByCreatureTriggeredAbility;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class KolaghanAspirant extends CardImpl {
+
+ public KolaghanAspirant(UUID ownerId) {
+ super(ownerId, 143, "Kolaghan Aspirant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(1);
+
+ // Whenever Kolaghan Aspirant becomes blocked by a creature, Kolaghan Aspirant deals 1 damage to that creature.
+ this.addAbility(new BecomesBlockedByCreatureTriggeredAbility(new DamageTargetEffect(1, true, "that creature"), false));
+ }
+
+ public KolaghanAspirant(final KolaghanAspirant card) {
+ super(card);
+ }
+
+ @Override
+ public KolaghanAspirant copy() {
+ return new KolaghanAspirant(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanForerunners.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanForerunners.java
new file mode 100644
index 0000000000..7869af7454
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanForerunners.java
@@ -0,0 +1,78 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
+import mage.abilities.keyword.TrampleAbility;
+import mage.abilities.keyword.DashAbility;
+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 LevelX2
+ */
+public class KolaghanForerunners extends CardImpl {
+
+ public KolaghanForerunners(UUID ownerId) {
+ super(ownerId, 144, "Kolaghan Forerunners", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Berserker");
+ this.power = new MageInt(0);
+ this.toughness = new MageInt(3);
+
+ // Trample
+ this.addAbility(TrampleAbility.getInstance());
+
+ // Kolaghan Forerunners' power is equal to the number of creatures you control.
+ Effect effect = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creatures you control")), Duration.EndOfGame);
+ this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
+
+ // Dash {2}{R}
+ this.addAbility(new DashAbility(this, "{2}{R}"));
+ }
+
+ public KolaghanForerunners(final KolaghanForerunners card) {
+ super(card);
+ }
+
+ @Override
+ public KolaghanForerunners copy() {
+ return new KolaghanForerunners(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanStormsinger.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanStormsinger.java
new file mode 100644
index 0000000000..a7c8cbba42
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/KolaghanStormsinger.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.HasteAbility;
+import mage.abilities.keyword.MorphAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class KolaghanStormsinger extends CardImpl {
+
+ public KolaghanStormsinger(UUID ownerId) {
+ super(ownerId, 145, "Kolaghan Stormsinger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Shaman");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(1);
+
+ // Haste
+ this.addAbility(HasteAbility.getInstance());
+ // Megamorph {R}
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{R}"), true));
+
+ // When Kolaghan Stormsinger is turned face up, target creature gains haste until end of turn.
+ Ability ability = new TurnedFaceUpSourceTriggeredAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), false);
+ ability.addTarget(new TargetCreaturePermanent());
+ this.addAbility(ability);
+ }
+
+ public KolaghanStormsinger(final KolaghanStormsinger card) {
+ super(card);
+ }
+
+ @Override
+ public KolaghanStormsinger copy() {
+ return new KolaghanStormsinger(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/LearnFromThePast.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/LearnFromThePast.java
new file mode 100644
index 0000000000..5c607250e1
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/LearnFromThePast.java
@@ -0,0 +1,97 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.TargetPlayer;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class LearnFromThePast extends CardImpl {
+
+ public LearnFromThePast(UUID ownerId) {
+ super(ownerId, 60, "Learn from the Past", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{U}");
+ this.expansionSetCode = "DTK";
+
+ // Target player shuffles his or her graveyard into his or her library
+ this.getSpellAbility().addEffect(new LearnFromThePastEffect());
+ this.getSpellAbility().addTarget(new TargetPlayer());
+
+ // Draw a card
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
+ }
+
+ public LearnFromThePast(final LearnFromThePast card) {
+ super(card);
+ }
+
+ @Override
+ public LearnFromThePast copy() {
+ return new LearnFromThePast(this);
+ }
+}
+
+class LearnFromThePastEffect extends OneShotEffect {
+
+ LearnFromThePastEffect() {
+ super(Outcome.Neutral);
+ this.staticText = "Target player shuffles his or her graveyard into his or her library";
+ }
+
+ LearnFromThePastEffect(final LearnFromThePastEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public LearnFromThePastEffect copy() {
+ return new LearnFromThePastEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
+ if (player != null) {
+ player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
+ player.getGraveyard().clear();
+ player.shuffleLibrary(game);
+ return true;
+ }
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/Lightwalker.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/Lightwalker.java
new file mode 100644
index 0000000000..573070cc61
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/Lightwalker.java
@@ -0,0 +1,71 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.common.SourceHasCounterCondition;
+import mage.abilities.decorator.ConditionalContinuousEffect;
+import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class Lightwalker extends CardImpl {
+
+ public Lightwalker(UUID ownerId) {
+ super(ownerId, 24, "Lightwalker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(1);
+
+ // Lightwalker has flying as long as it has a +1/+1 counter on it.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
+ new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()),
+ new SourceHasCounterCondition(CounterType.P1P1),"Lightwalker has flying as long as it has a +1/+1 counter on it")));
+ }
+
+ public Lightwalker(final Lightwalker card) {
+ super(card);
+ }
+
+ @Override
+ public Lightwalker copy() {
+ return new Lightwalker(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/LoseCalm.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/LoseCalm.java
new file mode 100644
index 0000000000..0144d0a7f0
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/LoseCalm.java
@@ -0,0 +1,73 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.UntapTargetEffect;
+import mage.abilities.effects.common.combat.CantBeBlockedByOneTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.effects.common.continuous.GainControlTargetEffect;
+import mage.abilities.keyword.HasteAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class LoseCalm extends CardImpl {
+
+ public LoseCalm(UUID ownerId) {
+ super(ownerId, 147, "Lose Calm", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}");
+ this.expansionSetCode = "DTK";
+
+ // Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn and can't be blocked this turn except by two or more creatures.
+ this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
+ Effect effect = new UntapTargetEffect();
+ effect.setText("Untap that creature");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "It gains haste until end of turn"));
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ effect = new CantBeBlockedByOneTargetEffect(2, Duration.EndOfTurn);
+ effect.setText("and can't be blocked this turn except by two or more creatures");
+ this.getSpellAbility().addEffect(effect);
+ }
+
+ public LoseCalm(final LoseCalm card) {
+ super(card);
+ }
+
+ @Override
+ public LoseCalm copy() {
+ return new LoseCalm(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/LurkingArynx.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/LurkingArynx.java
new file mode 100644
index 0000000000..02ec94552f
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/LurkingArynx.java
@@ -0,0 +1,76 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.ActivateIfConditionActivatedAbility;
+import mage.abilities.condition.common.FormidableCondition;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect;
+import mage.cards.CardImpl;
+import mage.constants.AbilityWord;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class LurkingArynx extends CardImpl {
+
+ public LurkingArynx(UUID ownerId) {
+ super(ownerId, 192, "Lurking Arynx", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Cat");
+ this.subtype.add("Beast");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(5);
+
+ // Formidable - {2}{G}: Target creature blocks Lurking Arynx this turn if able. Activate this ability only if creatures you control have total power 8 or greater.
+ Ability ability = new ActivateIfConditionActivatedAbility(
+ Zone.BATTLEFIELD,
+ new MustBeBlockedByTargetSourceEffect(Duration.EndOfTurn),
+ new ManaCostsImpl("{2}{G}"),
+ FormidableCondition.getInstance());
+ ability.setAbilityWord(AbilityWord.FORMIDABLE);
+ this.addAbility(ability);
+ }
+
+ public LurkingArynx(final LurkingArynx card) {
+ super(card);
+ }
+
+ @Override
+ public LurkingArynx copy() {
+ return new LurkingArynx(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/MagmaticChasm.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/MagmaticChasm.java
new file mode 100644
index 0000000000..d466055a8d
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/MagmaticChasm.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.common.combat.CantBlockAllEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.AbilityPredicate;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class MagmaticChasm extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures without flying");
+
+ static {
+ filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
+ }
+
+ public MagmaticChasm(UUID ownerId) {
+ super(ownerId, 148, "Magmatic Chasm", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}");
+ this.expansionSetCode = "DTK";
+
+ // Creature without flying can't block this turn.
+ this.getSpellAbility().addEffect(new CantBlockAllEffect(filter, Duration.EndOfTurn));
+ }
+
+ public MagmaticChasm(final MagmaticChasm card) {
+ super(card);
+ }
+
+ @Override
+ public MagmaticChasm copy() {
+ return new MagmaticChasm(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/MisthoofKirin.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/MisthoofKirin.java
new file mode 100644
index 0000000000..76250e8706
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/MisthoofKirin.java
@@ -0,0 +1,71 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.keyword.FlyingAbility;
+import mage.abilities.keyword.MorphAbility;
+import mage.abilities.keyword.VigilanceAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class MisthoofKirin extends CardImpl {
+
+ public MisthoofKirin(UUID ownerId) {
+ super(ownerId, 25, "Misthoof Kirin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Kirin");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(1);
+
+ // Flying
+ this.addAbility(FlyingAbility.getInstance());
+
+ // Vigilance
+ this.addAbility(VigilanceAbility.getInstance());
+
+ // Megamorph {1}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.)
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{W}"), true));
+ }
+
+ public MisthoofKirin(final MisthoofKirin card) {
+ super(card);
+ }
+
+ @Override
+ public MisthoofKirin copy() {
+ return new MisthoofKirin(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ObscuringAEther.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ObscuringAEther.java
new file mode 100644
index 0000000000..d4f858d69a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ObscuringAEther.java
@@ -0,0 +1,78 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+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.continuous.BecomesFaceDownCreatureEffect;
+import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreatureCard;
+import mage.filter.predicate.other.FaceDownPredicate;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ObscuringAEther extends CardImpl {
+
+ private static final FilterCreatureCard filter = new FilterCreatureCard("Face-down creature spells");
+
+ static {
+ filter.add(new FaceDownPredicate());
+ }
+
+ public ObscuringAEther(UUID ownerId) {
+ super(ownerId, 194, "Obscuring AEther", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}");
+ this.expansionSetCode = "DTK";
+
+ // Face-down creature spells you cast cost {1} less to cast.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1)));
+
+ // {1}{G}: Turn Obscuring AEther face down.
+ Effect effect = new BecomesFaceDownCreatureEffect(null, BecomesFaceDownCreatureEffect.FaceDownType.MANIFESTED);
+ effect.setText("Turn Obscuring AEther face down. (It becomes a 2/2 creature.)");
+ this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{G}")));
+
+ }
+
+ public ObscuringAEther(final ObscuringAEther card) {
+ super(card);
+ }
+
+ @Override
+ public ObscuringAEther copy() {
+ return new ObscuringAEther(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/PinionFeast.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/PinionFeast.java
new file mode 100644
index 0000000000..04f841d011
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/PinionFeast.java
@@ -0,0 +1,72 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.common.DestroyTargetEffect;
+import mage.abilities.effects.keyword.BolsterEffect;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.AbilityPredicate;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class PinionFeast extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
+
+ static {
+ filter.add(new AbilityPredicate(FlyingAbility.class));
+ }
+
+ public PinionFeast(UUID ownerId) {
+ super(ownerId, 195, "Pinion Feast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{4}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Destroy target creature with flying. Bolster 2.
+ this.getSpellAbility().addEffect(new DestroyTargetEffect());
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
+ this.getSpellAbility().addEffect(new BolsterEffect(2));
+
+ }
+
+ public PinionFeast(final PinionFeast card) {
+ super(card);
+ }
+
+ @Override
+ public PinionFeast copy() {
+ return new PinionFeast(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/PressTheAdvantage.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/PressTheAdvantage.java
new file mode 100644
index 0000000000..91f557286e
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/PressTheAdvantage.java
@@ -0,0 +1,68 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.TrampleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class PressTheAdvantage extends CardImpl {
+
+ public PressTheAdvantage(UUID ownerId) {
+ super(ownerId, 196, "Press the Advantage", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Up to two target creatures each get +2/+2 and gain trample until end of turn.
+ Effect effect = new BoostTargetEffect(2,2, Duration.EndOfTurn);
+ effect.setText("Up to two target creatures each get +2/+2");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, "and gain trample until end of turn");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent(0,2));
+ }
+
+ public PressTheAdvantage(final PressTheAdvantage card) {
+ super(card);
+ }
+
+ @Override
+ public PressTheAdvantage copy() {
+ return new PressTheAdvantage(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/QalSismaBehemoth.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/QalSismaBehemoth.java
new file mode 100644
index 0000000000..06f698c20a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/QalSismaBehemoth.java
@@ -0,0 +1,138 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.ReplacementEffectImpl;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import static mage.game.events.GameEvent.EventType.DECLARE_ATTACKER;
+import static mage.game.events.GameEvent.EventType.DECLARE_BLOCKER;
+import mage.players.Player;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class QalSismaBehemoth extends CardImpl {
+
+ public QalSismaBehemoth(UUID ownerId) {
+ super(ownerId, 149, "Qal Sisma Behemoth", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Ogre");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(5);
+ this.toughness = new MageInt(5);
+
+ // Qal Sisma Behemoth can't attack or block unless you pay {2}.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new QalSismaBehemothEffect() ));
+
+ }
+
+ public QalSismaBehemoth(final QalSismaBehemoth card) {
+ super(card);
+ }
+
+ @Override
+ public QalSismaBehemoth copy() {
+ return new QalSismaBehemoth(this);
+ }
+}
+
+class QalSismaBehemothEffect extends ReplacementEffectImpl {
+
+ private static final String effectText = "{this} can't attack or block unless you pay {2}";
+
+ QalSismaBehemothEffect ( ) {
+ super(Duration.WhileOnBattlefield, Outcome.Neutral);
+ staticText = effectText;
+ }
+
+ QalSismaBehemothEffect ( QalSismaBehemothEffect effect ) {
+ super(effect);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ @Override
+ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
+ Player player = game.getPlayer(event.getPlayerId());
+ if (player != null) {
+ String chooseText;
+ if (event.getType().equals(GameEvent.EventType.DECLARE_ATTACKER)) {
+ chooseText = "Pay {2} to attack?";
+ } else {
+ chooseText = "Pay {2} to block?";
+ }
+ ManaCostsImpl attackBlockTax = new ManaCostsImpl("{2}");
+ if (attackBlockTax.canPay(source, source.getSourceId(), event.getPlayerId(), game)
+ && player.chooseUse(Outcome.Neutral, chooseText, game)) {
+ if (attackBlockTax.payOrRollback(source, game, source.getSourceId(), event.getPlayerId())) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ switch(event.getType()) {
+ case DECLARE_ATTACKER:
+ case DECLARE_BLOCKER:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ @Override
+ public boolean applies(GameEvent event, Ability source, Game game) {
+ return event.getSourceId().equals(source.getSourceId());
+ }
+
+ @Override
+ public QalSismaBehemothEffect copy() {
+ return new QalSismaBehemothEffect(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/Resupply.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/Resupply.java
new file mode 100644
index 0000000000..1415ed21a6
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/Resupply.java
@@ -0,0 +1,62 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class Resupply extends CardImpl {
+
+ public Resupply(UUID ownerId) {
+ super(ownerId, 32, "Resupply", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{5}{W}");
+ this.expansionSetCode = "DTK";
+
+ // You gain 6 life.
+ this.getSpellAbility().addEffect(new GainLifeEffect(6));
+
+ // Draw a card.
+ this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
+ }
+
+ public Resupply(final Resupply card) {
+ super(card);
+ }
+
+ @Override
+ public Resupply copy() {
+ return new Resupply(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java
new file mode 100644
index 0000000000..ee1ac205cb
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/RevealingWind.java
@@ -0,0 +1,121 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageObject;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.PreventAllDamageByAllEffect;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.cards.Cards;
+import mage.cards.CardsImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.filter.common.FilterAttackingOrBlockingCreature;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.other.FaceDownPredicate;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.Target;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class RevealingWind extends CardImpl {
+
+ public RevealingWind(UUID ownerId) {
+ super(ownerId, 197, "Revealing Wind", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Prevent all combat damage that would be dealt this turn. You may look at each face-down creature that's attacking or blocking.
+ this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true));
+ this.getSpellAbility().addEffect(new RevealingWindEffect());
+ }
+
+ public RevealingWind(final RevealingWind card) {
+ super(card);
+ }
+
+ @Override
+ public RevealingWind copy() {
+ return new RevealingWind(this);
+ }
+}
+
+class RevealingWindEffect extends OneShotEffect {
+
+ private static final FilterCreaturePermanent filter = new FilterAttackingOrBlockingCreature("face-down creature that's attacking or blocking");
+
+ static {
+ filter.add(new FaceDownPredicate());
+ }
+
+ public RevealingWindEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "You may look at each face-down creature that's attacking or blocking";
+ }
+
+ public RevealingWindEffect(final RevealingWindEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public RevealingWindEffect copy() {
+ return new RevealingWindEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ MageObject sourceObject = source.getSourceObject(game);
+ if (controller != null && sourceObject != null) {
+ while (game.getBattlefield().count(filter, source.getOriginalId(), source.getControllerId(), game) > 0 &&
+ controller.chooseUse(outcome, "Look at a face-down attacking creature?", game)) {
+ if (!controller.isInGame()) {
+ return false;
+ }
+ Target target = new TargetCreaturePermanent(filter);
+ if (controller.chooseTarget(outcome, target, source, game)) {
+ Card card = game.getCard(target.getFirstTarget());
+ if (card != null) {
+ Cards cards = new CardsImpl();
+ controller.lookAtCards(sourceObject.getName(), cards, game);
+ game.informPlayers(controller.getName() + " look at a face-down attacking creature");
+ }
+ }
+ }
+ }
+ return true;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SaltRoadQuartermasters.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SaltRoadQuartermasters.java
new file mode 100644
index 0000000000..744d14889b
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SaltRoadQuartermasters.java
@@ -0,0 +1,82 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldAbility;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.common.RemoveCountersSourceCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SaltRoadQuartermasters extends CardImpl {
+
+ public SaltRoadQuartermasters(UUID ownerId) {
+ super(ownerId, 199, "Salt Road Quartermasters", Rarity.UNCOMMON, new CardType[]{}, "{2}{G}");
+ this.expansionSetCode = "DTK";
+ this.supertype.add("Creautre");
+ this.supertype.add("Human");
+ this.supertype.add("Soldier");
+ this.power = new MageInt(1);
+ this.toughness = new MageInt(1);
+
+ // Salt Road QUartermasters enters the battlefield with two +1/+1 counters on it.
+ this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
+ "with two +1/+1 counters on it"));
+
+ // {2}{G}, Remove a +1/+1 counter from Salt Road Quartermasters: Put a +1/+1 counter on target creature.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance(1)), new ManaCostsImpl("{2}{G}"));
+ ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)));
+ ability.addTarget(new TargetCreaturePermanent());
+ this.addAbility(ability);
+
+
+ }
+
+ public SaltRoadQuartermasters(final SaltRoadQuartermasters card) {
+ super(card);
+ }
+
+ @Override
+ public SaltRoadQuartermasters copy() {
+ return new SaltRoadQuartermasters(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SandsteppeScavenger.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SandsteppeScavenger.java
new file mode 100644
index 0000000000..820a7af85f
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SandsteppeScavenger.java
@@ -0,0 +1,64 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.effects.keyword.BolsterEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SandsteppeScavenger extends CardImpl {
+
+ public SandsteppeScavenger(UUID ownerId) {
+ super(ownerId, 200, "Sandsteppe Scavenger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Hound");
+ this.subtype.add("Scount");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(2);
+
+ // When Sandsteppe Scavenger enters the battlefield, bolster 2.
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new BolsterEffect(2), false));
+ }
+
+ public SandsteppeScavenger(final SandsteppeScavenger card) {
+ super(card);
+ }
+
+ @Override
+ public SandsteppeScavenger copy() {
+ return new SandsteppeScavenger(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SandstormCharger.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SandstormCharger.java
new file mode 100644
index 0000000000..be8776b619
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SandstormCharger.java
@@ -0,0 +1,63 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.keyword.MorphAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class SandstormCharger extends CardImpl {
+
+ public SandstormCharger(UUID ownerId) {
+ super(ownerId, 34, "Sandstorm Charger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Beast");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(4);
+
+ // Megamorph {4}{W}
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{W}"), true));
+ }
+
+ public SandstormCharger(final SandstormCharger card) {
+ super(card);
+ }
+
+ @Override
+ public SandstormCharger copy() {
+ return new SandstormCharger(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SecureTheWastes.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SecureTheWastes.java
new file mode 100644
index 0000000000..0f3666570a
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SecureTheWastes.java
@@ -0,0 +1,75 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.dynamicvalue.common.ManacostVariableValue;
+import mage.abilities.effects.common.CreateTokenEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.game.permanent.token.Token;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class SecureTheWastes extends CardImpl {
+
+ public SecureTheWastes(UUID ownerId) {
+ super(ownerId, 36, "Secure the Wastes", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{X}{W}");
+ this.expansionSetCode = "DTK";
+
+ // Put X 1/1 white Warrior creature tokens onto the battlefield.
+ this.getSpellAbility().addEffect(new CreateTokenEffect(new SecureTheWastesToken(), new ManacostVariableValue()));
+ }
+
+ public SecureTheWastes(final SecureTheWastes card) {
+ super(card);
+ }
+
+ @Override
+ public SecureTheWastes copy() {
+ return new SecureTheWastes(this);
+ }
+}
+
+class SecureTheWastesToken extends Token {
+
+ SecureTheWastesToken() {
+ super("Warrior", "1/1 white Warrior creature token");
+ this.setOriginalExpansionSetCode("DTK");
+ cardType.add(CardType.CREATURE);
+ subtype.add("Warrior");
+
+ color.setWhite(true);
+ power = new MageInt(1);
+ toughness = new MageInt(1);
+ }
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SegmentedKrotiq.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SegmentedKrotiq.java
new file mode 100644
index 0000000000..c2b6ec94bb
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SegmentedKrotiq.java
@@ -0,0 +1,63 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.keyword.MorphAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SegmentedKrotiq extends CardImpl {
+
+ public SegmentedKrotiq(UUID ownerId) {
+ super(ownerId, 202, "Segmented Krotiq", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Insect");
+ this.power = new MageInt(6);
+ this.toughness = new MageInt(5);
+
+ // Megamorph {6}{G}
+ this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{G}"), true));
+ }
+
+ public SegmentedKrotiq(final SegmentedKrotiq card) {
+ super(card);
+ }
+
+ @Override
+ public SegmentedKrotiq copy() {
+ return new SegmentedKrotiq(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ServantOfTheScale.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ServantOfTheScale.java
new file mode 100644
index 0000000000..426e84d95c
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ServantOfTheScale.java
@@ -0,0 +1,115 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.MageObject;
+import mage.abilities.Ability;
+import mage.abilities.common.DiesTriggeredAbility;
+import mage.abilities.common.EntersBattlefieldAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.effects.common.counter.AddCountersTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.counters.CounterType;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.common.TargetControlledCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ServantOfTheScale extends CardImpl {
+
+ public ServantOfTheScale(UUID ownerId) {
+ super(ownerId, 203, "Servant of the Scale", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Soldier");
+ this.power = new MageInt(0);
+ this.toughness = new MageInt(0);
+
+ // Servant of the Scale enters the battlefield with a +1/+1 counter on it.
+ this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
+ "with a +1/+1 counters on it"));
+
+ // When Servant of the Scale dies, put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counter on Servant of the Scale.
+ Ability ability = new DiesTriggeredAbility(new ServantOfTheScaleEffect(), false);
+ ability.addTarget(new TargetControlledCreaturePermanent());
+ this.addAbility(ability);
+ }
+
+ public ServantOfTheScale(final ServantOfTheScale card) {
+ super(card);
+ }
+
+ @Override
+ public ServantOfTheScale copy() {
+ return new ServantOfTheScale(this);
+ }
+}
+
+class ServantOfTheScaleEffect extends OneShotEffect {
+
+ public ServantOfTheScaleEffect() {
+ super(Outcome.BoostCreature);
+ this.staticText = "put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counter on {this}";
+ }
+
+ public ServantOfTheScaleEffect(final ServantOfTheScaleEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public ServantOfTheScaleEffect copy() {
+ return new ServantOfTheScaleEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ MageObject sourceObject = source.getSourceObject(game);
+ if (sourceObject != null && controller != null && sourceObject instanceof Permanent) {
+ int amount = ((Permanent)sourceObject).getCounters().getCount(CounterType.P1P1);
+ if (amount > 0) {
+ Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(amount));
+ effect.setTargetPointer(targetPointer);
+ effect.apply(game, source);
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ShapeTheSands.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShapeTheSands.java
new file mode 100644
index 0000000000..9dc24f5643
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShapeTheSands.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.ReachAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ShapeTheSands extends CardImpl {
+
+ public ShapeTheSands(UUID ownerId) {
+ super(ownerId, 205, "Shape the Sands", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
+ this.expansionSetCode = "DTK";
+
+ // Target creature gets +0/+5 and gains reach until end of turn.
+ Effect effect = new BoostTargetEffect(0, 5, Duration.EndOfTurn);
+ effect.setText("Target creature gets +0/+5");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(ReachAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains reach until end of turn");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+
+ }
+
+ public ShapeTheSands(final ShapeTheSands card) {
+ super(card);
+ }
+
+ @Override
+ public ShapeTheSands copy() {
+ return new ShapeTheSands(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ShelteredAerie.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShelteredAerie.java
new file mode 100644
index 0000000000..a87b81eca4
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ShelteredAerie.java
@@ -0,0 +1,81 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.effects.common.AddManaOfAnyColorEffect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.abilities.mana.AnyColorManaAbility;
+import mage.abilities.mana.SimpleManaAbility;
+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.TargetLandPermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class ShelteredAerie extends CardImpl {
+
+ public ShelteredAerie(UUID ownerId) {
+ super(ownerId, 206, "Sheltered Aerie", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Aura");
+
+ // Enchant land
+ TargetPermanent auraTarget = new TargetLandPermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // Enchanted land has "{T}: Add two mana of any one color to your mana pool."
+ Ability gainedAbility = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(2), new TapSourceCost());
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA)));
+
+ }
+
+ public ShelteredAerie(final ShelteredAerie card) {
+ super(card);
+ }
+
+ @Override
+ public ShelteredAerie copy() {
+ return new ShelteredAerie(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SightOfTheScalelords.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SightOfTheScalelords.java
new file mode 100644
index 0000000000..92a8c17d9c
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SightOfTheScalelords.java
@@ -0,0 +1,83 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.BeginningOfCombatTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.abilities.effects.common.continuous.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.TargetController;
+import mage.constants.Zone;
+import mage.filter.Filter;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.ToughnessPredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SightOfTheScalelords extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control with toughness 4 or greater");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ filter.add(new ToughnessPredicate(Filter.ComparisonType.GreaterThan, 3));
+ }
+
+ public SightOfTheScalelords(UUID ownerId) {
+ super(ownerId, 207, "Sight of the Scalelords", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
+ this.expansionSetCode = "DTK";
+
+ // At the beginning of combat on your turn, creature you control with toughness 4 or greater get +2/+2 and gain vigilance until end of turn.
+ Effect effect = new BoostControlledEffect(2,2,Duration.EndOfTurn, filter, false);
+ effect.setText("creature you control with toughness 4 or greater get +2/+2");
+ Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false);
+ effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, filter);
+ effect.setText("and gain vigilance until end of turn");
+ ability.addEffect(effect);
+ this.addAbility(ability);
+ }
+
+ public SightOfTheScalelords(final SightOfTheScalelords card) {
+ super(card);
+ }
+
+ @Override
+ public SightOfTheScalelords copy() {
+ return new SightOfTheScalelords(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/Silkwrap.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/Silkwrap.java
new file mode 100644
index 0000000000..450283ec59
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/Silkwrap.java
@@ -0,0 +1,110 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
+import mage.abilities.effects.common.ExileTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.TargetController;
+import mage.filter.Filter.ComparisonType;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.target.TargetPermanent;
+import mage.util.CardUtil;
+
+/**
+ *
+ * @author jeffwadsworth
+ */
+public class Silkwrap extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost 3 or less an opponent controls");
+
+ static {
+ filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 4));
+ filter.add(new ControllerPredicate(TargetController.OPPONENT));
+ }
+
+ public Silkwrap(UUID ownerId) {
+ super(ownerId, 38, "Silkwrap", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
+ this.expansionSetCode = "DTK";
+
+ // When Silkwrap enters the battlefield, exile target creature with converted mana cost 3 or less an opponent controls until Silkwrap leaves the battlefield.
+ Ability ability = new EntersBattlefieldTriggeredAbility(new SilkwrapEffect());
+ ability.addTarget(new TargetPermanent(filter));
+ ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
+ this.addAbility(ability);
+
+ }
+
+ public Silkwrap(final Silkwrap card) {
+ super(card);
+ }
+
+ @Override
+ public Silkwrap copy() {
+ return new Silkwrap(this);
+ }
+}
+
+class SilkwrapEffect extends OneShotEffect {
+
+ public SilkwrapEffect() {
+ super(Outcome.Neutral);
+ this.staticText = "exile target creature with converted mana cost 3 or less an opponent controls until {this} leaves the battlefield. (That creature returns under its owner's control.)";
+ }
+
+ public SilkwrapEffect(final SilkwrapEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public SilkwrapEffect copy() {
+ return new SilkwrapEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Permanent permanent = game.getPermanent(source.getSourceId());
+ if (permanent != null) {
+ return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
+ }
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/StrongarmMonk.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/StrongarmMonk.java
new file mode 100644
index 0000000000..1abfa32fb0
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/StrongarmMonk.java
@@ -0,0 +1,78 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.Ability;
+import mage.abilities.common.SpellCastControllerTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostControlledEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.filter.FilterSpell;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class StrongarmMonk extends CardImpl {
+
+ private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell");
+
+ static {
+ filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
+ }
+
+ public StrongarmMonk(UUID ownerId) {
+ super(ownerId, 39, "Strongarm Monk", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Monk");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(3);
+
+ // Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn.
+ Effect effect = new BoostControlledEffect(1,1,Duration.EndOfTurn);
+ Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false);
+ this.addAbility(ability);
+ }
+
+ public StrongarmMonk(final StrongarmMonk card) {
+ super(card);
+ }
+
+ @Override
+ public StrongarmMonk copy() {
+ return new StrongarmMonk(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/StudentOfOjutai.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/StudentOfOjutai.java
new file mode 100644
index 0000000000..931620e79e
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/StudentOfOjutai.java
@@ -0,0 +1,73 @@
+/*
+ * 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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.SpellCastControllerTriggeredAbility;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.filter.FilterSpell;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.CardTypePredicate;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class StudentOfOjutai extends CardImpl {
+
+ private static final FilterSpell filterNonCreature = new FilterSpell("a noncreature spell");
+
+ static {
+ filterNonCreature.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
+ }
+
+ public StudentOfOjutai(UUID ownerId) {
+ super(ownerId, 40, "Student of Ojutai", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}");
+ this.expansionSetCode = "DTK";
+ this.subtype.add("Human");
+ this.subtype.add("Monk");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(4);
+
+ // Whenever you cast a noncreature spell, you gain 2 life.
+ this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(2), filterNonCreature, false));
+ }
+
+ public StudentOfOjutai(final StudentOfOjutai card) {
+ super(card);
+ }
+
+ @Override
+ public StudentOfOjutai copy() {
+ return new StudentOfOjutai(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/TreadUpon.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/TreadUpon.java
new file mode 100644
index 0000000000..7fbee0befa
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/TreadUpon.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.continuous.BoostTargetEffect;
+import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
+import mage.abilities.keyword.TrampleAbility;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Rarity;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class TreadUpon extends CardImpl {
+
+ public TreadUpon(UUID ownerId) {
+ super(ownerId, 211, "Tread Upon", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
+ this.expansionSetCode = "DTK";
+
+ // Target creature gets +2/+2 and gains trample until end of turn.
+ Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
+ effect.setText("Target creature gets +2/+2");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains trample until end of turn");
+ this.getSpellAbility().addEffect(effect);
+ this.getSpellAbility().addTarget(new TargetCreaturePermanent());
+ }
+
+ public TreadUpon(final TreadUpon card) {
+ super(card);
+ }
+
+ @Override
+ public TreadUpon copy() {
+ return new TreadUpon(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/VialOfDragonfire.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/VialOfDragonfire.java
new file mode 100644
index 0000000000..3a78ee2c33
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/VialOfDragonfire.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.dragonsoftarkir;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.costs.common.SacrificeSourceCost;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.common.DamageTargetEffect;
+import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
+import mage.target.common.TargetCreaturePermanent;
+
+/**
+ *
+ * @author jeffwadsworth
+ */
+public class VialOfDragonfire extends CardImpl {
+
+ public VialOfDragonfire(UUID ownerId) {
+ super(ownerId, 247, "Vial of Dragonfire", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
+ this.expansionSetCode = "DTK";
+
+ // {2}, {T}, Sacrifice Vial of Dragonfire: Vial of Dragonfire deals 2 damage to target creature.
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}"));
+ ability.addCost(new TapSourceCost());
+ ability.addCost(new SacrificeSourceCost());
+ ability.addTarget(new TargetCreaturePermanent());
+ this.addAbility(ability);
+
+ }
+
+ public VialOfDragonfire(final VialOfDragonfire card) {
+ super(card);
+ }
+
+ @Override
+ public VialOfDragonfire copy() {
+ return new VialOfDragonfire(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java b/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java
index 67dcf95d30..dfae1c21ce 100644
--- a/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java
+++ b/Mage.Sets/src/mage/sets/eventide/FloodedGrove.java
@@ -29,17 +29,14 @@
package mage.sets.eventide;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Rarity;
import mage.Mana;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.common.BasicManaEffect;
-import mage.abilities.mana.BasicManaAbility;
import mage.abilities.mana.ColorlessManaAbility;
-import mage.abilities.mana.ManaAbility;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
import mage.constants.Zone;
/**
diff --git a/Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java b/Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java
index 581b8ad41b..445b291f85 100644
--- a/Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java
+++ b/Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java
@@ -124,8 +124,7 @@ class TemurWarShamanFightEffect extends OneShotEffect {
&& target != null
&& triggeredCreature.getCardType().contains(CardType.CREATURE)
&& target.getCardType().contains(CardType.CREATURE)) {
- triggeredCreature.damage(target.getPower().getValue(), target.getId(), game, false, true);
- target.damage(triggeredCreature.getPower().getValue(), triggeredCreature.getId(), game, false, true);
+ triggeredCreature.fight(target, source, game);
return true;
}
return false;
diff --git a/Mage.Sets/src/mage/sets/futuresight/VeilstoneAmulet.java b/Mage.Sets/src/mage/sets/futuresight/VeilstoneAmulet.java
index 95280cf3fc..40ad79cecc 100644
--- a/Mage.Sets/src/mage/sets/futuresight/VeilstoneAmulet.java
+++ b/Mage.Sets/src/mage/sets/futuresight/VeilstoneAmulet.java
@@ -89,16 +89,19 @@ class VeilstoneAmuletEffect extends ContinuousRuleModifyingEffectImpl {
return true;
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.TARGET;
+ }
+
@Override
public boolean applies(GameEvent event, Ability ability, Game game) {
- if (event.getType() == EventType.TARGET) {
- Permanent permanent = game.getPermanent(event.getTargetId());
- if (permanent != null) {
- if (permanent.getCardType().contains(CardType.CREATURE) &&
- permanent.getControllerId().equals(ability.getControllerId()) &&
- game.getPlayer(ability.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
- return true;
- }
+ Permanent permanent = game.getPermanent(event.getTargetId());
+ if (permanent != null) {
+ if (permanent.getCardType().contains(CardType.CREATURE) &&
+ permanent.getControllerId().equals(ability.getControllerId()) &&
+ game.getPlayer(ability.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
+ return true;
}
}
return false;
diff --git a/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java b/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java
index d836ce1415..e228654ddd 100644
--- a/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java
+++ b/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java
@@ -144,9 +144,7 @@ class GruulRagebeastEffect extends OneShotEffect {
&& target != null
&& triggeredCreature.getCardType().contains(CardType.CREATURE)
&& target.getCardType().contains(CardType.CREATURE)) {
- triggeredCreature.damage(target.getPower().getValue(), target.getId(), game, false, true);
- target.damage(triggeredCreature.getPower().getValue(), triggeredCreature.getId(), game, false, true);
- return true;
+ return triggeredCreature.fight(target, source, game);
}
return false;
}
diff --git a/Mage.Sets/src/mage/sets/guildpact/Wildsize.java b/Mage.Sets/src/mage/sets/guildpact/Wildsize.java
index 30e5756fe6..57b7dc140f 100644
--- a/Mage.Sets/src/mage/sets/guildpact/Wildsize.java
+++ b/Mage.Sets/src/mage/sets/guildpact/Wildsize.java
@@ -28,6 +28,7 @@
package mage.sets.guildpact;
import java.util.UUID;
+import mage.abilities.effects.Effect;
import mage.constants.CardType;
import mage.constants.Rarity;
@@ -48,9 +49,14 @@ public class Wildsize extends CardImpl {
public Wildsize(UUID ownerId) {
super(ownerId, 98, "Wildsize", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}");
this.expansionSetCode = "GPT";
- this.color.setGreen(true);
- this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
- this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
+
+ // Target creature gets +2/+2 and gains trample until end of turn.
+ Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
+ effect.setText("Target creature gets +2/+2");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains trample until end of turn");
+ this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
}
diff --git a/Mage.Sets/src/mage/sets/innistrad/InquisitorsFlail.java b/Mage.Sets/src/mage/sets/innistrad/InquisitorsFlail.java
index 360b4fcaee..053cec727c 100644
--- a/Mage.Sets/src/mage/sets/innistrad/InquisitorsFlail.java
+++ b/Mage.Sets/src/mage/sets/innistrad/InquisitorsFlail.java
@@ -27,21 +27,24 @@
*/
package mage.sets.innistrad;
-import mage.constants.*;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.DamageCreatureEvent;
import mage.game.events.DamageEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
-import java.util.UUID;
-
/**
* @author nantuko
*/
@@ -87,29 +90,31 @@ class InquisitorsFlailEffect extends ReplacementEffectImpl {
return new InquisitorsFlailEffect(this);
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(GameEvent.EventType.DAMAGE_CREATURE) ||
+ event.getType().equals(GameEvent.EventType.DAMAGE_PLANESWALKER) ||
+ event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER);
+ }
+
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
boolean isCombat = false;
- switch (event.getType()) {
- case DAMAGE_CREATURE:
- case DAMAGE_PLAYER:
- case DAMAGE_PLANESWALKER:
- if (event instanceof DamageCreatureEvent) {
- isCombat = ((DamageCreatureEvent) event).isCombatDamage();
- } else if (event instanceof DamageEvent) {
- isCombat = ((DamageEvent) event).isCombatDamage();
- }
- if (isCombat) {
- Permanent equipment = game.getPermanent(source.getSourceId());
- if (equipment != null && equipment.getAttachedTo() != null) {
- UUID attachedTo = equipment.getAttachedTo();
- if (event.getSourceId().equals(attachedTo)) {
- event.setAmount(event.getAmount() * 2);
- } else if (event.getTargetId().equals(attachedTo)) {
- event.setAmount(event.getAmount() * 2);
- }
- }
+ if (event instanceof DamageCreatureEvent) {
+ isCombat = ((DamageCreatureEvent) event).isCombatDamage();
+ } else if (event instanceof DamageEvent) {
+ isCombat = ((DamageEvent) event).isCombatDamage();
+ }
+ if (isCombat) {
+ Permanent equipment = game.getPermanent(source.getSourceId());
+ if (equipment != null && equipment.getAttachedTo() != null) {
+ UUID attachedTo = equipment.getAttachedTo();
+ if (event.getSourceId().equals(attachedTo)) {
+ return true;
+ } else if (event.getTargetId().equals(attachedTo)) {
+ return true;
}
+ }
}
return false;
}
@@ -121,7 +126,8 @@ class InquisitorsFlailEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
+ event.setAmount(event.getAmount() * 2);
+ return false;
}
}
diff --git a/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java b/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java
index d44c9856cf..0ae6d76c6b 100644
--- a/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java
+++ b/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java
@@ -112,9 +112,7 @@ class NightfallPredatorEffect extends OneShotEffect {
// 20110930 - 701.10
if (creature1 != null && creature2 != null) {
if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) {
- creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true);
- creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true);
- return true;
+ return creature1.fight(creature2, source, game);
}
}
return false;
diff --git a/Mage.Sets/src/mage/sets/innistrad/ParallelLives.java b/Mage.Sets/src/mage/sets/innistrad/ParallelLives.java
index b111b5f473..6c21df3813 100644
--- a/Mage.Sets/src/mage/sets/innistrad/ParallelLives.java
+++ b/Mage.Sets/src/mage/sets/innistrad/ParallelLives.java
@@ -28,17 +28,18 @@
package mage.sets.innistrad;
import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.ReplacementEffectImpl;
+import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
-import mage.abilities.Ability;
-import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.effects.ReplacementEffectImpl;
-import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
import mage.game.stack.StackObject;
/**
@@ -51,8 +52,6 @@ public class ParallelLives extends CardImpl {
super(ownerId, 199, "Parallel Lives", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
this.expansionSetCode = "ISD";
- this.color.setGreen(true);
-
// If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ParallelLivesEffect()));
}
@@ -83,16 +82,15 @@ class ParallelLivesEffect extends ReplacementEffectImpl {
return new ParallelLivesEffect(this);
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(EventType.CREATE_TOKEN);
+ }
+
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
- switch (event.getType()) {
- case CREATE_TOKEN:
- StackObject spell = game.getStack().getStackObject(event.getSourceId());
- if (spell != null && spell.getControllerId().equals(source.getControllerId())) {
- event.setAmount(event.getAmount() * 2);
- }
- }
- return false;
+ StackObject spell = game.getStack().getStackObject(event.getSourceId());
+ return spell != null && spell.getControllerId().equals(source.getControllerId());
}
@Override
@@ -102,7 +100,8 @@ class ParallelLivesEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
+ event.setAmount(event.getAmount() * 2);
+ return false;
}
}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/SecretPlans.java b/Mage.Sets/src/mage/sets/khansoftarkir/SecretPlans.java
index 57e7e20693..7e04365d26 100644
--- a/Mage.Sets/src/mage/sets/khansoftarkir/SecretPlans.java
+++ b/Mage.Sets/src/mage/sets/khansoftarkir/SecretPlans.java
@@ -28,9 +28,8 @@
package mage.sets.khansoftarkir;
import java.util.UUID;
-import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.effects.Effect;
+import mage.abilities.common.TurnedFaceUpAllTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardImpl;
@@ -38,11 +37,9 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
+import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.other.FaceDownPredicate;
-import mage.game.Game;
-import mage.game.events.GameEvent;
-import mage.game.permanent.Permanent;
/**
*
@@ -67,7 +64,7 @@ public class SecretPlans extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0,1, Duration.WhileOnBattlefield, filter)));
// Whenever a permanent you control is turned face up, draw a card.
- this.addAbility(new SecretPlanTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
+ this.addAbility(new TurnedFaceUpAllTriggeredAbility(new DrawCardSourceControllerEffect(1), new FilterControlledPermanent()));
}
@@ -80,38 +77,3 @@ public class SecretPlans extends CardImpl {
return new SecretPlans(this);
}
}
-
-class SecretPlanTriggeredAbility extends TriggeredAbilityImpl{
-
- public SecretPlanTriggeredAbility(Effect effect, boolean optional) {
- super(Zone.BATTLEFIELD, effect, optional);
- }
-
- public SecretPlanTriggeredAbility(final SecretPlanTriggeredAbility ability) {
- super(ability);
- }
-
- @Override
- public SecretPlanTriggeredAbility copy() {
- return new SecretPlanTriggeredAbility(this);
- }
-
- @Override
- public boolean checkEventType(GameEvent event, Game game) {
- return event.getType() == GameEvent.EventType.TURNEDFACEUP;
- }
-
- @Override
- public boolean checkTrigger(GameEvent event, Game game) {
- Permanent permanent = game.getPermanent(event.getTargetId());
- if (permanent.getControllerId().equals(this.controllerId)) {
- return true;
- }
- return false;
- }
-
- @Override
- public String getRule() {
- return "When a permanent you control is turned face up, " + super.getRule();
- }
-}
diff --git a/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java b/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java
index 3ea63ab008..992995d721 100644
--- a/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java
+++ b/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java
@@ -32,7 +32,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect;
-import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderEffect;
+import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
@@ -74,7 +74,7 @@ public class AnimateWall extends CardImpl {
this.addAbility(ability);
// Enchanted Wall can attack as though it didn't have defender.
- Ability canAttackAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderEffect(Duration.WhileOnBattlefield));
+ Ability canAttackAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield));
Effect enchantEffect = new GainAbilityAttachedEffect(canAttackAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
enchantEffect.setText("Enchanted Wall can attack as though it didn't have defender");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, enchantEffect));
diff --git a/Mage.Sets/src/mage/sets/lorwyn/DoranTheSiegeTower.java b/Mage.Sets/src/mage/sets/lorwyn/DoranTheSiegeTower.java
index ca1c813019..9be51ddef1 100644
--- a/Mage.Sets/src/mage/sets/lorwyn/DoranTheSiegeTower.java
+++ b/Mage.Sets/src/mage/sets/lorwyn/DoranTheSiegeTower.java
@@ -41,6 +41,7 @@ import mage.cards.CardImpl;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.SubLayer;
+import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
/**
@@ -87,6 +88,8 @@ public class DoranTheSiegeTower extends CardImpl {
class DoranTheSiegeTowerCombatDamageRuleEffect extends ContinuousEffectImpl {
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
+
public DoranTheSiegeTowerCombatDamageRuleEffect() {
super(Duration.WhileOnBattlefield, Outcome.Detriment);
staticText = "Each creature assigns combat damage equal to its toughness rather than its power";
@@ -103,13 +106,10 @@ class DoranTheSiegeTowerCombatDamageRuleEffect extends ContinuousEffectImpl {
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
- switch (layer) {
- case RulesEffects:
- // Change the rule
- game.getCombat().setUseToughnessForDamage(true);
- break;
- }
- return false;
+ // Change the rule
+ game.getCombat().setUseToughnessForDamage(true);
+ game.getCombat().addUseToughnessForDamageFilter(filter);
+ return true;
}
@Override
diff --git a/Mage.Sets/src/mage/sets/magic2011/FireServant.java b/Mage.Sets/src/mage/sets/magic2011/FireServant.java
index 55ac584f90..3ce806c9ee 100644
--- a/Mage.Sets/src/mage/sets/magic2011/FireServant.java
+++ b/Mage.Sets/src/mage/sets/magic2011/FireServant.java
@@ -29,16 +29,16 @@
package mage.sets.magic2011;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.Outcome;
-import mage.constants.Rarity;
-import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.StackObject;
@@ -53,10 +53,11 @@ public class FireServant extends CardImpl {
super(ownerId, 137, "Fire Servant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.expansionSetCode = "M11";
this.subtype.add("Elemental");
- this.color.setRed(true);
+
this.power = new MageInt(4);
this.toughness = new MageInt(3);
+ // If a red instant or sorcery spell you control would deal damage, it deals double that damage instead.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FireServantEffect()));
}
@@ -87,19 +88,20 @@ class FireServantEffect extends ReplacementEffectImpl {
return new FireServantEffect(this);
}
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(GameEvent.EventType.DAMAGE_CREATURE) ||
+ event.getType().equals(GameEvent.EventType.DAMAGE_PLANESWALKER) ||
+ event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER);
+ }
+
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
- switch (event.getType()) {
- case DAMAGE_CREATURE:
- case DAMAGE_PLAYER:
- case DAMAGE_PLANESWALKER:
- StackObject spell = game.getStack().getStackObject(event.getSourceId());
- if (spell != null && spell.getControllerId().equals(source.getControllerId()) && spell.getColor().isRed() &&
- (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) {
- event.setAmount(event.getAmount() * 2);
- }
- }
- return false;
+ StackObject spell = game.getStack().getStackObject(event.getSourceId());
+ return spell != null &&
+ spell.getControllerId().equals(source.getControllerId()) &&
+ spell.getColor().isRed() &&
+ (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY));
}
@Override
@@ -109,7 +111,8 @@ class FireServantEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
+ event.setAmount(event.getAmount() * 2);
+ return false;
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/sets/magic2013/RhoxFaithmender.java b/Mage.Sets/src/mage/sets/magic2013/RhoxFaithmender.java
index f8d9a87145..1c101952a6 100644
--- a/Mage.Sets/src/mage/sets/magic2013/RhoxFaithmender.java
+++ b/Mage.Sets/src/mage/sets/magic2013/RhoxFaithmender.java
@@ -28,16 +28,20 @@
package mage.sets.magic2013;
import java.util.UUID;
-
-import mage.constants.*;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
/**
*
@@ -51,7 +55,6 @@ public class RhoxFaithmender extends CardImpl {
this.subtype.add("Rhino");
this.subtype.add("Monk");
- this.color.setWhite(true);
this.power = new MageInt(1);
this.toughness = new MageInt(5);
@@ -95,18 +98,18 @@ class RhoxFaithmenderEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
+ event.setAmount(event.getAmount() * 2);
+ return false;
+ }
+
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(EventType.GAIN_LIFE);
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
- switch (event.getType()) {
- case GAIN_LIFE:
- if (event.getPlayerId().equals(source.getControllerId()) && (source.getControllerId() != null)) {
- event.setAmount(event.getAmount() * 2);
- }
- }
- return false;
+ return event.getPlayerId().equals(source.getControllerId()) && (source.getControllerId() != null);
}
}
diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java
index 7e1b27204b..f753cc56de 100644
--- a/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java
+++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java
@@ -41,7 +41,7 @@ import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
-import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderEffect;
+import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
@@ -64,7 +64,7 @@ public class SpireSerpent extends CardImpl {
this.addAbility(DefenderAbility.getInstance());
ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), MetalcraftCondition.getInstance(), abilityText1);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1);
- Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughtItDidntHaveDefenderEffect(Duration.WhileOnBattlefield),
+ Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
MetalcraftCondition.getInstance());
effect.setText("and can attack as though it didn't have defender");
ability.addEffect(effect);
diff --git a/Mage.Sets/src/mage/sets/modernmasters/DoublingSeason.java b/Mage.Sets/src/mage/sets/modernmasters/DoublingSeason.java
index 44583eddf5..4c42462e1f 100644
--- a/Mage.Sets/src/mage/sets/modernmasters/DoublingSeason.java
+++ b/Mage.Sets/src/mage/sets/modernmasters/DoublingSeason.java
@@ -28,15 +28,15 @@
package mage.sets.modernmasters;
import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.ReplacementEffectImpl;
+import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
-import mage.abilities.Ability;
-import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.effects.ReplacementEffectImpl;
-import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
@@ -52,8 +52,6 @@ public class DoublingSeason extends CardImpl {
super(ownerId, 141, "Doubling Season", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
this.expansionSetCode = "MMA";
- this.color.setGreen(true);
-
// If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DoublingSeasonTokenEffect()));
// If an effect would place one or more counters on a permanent you control, it places twice that many of those counters on that permanent instead.
diff --git a/Mage.Sets/src/mage/sets/nemesis/TreetopBracers.java b/Mage.Sets/src/mage/sets/nemesis/TreetopBracers.java
new file mode 100644
index 0000000000..94bd57b6af
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/nemesis/TreetopBracers.java
@@ -0,0 +1,108 @@
+/*
+ * 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.nemesis;
+
+import mage.abilities.Ability;
+import mage.abilities.StaticAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesAttachedEffect;
+import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
+import mage.abilities.keyword.EnchantAbility;
+import mage.abilities.keyword.FlyingAbility;
+import mage.cards.CardImpl;
+import mage.constants.*;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.AbilityPredicate;
+import mage.target.TargetPermanent;
+import mage.target.common.TargetCreaturePermanent;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author Jason E. Wall
+
+ */
+public class TreetopBracers extends CardImpl {
+
+ public TreetopBracers(UUID ownerId) {
+ super(ownerId, 123, "Treetop Bracers", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
+ this.expansionSetCode = "NMS";
+ this.subtype.add("Aura");
+
+ // Enchant creature
+ TargetPermanent auraTarget = new TargetCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // Enchanted creature gets +1/+1 and can't be blocked except by creatures with flying.
+ this.addAbility(new TreetopBracersAbility());
+ }
+
+ public TreetopBracers(final TreetopBracers card) {
+ super(card);
+ }
+
+ @Override
+ public TreetopBracers copy() {
+ return new TreetopBracers(this);
+ }
+}
+
+class TreetopBracersAbility extends StaticAbility {
+ private static FilterCreaturePermanent onlyFlyingCreatures = new FilterCreaturePermanent("except by creatures with flying");
+
+ static {
+ onlyFlyingCreatures.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
+ }
+
+ public TreetopBracersAbility() {
+ super(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield));
+ Effect cantBeBlocked = new CantBeBlockedByCreaturesAttachedEffect(Duration.WhileOnBattlefield, onlyFlyingCreatures, AttachmentType.AURA);
+ cantBeBlocked.setText("and can't be blocked except by creatures with flying.");
+ addEffect(cantBeBlocked);
+ }
+
+ public TreetopBracersAbility(TreetopBracersAbility ability) {
+ super(ability);
+ }
+
+ /**
+ * Creates a fresh copy of this ability.
+ *
+ * @return A new copy of this ability.
+ */
+ @Override
+ public TreetopBracersAbility copy() {
+ return new TreetopBracersAbility(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/ninthedition/TreetopBracers.java b/Mage.Sets/src/mage/sets/ninthedition/TreetopBracers.java
new file mode 100644
index 0000000000..669bac91e5
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/ninthedition/TreetopBracers.java
@@ -0,0 +1,53 @@
+/*
+ * 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.ninthedition;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author Jason E. Wall
+
+ */
+public class TreetopBracers extends mage.sets.nemesis.TreetopBracers {
+
+ public TreetopBracers(UUID ownerId) {
+ super(ownerId);
+ this.cardNumber = 276;
+ this.expansionSetCode = "9ED";
+ }
+
+ public TreetopBracers(final TreetopBracers card) {
+ super(card);
+ }
+
+ @Override
+ public TreetopBracers copy() {
+ return new TreetopBracers(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ChaosImps.java b/Mage.Sets/src/mage/sets/returntoravnica/ChaosImps.java
index 6bbae1f41e..674ed9da05 100644
--- a/Mage.Sets/src/mage/sets/returntoravnica/ChaosImps.java
+++ b/Mage.Sets/src/mage/sets/returntoravnica/ChaosImps.java
@@ -28,9 +28,6 @@
package mage.sets.returntoravnica;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Rarity;
-import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.SourceHasCounterCondition;
@@ -40,8 +37,11 @@ import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.UnleashAbility;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.counters.CounterType;
-
+
/**
*
* @author LevelX2
@@ -52,8 +52,7 @@ public class ChaosImps extends CardImpl {
super(ownerId, 90, "Chaos Imps", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
this.expansionSetCode = "RTR";
this.subtype.add("Imp");
-
- this.color.setRed(true);
+
this.power = new MageInt(6);
this.toughness = new MageInt(5);
@@ -66,7 +65,7 @@ public class ChaosImps extends CardImpl {
// Chaos Imps has trample as long as it has a +1/+1 counter on it.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()),
- new SourceHasCounterCondition(CounterType.P1P1),"Chaos Imps has trample as long as it has a +1/+1 counter on it")));
+ new SourceHasCounterCondition(CounterType.P1P1),"{this} has trample as long as it has a +1/+1 counter on it")));
}
diff --git a/Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java b/Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java
index 58b5f5f61b..d5c8268291 100644
--- a/Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java
+++ b/Mage.Sets/src/mage/sets/shadowmoor/BoonReflection.java
@@ -28,14 +28,18 @@
package mage.sets.shadowmoor;
import java.util.UUID;
-
-import mage.constants.*;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.CardImpl;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
/**
*
@@ -48,8 +52,6 @@ public class BoonReflection extends CardImpl {
super(ownerId, 5, "Boon Reflection", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}");
this.expansionSetCode = "SHM";
- this.color.setWhite(true);
-
// If you would gain life, you gain twice that much life instead.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoonReflectionEffect()));
}
@@ -87,17 +89,17 @@ class BoonReflectionEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
+ event.setAmount(event.getAmount() * 2);
+ return false;
+ }
+
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(EventType.GAIN_LIFE);
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
- switch (event.getType()) {
- case GAIN_LIFE:
- if (event.getPlayerId().equals(source.getControllerId()) && (source.getControllerId() != null)) {
- event.setAmount(event.getAmount() * 2);
- }
- }
- return false;
+ return event.getPlayerId().equals(source.getControllerId()) && (source.getControllerId() != null);
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java b/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java
index ae719c78cc..fd6448cb0f 100644
--- a/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java
+++ b/Mage.Sets/src/mage/sets/tempest/SpikeDrone.java
@@ -33,6 +33,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
@@ -58,7 +59,10 @@ public class SpikeDrone extends CardImpl {
this.color.setGreen(true);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
- this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1))));
+
+ this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
+ "{this} enters the battlefield with a +1/+1 counters on it"));
+
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(2));
ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)));
ability.addTarget(new TargetCreaturePermanent());
diff --git a/Mage.Sets/src/mage/sets/tenth/AngelicBlessing.java b/Mage.Sets/src/mage/sets/tenth/AngelicBlessing.java
index d459ef8ba4..3f64015adb 100644
--- a/Mage.Sets/src/mage/sets/tenth/AngelicBlessing.java
+++ b/Mage.Sets/src/mage/sets/tenth/AngelicBlessing.java
@@ -28,14 +28,14 @@
package mage.sets.tenth;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.Rarity;
import mage.target.common.TargetCreaturePermanent;
/**
@@ -47,9 +47,13 @@ public class AngelicBlessing extends CardImpl {
public AngelicBlessing(UUID ownerId) {
super(ownerId, 3, "Angelic Blessing", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}");
this.expansionSetCode = "10E";
- this.color.setWhite(true);
- this.getSpellAbility().addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn));
- this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
+
+ Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn);
+ effect.setText("Target creature gets +3/+3");
+ this.getSpellAbility().addEffect(effect);
+ effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains flying until end of turn");
+ this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/sets/tenth/TreetopBracers.java b/Mage.Sets/src/mage/sets/tenth/TreetopBracers.java
new file mode 100644
index 0000000000..4a7b402dc2
--- /dev/null
+++ b/Mage.Sets/src/mage/sets/tenth/TreetopBracers.java
@@ -0,0 +1,53 @@
+/*
+ * 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.tenth;
+
+import java.util.UUID;
+
+/**
+ *
+ * @author Jason E. Wall
+
+ */
+public class TreetopBracers extends mage.sets.nemesis.TreetopBracers {
+
+ public TreetopBracers(UUID ownerId) {
+ super(ownerId);
+ this.cardNumber = 304;
+ this.expansionSetCode = "10E";
+ }
+
+ public TreetopBracers(final TreetopBracers card) {
+ super(card);
+ }
+
+ @Override
+ public TreetopBracers copy() {
+ return new TreetopBracers(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java b/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java
index f52116132a..9515c4f37d 100644
--- a/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java
+++ b/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java
@@ -35,7 +35,7 @@ import mage.abilities.condition.common.MonstrousCondition;
import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.Effect;
-import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderEffect;
+import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.abilities.keyword.IndestructibleAbility;
@@ -73,7 +73,7 @@ public class ColossusOfAkros extends CardImpl {
new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield),
MonstrousCondition.getInstance(),
"As long as {this} is monstrous, it has trample"));
- Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughtItDidntHaveDefenderEffect(Duration.WhileOnBattlefield),
+ Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
MonstrousCondition.getInstance());
effect.setText("and can attack as though it didn't have defender");
ability.addEffect(effect);
diff --git a/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java b/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java
index b07e565c53..26d9fa0d72 100644
--- a/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java
+++ b/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java
@@ -31,7 +31,7 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderEffect;
+import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
@@ -58,7 +58,7 @@ public class ReturnedPhalanx extends CardImpl {
// Defender
this.addAbility(DefenderAbility.getInstance());
// {1}{U}: Returned Phalanx can attack this turn as though it didn't have defender.
- this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}")));
+ this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}")));
}
public ReturnedPhalanx(final ReturnedPhalanx card) {
diff --git a/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java b/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java
index d504ec3057..3794767a27 100644
--- a/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java
+++ b/Mage.Sets/src/mage/sets/urzassaga/GoblinOffensive.java
@@ -31,7 +31,6 @@ import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
-import mage.ObjectColor;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
diff --git a/Mage.Sets/src/mage/sets/zendikar/QuestForPureFlame.java b/Mage.Sets/src/mage/sets/zendikar/QuestForPureFlame.java
index b1f90b7eb1..95a4f09d1e 100644
--- a/Mage.Sets/src/mage/sets/zendikar/QuestForPureFlame.java
+++ b/Mage.Sets/src/mage/sets/zendikar/QuestForPureFlame.java
@@ -28,10 +28,6 @@
package mage.sets.zendikar;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Rarity;
-import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleActivatedAbility;
@@ -40,8 +36,11 @@ import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
+import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
+import mage.constants.Rarity;
+import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
@@ -59,8 +58,6 @@ public class QuestForPureFlame extends CardImpl {
super(ownerId, 144, "Quest for Pure Flame", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}");
this.expansionSetCode = "ZEN";
- this.color.setRed(true);
-
// Whenever a source you control deals damage to an opponent, you may put a quest counter on Quest for Pure Flame.
this.addAbility(new QuestForPureFlameTriggeredAbility());
@@ -139,22 +136,24 @@ class QuestForPureFlameEffect extends ReplacementEffectImpl {
}
@Override
- public boolean applies(GameEvent event, Ability source, Game game) {
- if (event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER)
- || event.getType().equals(GameEvent.EventType.DAMAGE_CREATURE)) {
- Permanent permanent = game.getPermanent(event.getSourceId());
- Player player = game.getPlayer(event.getSourceId());
- StackObject spell = game.getStack().getStackObject(event.getSourceId());
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType().equals(GameEvent.EventType.DAMAGE_CREATURE) ||
+ event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER);
+ }
- if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) {
- event.setAmount(event.getAmount() * 2);
- }
- if (player != null && player.getId().equals(source.getControllerId())) {
- event.setAmount(event.getAmount() * 2);
- }
- if (spell != null && spell.getControllerId().equals(source.getControllerId())) {
- event.setAmount(event.getAmount() * 2);
- }
+ @Override
+ public boolean applies(GameEvent event, Ability source, Game game) {
+ Permanent permanent = game.getPermanent(event.getSourceId());
+ if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) {
+ return true;
+ }
+ Player player = game.getPlayer(event.getSourceId());
+ if (player != null && player.getId().equals(source.getControllerId())) {
+ return true;
+ }
+ StackObject spell = game.getStack().getStackObject(event.getSourceId());
+ if (spell != null && spell.getControllerId().equals(source.getControllerId())) {
+ return true;
}
return false;
}
@@ -166,6 +165,7 @@ class QuestForPureFlameEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
- return apply(game, source);
+ event.setAmount(event.getAmount() * 2);
+ return false;
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/ItThatBetraysTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/ItThatBetraysTest.java
new file mode 100644
index 0000000000..77ac310ff5
--- /dev/null
+++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/ItThatBetraysTest.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 org.mage.test.cards.control;
+
+import mage.abilities.keyword.HasteAbility;
+import mage.constants.PhaseStep;
+import mage.constants.Zone;
+import org.junit.Test;
+import org.mage.test.serverside.base.CardTestPlayerBase;
+
+/**
+ *
+ * @author LevelX2
+ */
+
+public class ItThatBetraysTest extends CardTestPlayerBase {
+
+ /**
+ * https://github.com/magefree/mage/issues/796
+ *
+ * When an opponent sacrifices a fetchland and you have an It That Betrays in play,
+ * sacrificing the fetchland that comes under your control from its ability returns
+ * it to play under your control, allowing you to fetch infinite lands.
+ *
+ */
+ @Test
+ public void testPermanentControlEffect() {
+ addCard(Zone.BATTLEFIELD, playerA, "Flooded Strand", 1);
+
+ addCard(Zone.BATTLEFIELD, playerB, "It That Betrays");
+
+ activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}, Pay 1 life, Sacrifice");
+ activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}, Pay 1 life, Sacrifice");
+
+ setStopAt(1, PhaseStep.BEGIN_COMBAT);
+ execute();
+
+ assertLife(playerA, 19);
+ assertLife(playerB, 19);
+
+ // Going to graveyard if player B sacrifices it
+ assertGraveyardCount(playerA, "Flooded Strand", 1);
+ }
+
+}
diff --git a/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java b/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java
index 71d6972442..26d13ed96b 100644
--- a/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java
+++ b/Mage/src/mage/abilities/common/OpponentSacrificesNonTokenPermanentTriggeredAbility.java
@@ -27,15 +27,14 @@
*/
package mage.abilities.common;
-import mage.MageObject;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
-import mage.target.targetpointer.FixedTarget;
import mage.game.permanent.PermanentToken;
+import mage.target.targetpointer.FixedTarget;
public class OpponentSacrificesNonTokenPermanentTriggeredAbility extends TriggeredAbilityImpl {
@@ -54,9 +53,9 @@ public class OpponentSacrificesNonTokenPermanentTriggeredAbility extends Trigger
@Override
public boolean checkTrigger(GameEvent event, Game game) {
- if (game.getPlayer(this.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
- MageObject object = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
- if (object instanceof Permanent && !(object instanceof PermanentToken) ) {
+ if (game.getPlayer(getControllerId()).hasOpponent(event.getPlayerId(), game)) {
+ Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
+ if (permanent != null && !(permanent instanceof PermanentToken) ) {
for (Effect effect : getEffects()) {
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
}
diff --git a/Mage/src/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java b/Mage/src/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java
index 3b17240518..367388fc06 100644
--- a/Mage/src/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java
+++ b/Mage/src/mage/abilities/common/TurnedFaceUpAllTriggeredAbility.java
@@ -34,7 +34,6 @@ import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
-import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
@@ -53,12 +52,15 @@ public class TurnedFaceUpAllTriggeredAbility extends TriggeredAbilityImpl {
}
public TurnedFaceUpAllTriggeredAbility(Effect effect, FilterPermanent filter, boolean setTargetPointer) {
- super(Zone.BATTLEFIELD, effect);
+ this(Zone.BATTLEFIELD, effect, filter, setTargetPointer, false);
+ }
+
+ public TurnedFaceUpAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean setTargetPointer, boolean optional) {
+ super(zone, effect, optional);
// has to be set so the ability triggers if card itself is turn faced up
this.setWorksFaceDown(true);
this.filter = filter;
this.setTargetPointer = setTargetPointer;
-
}
public TurnedFaceUpAllTriggeredAbility(final TurnedFaceUpAllTriggeredAbility ability) {
@@ -105,7 +107,7 @@ public class TurnedFaceUpAllTriggeredAbility extends TriggeredAbilityImpl {
@Override
public String getRule() {
- return "When " + filter.getMessage() + " is turned face up, " + super.getRule();
+ return "Whenever " + filter.getMessage() + " is turned face up, " + super.getRule();
}
}
diff --git a/Mage/src/mage/abilities/costs/common/RevealTargetFromHandCost.java b/Mage/src/mage/abilities/costs/common/RevealTargetFromHandCost.java
index e97ad38c71..f5b131fa78 100644
--- a/Mage/src/mage/abilities/costs/common/RevealTargetFromHandCost.java
+++ b/Mage/src/mage/abilities/costs/common/RevealTargetFromHandCost.java
@@ -46,7 +46,7 @@ public class RevealTargetFromHandCost extends CostImpl {
public RevealTargetFromHandCost(TargetCardInHand target) {
this.addTarget(target);
- this.text = "reveal " + target.getTargetName();
+ this.text = (target.getNumberOfTargets() == 0 ?"you may ":"") + "reveal " + target.getTargetName();
}
public RevealTargetFromHandCost(RevealTargetFromHandCost cost) {
diff --git a/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java b/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java
index 5a080336e7..b79149a846 100644
--- a/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java
+++ b/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java
@@ -46,7 +46,7 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect {
}
public AddManaOfAnyColorEffect(final int amount) {
- super(new Mana(0,0,0,0,0,0,1));
+ super(new Mana(0,0,0,0,0,0, amount));
this.amount = amount;
this.staticText = new StringBuilder("add ")
.append(CardUtil.numberToText(amount))
diff --git a/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java b/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java
index dda84ffa5f..91b0bd9f34 100644
--- a/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java
+++ b/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java
@@ -57,13 +57,10 @@ public class FightTargetSourceEffect extends OneShotEffect {
// only if target is legal the effect will be applied
if (source.getTargets().get(0).isLegal(source, game)) {
Permanent creature1 = game.getPermanent(source.getTargets().get(0).getFirstTarget());
-
// 20110930 - 701.10
if (creature1 != null && sourcePermanent != null) {
if (creature1.getCardType().contains(CardType.CREATURE) && sourcePermanent.getCardType().contains(CardType.CREATURE)) {
- creature1.damage(sourcePermanent.getPower().getValue(), sourcePermanent.getId(), game, false, true);
- sourcePermanent.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true);
- return true;
+ return sourcePermanent.fight(creature1, source, game);
}
}
}
diff --git a/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java b/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java
index 42386c8f28..82b02c18d9 100644
--- a/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java
+++ b/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java
@@ -61,9 +61,7 @@ public class FightTargetsEffect extends OneShotEffect {
// 20110930 - 701.10
if (creature1 != null && creature2 != null) {
if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) {
- creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true);
- creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true);
- return true;
+ return creature1.fight(creature2, source, game);
}
}
}
diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderEffect.java b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderSourceEffect.java
similarity index 78%
rename from Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderEffect.java
rename to Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderSourceEffect.java
index f63d0a2624..eb7dcc3c53 100644
--- a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderEffect.java
+++ b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderSourceEffect.java
@@ -40,14 +40,14 @@ import mage.game.Game;
* @author LevelX2
*/
-public class CanAttackAsThoughtItDidntHaveDefenderEffect extends AsThoughEffectImpl {
+public class CanAttackAsThoughtItDidntHaveDefenderSourceEffect extends AsThoughEffectImpl {
- public CanAttackAsThoughtItDidntHaveDefenderEffect(Duration duration) {
+ public CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration duration) {
super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
staticText = "{this} can attack as though it didn't have defender";
}
- public CanAttackAsThoughtItDidntHaveDefenderEffect(final CanAttackAsThoughtItDidntHaveDefenderEffect effect) {
+ public CanAttackAsThoughtItDidntHaveDefenderSourceEffect(final CanAttackAsThoughtItDidntHaveDefenderSourceEffect effect) {
super(effect);
}
@@ -57,13 +57,13 @@ public class CanAttackAsThoughtItDidntHaveDefenderEffect extends AsThoughEffectI
}
@Override
- public CanAttackAsThoughtItDidntHaveDefenderEffect copy() {
- return new CanAttackAsThoughtItDidntHaveDefenderEffect(this);
+ public CanAttackAsThoughtItDidntHaveDefenderSourceEffect copy() {
+ return new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(this);
}
@Override
- public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
- return sourceId.equals(source.getSourceId());
+ public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
+ return objectId.equals(source.getSourceId());
}
}
diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderTargetEffect.java b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderTargetEffect.java
new file mode 100644
index 0000000000..604fa931fa
--- /dev/null
+++ b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderTargetEffect.java
@@ -0,0 +1,84 @@
+/*
+ * 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 java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.Mode;
+import mage.abilities.effects.AsThoughEffectImpl;
+import mage.constants.AsThoughEffectType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.game.Game;
+
+/**
+ *
+ * @author LevelX2
+ */
+
+public class CanAttackAsThoughtItDidntHaveDefenderTargetEffect extends AsThoughEffectImpl {
+
+ public CanAttackAsThoughtItDidntHaveDefenderTargetEffect(Duration duration) {
+ super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
+ }
+
+ public CanAttackAsThoughtItDidntHaveDefenderTargetEffect(final CanAttackAsThoughtItDidntHaveDefenderTargetEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return true;
+ }
+
+ @Override
+ public CanAttackAsThoughtItDidntHaveDefenderTargetEffect copy() {
+ return new CanAttackAsThoughtItDidntHaveDefenderTargetEffect(this);
+ }
+
+ @Override
+ public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
+ return this.getTargetPointer().getTargets(game, source).contains(objectId);
+ }
+
+ @Override
+ public String getText(Mode mode) {
+ if (staticText != null && !staticText.isEmpty()) {
+ return staticText;
+ }
+ if (!mode.getTargets().isEmpty()) {
+ if (this.duration == Duration.EndOfTurn) {
+ return "Target " + mode.getTargets().get(0).getTargetName() + " can attack this turn as though it didn't have defender";
+ } else {
+ return "Target " + mode.getTargets().get(0).getTargetName() + " can attack as though it didn't have defender";
+ }
+ } else {
+ throw new UnsupportedOperationException("No target defined");
+ }
+ }
+}
diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAttachedEffect.java b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAttachedEffect.java
new file mode 100644
index 0000000000..576062930f
--- /dev/null
+++ b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesAttachedEffect.java
@@ -0,0 +1,81 @@
+/*
+ * 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.RestrictionEffect;
+import mage.constants.AttachmentType;
+import mage.constants.Duration;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class CantBeBlockedByCreaturesAttachedEffect extends RestrictionEffect {
+
+ private final FilterCreaturePermanent filter;
+
+ public CantBeBlockedByCreaturesAttachedEffect(Duration duration, FilterCreaturePermanent filter, AttachmentType attachmentType) {
+ super(duration);
+ this.filter = filter;
+ StringBuilder sb = new StringBuilder();
+ if (attachmentType.equals(AttachmentType.AURA)) {
+ sb.append("Enchanted");
+ } else {
+ sb.append("Equipped");
+ }
+ staticText = sb.append("creature can't be blocked ")
+ .append(filter.getMessage().startsWith("except by") ? "":"by ").append(filter.getMessage()).toString();
+ }
+
+ public CantBeBlockedByCreaturesAttachedEffect(final CantBeBlockedByCreaturesAttachedEffect effect) {
+ super(effect);
+ this.filter = effect.filter;
+ }
+
+ @Override
+ public boolean applies(Permanent permanent, Ability source, Game game) {
+ return permanent.getAttachments().contains(source.getSourceId());
+ }
+
+ @Override
+ public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) {
+ if (filter.match(blocker, source.getSourceId(), source.getControllerId(), game)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public CantBeBlockedByCreaturesAttachedEffect copy() {
+ return new CantBeBlockedByCreaturesAttachedEffect(this);
+ }
+}
diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java
index 54ef2188b8..6ace98f33f 100644
--- a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java
+++ b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneAllEffect.java
@@ -55,7 +55,12 @@ public class CantBeBlockedByOneAllEffect extends ContinuousEffectImpl {
super(duration, Outcome.Benefit);
this.amount = amount;
this.filter = filter;
- staticText = new StringBuilder("Each ").append(filter.getMessage()).append(" can't be blocked except by ").append(CardUtil.numberToText(amount)).append(" or more creatures").toString();
+ StringBuilder sb = new StringBuilder("Each ").append(filter.getMessage()).append(" can't be blocked ");
+ if (duration.equals(Duration.EndOfTurn)) {
+ sb.append("this turn ");
+ }
+ sb.append("except by ").append(CardUtil.numberToText(amount)).append(" or more creatures").toString();
+ staticText = sb.toString();
}
public CantBeBlockedByOneAllEffect(final CantBeBlockedByOneAllEffect effect) {
diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneTargetEffect.java b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneTargetEffect.java
new file mode 100644
index 0000000000..5d42e187ae
--- /dev/null
+++ b/Mage/src/mage/abilities/effects/common/combat/CantBeBlockedByOneTargetEffect.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.abilities.effects.common.combat;
+
+import java.util.UUID;
+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.game.Game;
+import mage.game.permanent.Permanent;
+
+/**
+ *
+ * @author LevelX2
+ */
+
+public class CantBeBlockedByOneTargetEffect extends ContinuousEffectImpl {
+
+ protected int amount;
+
+ public CantBeBlockedByOneTargetEffect(int amount) {
+ this(amount, Duration.WhileOnBattlefield);
+ }
+
+ public CantBeBlockedByOneTargetEffect(int amount, Duration duration) {
+ super(duration, Outcome.Benefit);
+ this.amount = amount;
+ staticText = "Target creature can't be blocked except by " + amount + " or more creatures";
+ }
+
+ public CantBeBlockedByOneTargetEffect(final CantBeBlockedByOneTargetEffect effect) {
+ super(effect);
+ this.amount = effect.amount;
+ }
+
+ @Override
+ public CantBeBlockedByOneTargetEffect copy() {
+ return new CantBeBlockedByOneTargetEffect(this);
+ }
+
+ @Override
+ public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
+ for(UUID targetId: getTargetPointer().getTargets(game, source)) {
+ Permanent perm = game.getPermanent(targetId);
+ if (perm != null) {
+ perm.setMinBlockedBy(amount);
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return false;
+ }
+
+ @Override
+ public boolean hasLayer(Layer layer) {
+ return layer == Layer.RulesEffects;
+ }
+}
\ No newline at end of file
diff --git a/Mage/src/mage/game/combat/Combat.java b/Mage/src/mage/game/combat/Combat.java
index 8223e5116a..143a1dd9de 100644
--- a/Mage/src/mage/game/combat/Combat.java
+++ b/Mage/src/mage/game/combat/Combat.java
@@ -61,6 +61,7 @@ public class Combat implements Serializable, Copyable {
private static FilterCreatureForCombatBlock filterBlockers = new FilterCreatureForCombatBlock();
// There are effects that let creatures assigns combat damage equal to its toughness rather than its power
private boolean useToughnessForDamage;
+ private List useToughnessForDamageFilters = new ArrayList<>();
protected List groups = new ArrayList<>();
protected Map blockingGroups = new HashMap<>();
@@ -130,16 +131,28 @@ public class Combat implements Serializable, Copyable {
return blockers;
}
- public boolean useToughnessForDamage() {
- return useToughnessForDamage;
+ public boolean useToughnessForDamage(Permanent permanent, Game game) {
+ if (useToughnessForDamage) {
+ for(FilterCreaturePermanent filter: useToughnessForDamageFilters) {
+ if (filter.match(permanent, game)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
public void setUseToughnessForDamage(boolean useToughnessForDamage) {
this.useToughnessForDamage = useToughnessForDamage;
}
+ public void addUseToughnessForDamageFilter(FilterCreaturePermanent filter) {
+ this.useToughnessForDamageFilters.add(filter);
+ }
+
public void reset() {
this.useToughnessForDamage = false;
+ this.useToughnessForDamageFilters.clear();
}
public void clear() {
diff --git a/Mage/src/mage/game/combat/CombatGroup.java b/Mage/src/mage/game/combat/CombatGroup.java
index 806a0fb8b9..d02267478c 100644
--- a/Mage/src/mage/game/combat/CombatGroup.java
+++ b/Mage/src/mage/game/combat/CombatGroup.java
@@ -599,7 +599,7 @@ public class CombatGroup implements Serializable, Copyable {
* @return
*/
private int getDamageValueFromPermanent(Permanent permanent, Game game) {
- if (game.getCombat().useToughnessForDamage()) {
+ if (game.getCombat().useToughnessForDamage(permanent, game)) {
return permanent.getToughness().getValue();
} else {
return permanent.getPower().getValue();
diff --git a/Mage/src/mage/game/events/GameEvent.java b/Mage/src/mage/game/events/GameEvent.java
index c4db2d3c9a..e5a1e11f8f 100644
--- a/Mage/src/mage/game/events/GameEvent.java
+++ b/Mage/src/mage/game/events/GameEvent.java
@@ -125,6 +125,7 @@ public class GameEvent {
DAMAGE_PLANESWALKER, DAMAGED_PLANESWALKER,
DESTROY_PERMANENT, DESTROYED_PERMANENT,
SACRIFICE_PERMANENT, SACRIFICED_PERMANENT,
+ FIGHTED_PERMANENT,
EXPLOIDED_CREATURE,
ATTACH, ATTACHED,
UNATTACH, UNATTACHED,
diff --git a/Mage/src/mage/game/permanent/Permanent.java b/Mage/src/mage/game/permanent/Permanent.java
index 99745dad18..aab2f10f6a 100644
--- a/Mage/src/mage/game/permanent/Permanent.java
+++ b/Mage/src/mage/game/permanent/Permanent.java
@@ -119,6 +119,8 @@ public interface Permanent extends Card, Controllable {
boolean destroy(UUID sourceId, Game game, boolean noRegen);
boolean sacrifice(UUID sourceId, Game game);
boolean regenerate(UUID sourceId, Game game);
+ boolean fight(Permanent fightTarget, Ability source, Game game);
+
void entersBattlefield(UUID sourceId, Game game, Zone fromZone, boolean fireEvent);
String getValue();
diff --git a/Mage/src/mage/game/permanent/PermanentCard.java b/Mage/src/mage/game/permanent/PermanentCard.java
index ecde8334a3..c4d58105d3 100644
--- a/Mage/src/mage/game/permanent/PermanentCard.java
+++ b/Mage/src/mage/game/permanent/PermanentCard.java
@@ -146,7 +146,6 @@ public class PermanentCard extends PermanentImpl {
Player owner = game.getPlayer(ownerId);
game.rememberLKI(objectId, Zone.BATTLEFIELD, this);
if (owner != null) {
- this.setControllerId(ownerId); // neccessary for e.g. abilities in graveyard or hand to not have a controller != owner
if (originalCard != null) {
originalCard.updateZoneChangeCounter();
}
diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/mage/game/permanent/PermanentImpl.java
index bc407e2fb1..90a26a0dc6 100644
--- a/Mage/src/mage/game/permanent/PermanentImpl.java
+++ b/Mage/src/mage/game/permanent/PermanentImpl.java
@@ -1297,5 +1297,12 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
this.secondSideCard = card;
}
-
+ @Override
+ public boolean fight(Permanent fightTarget, Ability source, Game game) {
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.FIGHTED_PERMANENT, fightTarget.getId(), getId(), source.getControllerId()));
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.FIGHTED_PERMANENT, getId(), fightTarget.getId(), source.getControllerId()));
+ damage(fightTarget.getPower().getValue(), fightTarget.getId(), game, false, true);
+ fightTarget.damage(getPower().getValue(), getId(), game, false, true);
+ return true;
+ }
}
diff --git a/Utils/gen-card.pl b/Utils/gen-card.pl
old mode 100644
new mode 100755
diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt
index f2ab432c2f..bfb1332133 100644
--- a/Utils/mtg-cards-data.txt
+++ b/Utils/mtg-cards-data.txt
@@ -1,4 +1,4 @@
-Ardent Plea|Alara Reborn|1|U|{1}{W}{U}|Enchantment|||Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)$Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)|
+Ardent Plea|Alara Reborn|1|U|{1}{W}{U}|Enchantment|||Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)$Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)|
Sanctum Plowbeast|Alara Reborn|10|C|{4}{W}{U}|Artifact Creature - Beast|3|6|Defender$Plainscycling {2}, islandcycling {2} ({2}, Discard this card: Search your library for a Plains or Island card, reveal it, and put it into your hand. Then shuffle your library.)|
Stun Sniper|Alara Reborn|100|U|{R}{W}|Creature - Human Archer|1|1|{1}, {tap}: Stun Sniper deals 1 damage to target creature. Tap that creature.|
Lorescale Coatl|Alara Reborn|101|U|{1}{G}{U}|Creature - Snake|2|2|Whenever you draw a card, you may put a +1/+1 counter on Lorescale Coatl.|
@@ -25688,10 +25688,10 @@ Glaring Aegis|Dragons of Tarkir|18|C|{W}|Enchantment - Aura|||Enchant creature$W
Gleam of Authority|Dragons of Tarkir|19|R|{1}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +1/+1 for each +1/+1 counter on other creatures you control$Enchanted creature has vigilance and "{W}, {T}: Bloster 1." (To bolster 1, choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.)|
Graceblade Artisan|Dragons of Tarkir|20|U|{2}{W}|Creature - Human Monk|2|3|Graceblade Artisan gets +2/+2 for each Aura attached to it.|
Great Teacher's Decree|Dragons of Tarkir|21|U|{3}{W}|Sorcery|||Creatures you control get +2/+1 until end of turn.$Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)|
-Herald of Dromoka|Dragons of Tarkir|22|C|{1}{W}|Creature - Human Warrior|2|2|Vigilance$Other Warrior creature you control have vigilance.|
+Herald of Dromoka|Dragons of Tarkir|22|C|{1}{W}|Creature - Human Warrior|2|2|Vigilance$Other Warrior creatures you control have vigilance.|
Hidden Dragonslayer|Dragons of Tarkir|23|R|{1}{W}|Creature - Human Warrior|2|1|Lifelink$Megamorph {2}{W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.)$When Hidden Dragonslayer is turned face up, destroy target creature with power 4 or greater an opponent controls.|
Lightwalker|Dragons of Tarkir|24|C|{1}{W}|Creature - Human Warrior|2|1|Lightwalker has flying as long as it has a +1/+1 counter on it.|
-Misthoof Kirin|Dragons of Tarkir|25|C|{2}{W}|Creature - Kirin|2|1|Flying, vigilance$Megamorph {1}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.)|
+Misthoof Kirin|Dragons of Tarkir|25|C|{2}{W}|Creature - Kirin|2|1|Flying, vigilance$Megamorph {1}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.)|
Myth Realized|Dragons of Tarkir|26|R|Enchantment|||Whenever you cast a noncreature spell, put a lore counter on Myth Realized.${2}{W}: Put a lore counter on Myth Realized.${W}: Until end of turn, Myth Realized becomes a Monk Avatar creature in addition to its other types and gains "This creature's power and toughness are each equal to the number of lore counters on it."|
Ojutai Exemplars|Dragons of Tarkir|27|M|{2}{W}{W}|Creature - Human Monk|4|4|Whenever you cast a noncreature spell, choose one - Tap target creature; Ojutai Exemplars gain first strike and lifelink until end of turn; or Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control.|
Orator of Ojutai|Dragons of Tarkir|28|U|{1}{W}|Creature - Bird Monk|0|4|Defneder, flying$As an additional cost to cast Orator of Ojutai, you may reveal a Dragon card from your hand.$When Orator of Ojutai enters the battlefield, if you revealed a Dragon card or controlled a Dragon as you cast Orator of Ojutai, draw a card.|
@@ -25725,7 +25725,7 @@ Glint|Dragons of Tarkir|55|C|{1}{U}|Instant|||Target creature you control gets +
Gudul Lurker|Dragons of Tarkir|56|U|{U}|Creature - Salamander|1|1|Gudul Lurker can't be blocked.$Megamorph {U} (You may cast this card face down as a 2/2 creature for {3}. Turn it up anytime for its megamorph cost and put a +1/+1 counter on it.)|
Gurmag Drowner|Dragons of Tarkir|57|C|{3}{U}|Creature - Naga Wizard|2|4|Exploit (When this creature enters the battlefield, you may sacrifice a creature.)$When Gurmag Drowner exploits a creature, look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard.|
Icefall Regent|Dragons of Tarkir|58|R|{3}{U}{U}|Creature - Dragon|4|3|Flying$When Icefall Regent enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Icefall Regent.$Spells your opponents cast that target Icefall Regent cost {2} more to cast.|
-Illusory Gains|Dragons of Tarkir|59|R|{3}{U}{U}|Enchantment - Aura|||Enchant creature$You control enchanted creature.$Whenever a creature enters the battlefield under your opponent's control, attach Illusory Gains to that creature.|
+Illusory Gains|Dragons of Tarkir|59|R|{3}{U}{U}|Enchantment - Aura|||Enchant creature$You control enchanted creature.$Whenever a creature enters the battlefield under an opponent's control, attach Illusory Gains to that creature.|
Learn from the Past|Dragons of Tarkir|60|U|{3}{U}|Instant|||Target player shuffles his or her graveyard into his or her library$Draw a card|
Living Lore|Dragons of Tarkir|61|R|{3}{U}|Creature - Avatar|*|*|As Living Lore enters the battlefield, exile an instant or sorcery card from your graveyard.$Living Lore's power and toughness are each equal to the exiled card's converted mana cost.$WHenever Living Lore deals combat damage, you may sacrifice it. If you do, you may cast the exiled card without paying its mana cost.|
Mirror Mockery|Dragons of Tarkir|62|R|{1}{U}|Enchantment - Aura|||Enchant creature$Whenever enchanted creature attacks, you may put a token onto the battlefield that's a copy of that creature. Exile that token at the end of combat.|
@@ -25795,7 +25795,7 @@ Virulent Plague|Dragons of Tarkir|125|U|{2}{B}|Enchantment|||Creature tokens get
Vulturous Aven|Dragons of Tarkir|126|C|{3}{B}|Creature - Bird Shaman|2|3|Flying$Exploit (When this creature enters the battlefield, you may sacrifice a creature.)$When Vulturous Aven explots a creature, you draw two cards and you lose 2 life.|
Wandering Tombshell|Dragons of Tarkir|127|C|{3}{B}|Creature - Zombie Turtle|1|6||
Atarka Efreet|Dragons of Tarkir|128|C|{3}{R}|Creature - Efreet Shaman|5|1|Megamorph {2}{R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.)$When Atarka Efreet is turned face up, it deals 1 damage to target creature or player.|
-Atarka Pummeler|Dragons of Tarkrir|129|U|{4}{R}|Creature - Ogre Warrior|4|5|Formidable - {3}{R}{R}: Each creature you control can't be blocked this turn except by two or more creatures. Activate this ability only if creature you control have total power 8 or greater,|
+Atarka Pummeler|Dragons of Tarkir|129|U|{4}{R}|Creature - Ogre Warrior|4|5|Formidable - {3}{R}{R}: Each creature you control can't be blocked this turn except by two or more creatures. Activate this ability only if creature you control have total power 8 or greater,|
Berserkers' Onslaught|Dragons of Tarkir|130|R|{3}{R}{R}|Enchantment|||Attacking creatures you control have double strike.|
Commune with Lava|Dragons of Tarkir|131|R|{X}{R}{R}|Instant|||Exile the top X cards of your library. Until the end of your next turn, you may play those cards.|
Crater Elemental|Dragons of Tarkir|132|R|{2}{R}|Creature - Elemental|0|6|{R}, {T}, Sacrifice Crater Elemental: Crater Elemental deals 4 damage to target creature.$Formidable - {2}{R}: Crater Elemental has base power 8 until end of turn. Activate this ability only if creatures you control have total power 8 or greater.|
diff --git a/Utils/release/getting_implemented_cards.txt b/Utils/release/getting_implemented_cards.txt
index 05d870e9f2..3feba783d6 100644
--- a/Utils/release/getting_implemented_cards.txt
+++ b/Utils/release/getting_implemented_cards.txt
@@ -102,6 +102,10 @@ git log 7d7afb60d6fbe6d3f15a8fae9af147df3d3f31c6..HEAD --diff-filter=A --name-st
since 1.3.0-2015-02-07v7
git log 6bd17716cd23e0f19142fb59c9c1bc44d87441e3..HEAD --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt
+since 1.3.0-2015-03-14v1
+git log ece4d69f367536ffb80cdf94d5a3dd771ba40f04..HEAD --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt
+
+
3. Copy added_cards.txt to trunk\Utils folder
4. Run script:
> perl extract_in_wiki_format.perl