make SpellsCastWatcher a default game watcher

This commit is contained in:
xenohedron 2023-08-12 20:53:12 -04:00
parent dfb337671b
commit 7d170ef902
46 changed files with 56 additions and 70 deletions

View file

@ -1343,6 +1343,7 @@ public abstract class GameImpl implements Game {
newWatchers.add(new CommanderPlaysCountWatcher()); // commander plays count uses in non commander games by some cards
newWatchers.add(new CreaturesDiedWatcher());
newWatchers.add(new TemptedByTheRingWatcher());
newWatchers.add(new SpellsCastWatcher());
// runtime check - allows only GAME scope (one watcher per game)
newWatchers.forEach(watcher -> {
@ -3864,7 +3865,7 @@ public abstract class GameImpl implements Game {
return filterCommandersBySearchZone(mainCards, returnAllCardParts);
}
final protected Set<UUID> filterCommandersBySearchZone(Set<UUID> commanderMainCards, boolean returnAllCardParts) {
protected final Set<UUID> filterCommandersBySearchZone(Set<UUID> commanderMainCards, boolean returnAllCardParts) {
// filter by zone search (example: if you search commanders on battlefield then must see all sides of mdf cards)
Set<UUID> filteredCards = new HashSet<>();
if (returnAllCardParts) {