Skip to content

Commit

Permalink
Amend Case of the Shifting Visage hint
Browse files Browse the repository at this point in the history
  • Loading branch information
PurpleCrowbar committed Feb 25, 2024
1 parent f47243d commit 4af6db7
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions Mage.Sets/src/mage/cards/c/CaseOfTheShiftingVisage.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
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;

Expand Down Expand Up @@ -45,7 +47,7 @@ public CaseOfTheShiftingVisage(UUID ownerId, CardSetInfo setInfo) {
), 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) {
Expand All @@ -57,3 +59,30 @@ public CaseOfTheShiftingVisage copy() {
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).";
}
}

0 comments on commit 4af6db7

Please sign in to comment.