mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
added hint for Nighthawk Scavenger (#7050)
This commit is contained in:
parent
7fb5654657
commit
3b3f724c61
1 changed files with 28 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
|
|
@ -94,3 +95,30 @@ enum NighthawkScavengerValue implements DynamicValue {
|
|||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
enum NighthawkScavengerHint implements Hint {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public String getText(Game game, Ability ability) {
|
||||
String types = game
|
||||
.getOpponents(ability.getControllerId())
|
||||
.stream()
|
||||
.map(game::getPlayer)
|
||||
.filter(Objects::nonNull)
|
||||
.map(Player::getGraveyard)
|
||||
.map(graveyard -> graveyard.getCards(game))
|
||||
.flatMap(Collection::stream)
|
||||
.map(MageObject::getCardType)
|
||||
.flatMap(Collection::stream)
|
||||
.map(CardType::toString)
|
||||
.reduce((s1, s2) -> s1 + ", " + s2)
|
||||
.orElse("None");
|
||||
return "Card types in opponents' graveyards: " + types;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NighthawkScavengerHint copy() {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue