[C21] Implemented Scholarship Sponsor

This commit is contained in:
Evan Kranzler 2021-04-14 18:33:28 -04:00
parent cefc841ce0
commit 802dacea29
4 changed files with 117 additions and 0 deletions

View file

@ -1,5 +1,6 @@
package mage.cards;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
@ -42,4 +43,6 @@ public interface Cards extends Set<UUID>, Serializable {
int count(FilterCard filter, UUID sourceId, UUID playerId, Game game);
Cards copy();
void retainZone(Zone zone, Game game);
}

View file

@ -2,6 +2,7 @@ package mage.cards;
import mage.MageItem;
import mage.MageObject;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.util.RandomUtil;
@ -206,4 +207,8 @@ public class CardsImpl extends LinkedHashSet<UUID> implements Cards, Serializabl
return cards.values();
}
@Override
public void retainZone(Zone zone, Game game) {
removeIf(uuid -> game.getState().getZone(uuid) != zone);
}
}