mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
[C21] Implemented Scholarship Sponsor
This commit is contained in:
parent
cefc841ce0
commit
802dacea29
4 changed files with 117 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue