Add modeTag + hint of used modes for "choose one that hasn't been chosen" abilities. (#10860)

* Add modeTag + hint of used modes on Three Bowls of Porridge

* add ModesAlreadyUsedHint to all the cards.
This commit is contained in:
Susucre 2023-08-27 05:09:04 +02:00 committed by GitHub
parent dcca63b963
commit be4b568e88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 168 additions and 15 deletions

View file

@ -15,6 +15,7 @@ import mage.util.CardUtil;
import mage.util.RandomUtil;
import java.util.*;
import java.util.stream.Stream;
/**
* @author BetaSteward_at_googlemail.com
@ -96,6 +97,15 @@ public class Modes extends LinkedHashMap<UUID, Mode> {
return modeToGet;
}
public Stream<Mode> stream() {
return super.values().stream();
}
public Stream<Mode> streamAlreadySelected(Ability source, Game game) {
Set<UUID> selected = getAlreadySelectedModes(source, game);
return stream().filter(m -> selected.contains(m.getId()));
}
public Mode getMode() {
return currentMode;
}