From f9b9338aac138a7d9a49c7a188800f9deb064f6f Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 9 Jan 2013 00:30:09 +0100 Subject: [PATCH] Using common DynamicValue for Keep Watch. Small changes to Keyrunes. --- .../src/mage/sets/gatecrash/DimirKeyrune.java | 2 +- .../src/mage/sets/gatecrash/GruulKeyrune.java | 2 +- .../src/mage/sets/judgment/KeepWatch.java | 33 +------------------ 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/Mage.Sets/src/mage/sets/gatecrash/DimirKeyrune.java b/Mage.Sets/src/mage/sets/gatecrash/DimirKeyrune.java index d24eaaeb70..0c6a06d739 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/DimirKeyrune.java +++ b/Mage.Sets/src/mage/sets/gatecrash/DimirKeyrune.java @@ -71,7 +71,7 @@ public class DimirKeyrune extends CardImpl { private class DimirKeyruneToken extends Token { DimirKeyruneToken() { - super("", "a 2/2 blue and black Horror until end of turn and is unblockable this turn"); + super("Horror", "a 2/2 blue and black Horror until end of turn and is unblockable this turn"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); color.setBlue(true); diff --git a/Mage.Sets/src/mage/sets/gatecrash/GruulKeyrune.java b/Mage.Sets/src/mage/sets/gatecrash/GruulKeyrune.java index ccafd77870..b82ecf8c1c 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/GruulKeyrune.java +++ b/Mage.Sets/src/mage/sets/gatecrash/GruulKeyrune.java @@ -71,7 +71,7 @@ public class GruulKeyrune extends CardImpl { private class GruulKeyruneToken extends Token { GruulKeyruneToken() { - super("", "a 3/2 red and green Beast artifact creature with trample"); + super("Beast", "a 3/2 red and green Beast artifact creature with trample"); cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); color.setRed(true); diff --git a/Mage.Sets/src/mage/sets/judgment/KeepWatch.java b/Mage.Sets/src/mage/sets/judgment/KeepWatch.java index af495798e2..1e8a2d9253 100644 --- a/Mage.Sets/src/mage/sets/judgment/KeepWatch.java +++ b/Mage.Sets/src/mage/sets/judgment/KeepWatch.java @@ -30,12 +30,9 @@ package mage.sets.judgment; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; -import mage.abilities.Ability; -import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.AttackingCreatureCount; import mage.abilities.effects.common.DrawCardControllerEffect; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.combat.CombatGroup; /** * @@ -62,31 +59,3 @@ public class KeepWatch extends CardImpl { return new KeepWatch(this); } } - -class AttackingCreatureCount implements DynamicValue { - - @Override - public int calculate(Game game, Ability sourceAbility) { - int count = 0; - for (CombatGroup combatGroup : game.getCombat().getGroups()) { - count += combatGroup.getAttackers().size(); - } - return count; - } - - @Override - public DynamicValue copy() { - return this; - } - - @Override - public String getMessage() { - return "attacking creature"; - } - - @Override - public String toString() { - return "one"; - } - -}