Fixed a problem that not all effects of Smelt-Ward Gatekeeper's was resolved, because target was nor more legal after getting the control of target creature. Problem was cause by commit 80fc87a7f7. Now both problems should be solved (hopefully).

This commit is contained in:
LevelX2 2013-12-21 16:33:49 +01:00
parent db99909550
commit ebb71b7dd7
2 changed files with 15 additions and 8 deletions

View file

@ -44,16 +44,12 @@ public class FirstTargetPointer implements TargetPointer {
public List<UUID> getTargets(Game game, Ability source) {
ArrayList<UUID> target = new ArrayList<UUID>();
if (source.getTargets().size() > 0) {
Target currentTarget = source.getTargets().get(0);
for (UUID targetId : source.getTargets().get(0).getTargets()) {
Card card = game.getCard(targetId);
if (card != null && zoneChangeCounter.containsKey(targetId)
&& card.getZoneChangeCounter() != zoneChangeCounter.get(targetId)) {
continue;
}
if (!currentTarget.canTarget(targetId, source, game)) {
continue;
}
target.add(targetId);
}
}