forked from External/mage
Amend Case of the Shifting Visage hint
This commit is contained in:
parent
f47243da35
commit
4af6db7ad0
1 changed files with 32 additions and 3 deletions
|
|
@ -8,15 +8,17 @@ import mage.abilities.condition.Condition;
|
|||
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||
import mage.abilities.condition.common.SolvedSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.keyword.SurveilEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.hint.common.CaseSolvedHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreatureSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -45,7 +47,7 @@ public final class CaseOfTheShiftingVisage extends CardImpl {
|
|||
), SolvedSourceCondition.SOLVED, null);
|
||||
|
||||
this.addAbility(new CaseAbility(initialAbility, toSolveCondition, solvedAbility)
|
||||
.addHint(new ValueHint("Cards in your graveyard", new CardsInControllerGraveyardCount())));
|
||||
.addHint(new CaseOfTheShiftingVisageHint(toSolveCondition)));
|
||||
}
|
||||
|
||||
private CaseOfTheShiftingVisage(final CaseOfTheShiftingVisage card) {
|
||||
|
|
@ -57,3 +59,30 @@ public final class CaseOfTheShiftingVisage extends CardImpl {
|
|||
return new CaseOfTheShiftingVisage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CaseOfTheShiftingVisageHint extends CaseSolvedHint {
|
||||
|
||||
CaseOfTheShiftingVisageHint(Condition condition) {
|
||||
super(condition);
|
||||
}
|
||||
|
||||
private CaseOfTheShiftingVisageHint(final CaseOfTheShiftingVisageHint hint) {
|
||||
super(hint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CaseOfTheShiftingVisageHint copy() {
|
||||
return new CaseOfTheShiftingVisageHint(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConditionText(Game game, Ability source) {
|
||||
UUID playerId = source.getControllerId();
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player == null) {
|
||||
return "";
|
||||
}
|
||||
int value = player.getGraveyard().count(StaticFilters.FILTER_CARD, playerId, source, game);
|
||||
return "Cards in graveyard: " + value + " (need 15).";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue