forked from External/mage
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:
parent
dcca63b963
commit
be4b568e88
14 changed files with 168 additions and 15 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue