mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
added count to card type hints
This commit is contained in:
parent
263dd89385
commit
c4f8d93cb9
2 changed files with 20 additions and 8 deletions
|
|
@ -21,6 +21,7 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -101,7 +102,7 @@ enum NighthawkScavengerHint implements Hint {
|
|||
|
||||
@Override
|
||||
public String getText(Game game, Ability ability) {
|
||||
String types = game
|
||||
List<String> types = game
|
||||
.getOpponents(ability.getControllerId())
|
||||
.stream()
|
||||
.map(game::getPlayer)
|
||||
|
|
@ -114,9 +115,14 @@ enum NighthawkScavengerHint implements Hint {
|
|||
.distinct()
|
||||
.map(CardType::toString)
|
||||
.sorted()
|
||||
.reduce((s1, s2) -> s1 + ", " + s2)
|
||||
.orElse("None");
|
||||
return "Card types in opponents' graveyards: " + types;
|
||||
.collect(Collectors.toList());
|
||||
String message = "" + types.size();
|
||||
if (types.size() > 0) {
|
||||
message += " (";
|
||||
message += types.stream().reduce((a, b) -> a + ", " + b);
|
||||
message += ')';
|
||||
}
|
||||
return "Card types in opponents' graveyards: " + message;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Plopman
|
||||
|
|
@ -89,7 +90,7 @@ enum TarmogoyfHint implements Hint {
|
|||
|
||||
@Override
|
||||
public String getText(Game game, Ability ability) {
|
||||
String types = game.getState()
|
||||
List<String> types = game.getState()
|
||||
.getPlayersInRange(ability.getControllerId(), game)
|
||||
.stream()
|
||||
.map(game::getPlayer)
|
||||
|
|
@ -102,9 +103,14 @@ enum TarmogoyfHint implements Hint {
|
|||
.distinct()
|
||||
.map(CardType::toString)
|
||||
.sorted()
|
||||
.reduce((s1, s2) -> s1 + ", " + s2)
|
||||
.orElse("None");
|
||||
return "Card types in graveyards: " + types;
|
||||
.collect(Collectors.toList());
|
||||
String message = "" + types.size();
|
||||
if (types.size() > 0) {
|
||||
message += " (";
|
||||
message += types.stream().reduce((a, b) -> a + ", " + b);
|
||||
message += ')';
|
||||
}
|
||||
return "Card types in graveyards: " + message;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue