From e3ee986c4713d859602dc61362e5742e4bf4f415 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 1 Jun 2013 09:59:53 +0200 Subject: [PATCH] Changed graveyard card count of Lord of Extinction to only count cards of players in range. --- .../src/mage/sets/alarareborn/LordOfExtinction.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java b/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java index 9e9472c276..bfe4bca078 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java +++ b/Mage.Sets/src/mage/sets/alarareborn/LordOfExtinction.java @@ -28,16 +28,16 @@ package mage.sets.alarareborn; import java.util.UUID; -import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Duration; import mage.Constants.Rarity; +import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect; import mage.cards.CardImpl; -import mage.filter.FilterCard; import mage.game.Game; import mage.players.Player; @@ -58,7 +58,7 @@ public class LordOfExtinction extends CardImpl { this.toughness = new MageInt(0); // Lord of Extinction's power and toughness are each equal to the number of cards in all graveyards. - this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new LordOfExtinctionDynamicCount(), Constants.Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessSourceEffect(new LordOfExtinctionDynamicCount(), Duration.WhileOnBattlefield))); } public LordOfExtinction(final LordOfExtinction card) { @@ -76,10 +76,10 @@ class LordOfExtinctionDynamicCount implements DynamicValue { @Override public int calculate(Game game, Ability sourceAbility) { int count = 0; - FilterCard cardsInAllGraveyards = new FilterCard(); - for (Player player : game.getPlayers().values()) { + for (UUID playerId : game.getPlayer(sourceAbility.getControllerId()).getInRange()) { + Player player = game.getPlayer(playerId); if (player != null) { - count += player.getGraveyard().count(cardsInAllGraveyards, game); + count += player.getGraveyard().size(); } } return count;