mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
Fixed that by some effects that move permanents from battlefield to other zones, the object was not moved and was still on the battlefield but also shown in the target zone.
This commit is contained in:
parent
f6ef6f6667
commit
35654a5ca8
1 changed files with 13 additions and 1 deletions
|
@ -2839,7 +2839,19 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
@Override
|
||||
public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) {
|
||||
ArrayList<Card> cardList = new ArrayList<>();
|
||||
cardList.addAll(cards.getCards(game));
|
||||
for (UUID cardId: cards) {
|
||||
if (fromZone.equals(Zone.BATTLEFIELD)) {
|
||||
Permanent permanent = game.getPermanent(cardId);
|
||||
if (permanent != null) {
|
||||
cardList.add(permanent);
|
||||
}
|
||||
} else {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
cardList.add(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
return moveCards(cardList, fromZone, toZone, source, game);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue