mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* 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:
parent
4732f83082
commit
77729e892c
2 changed files with 26 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue