* Prized Amalgam - Fixed that it also returned if it entered and left the battlefield after the trigger was created (fixes #2485).

This commit is contained in:
LevelX2 2016-10-20 15:04:27 +02:00
parent 4732f83082
commit 77729e892c
2 changed files with 26 additions and 9 deletions

View file

@ -27,6 +27,8 @@
*/
package mage.abilities.effects.common;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
@ -70,12 +72,14 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Set<Card> cardsToMove = new HashSet<>();
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
Card card = game.getCard(targetId);
if (card != null) {
controller.moveCards(card, Zone.BATTLEFIELD, source, game, tapped, false, false, null);
cardsToMove.add(card);
}
}
controller.moveCards(cardsToMove, Zone.BATTLEFIELD, source, game, tapped, false, false, null);
return true;
}
return false;