mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Check zone change counters in PutOnLibrarySourceEffect
This commit is contained in:
parent
6674ca5d20
commit
847df3eeb8
2 changed files with 59 additions and 2 deletions
|
|
@ -47,12 +47,12 @@ public class PutOnLibrarySourceEffect extends OneShotEffect {
|
|||
switch (game.getState().getZone(source.getSourceId())) {
|
||||
case BATTLEFIELD:
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
if (permanent != null && source.getSourceObjectZoneChangeCounter() == permanent.getZoneChangeCounter(game)) {
|
||||
result |= permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, onTop);
|
||||
}
|
||||
case GRAVEYARD:
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null) {
|
||||
if (card != null && source.getSourceObjectZoneChangeCounter() == card.getZoneChangeCounter(game)) {
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (player.getGraveyard().contains(card.getId())) {
|
||||
player.getGraveyard().remove(card);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue