diff --git a/Mage.Sets/src/mage/cards/f/FlorianVoldarenScion.java b/Mage.Sets/src/mage/cards/f/FlorianVoldarenScion.java index 18f0f661296..2fc86e1dcbe 100644 --- a/Mage.Sets/src/mage/cards/f/FlorianVoldarenScion.java +++ b/Mage.Sets/src/mage/cards/f/FlorianVoldarenScion.java @@ -3,6 +3,9 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.hint.ValueHint; import mage.abilities.triggers.BeginningOfPostcombatMainTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect; @@ -35,7 +38,7 @@ public final class FlorianVoldarenScion extends CardImpl { // At the beginning of your postcombat main phase, look at the top X cards of your library, where X is the total amount of life your opponents lost this turn. // Exile one of those cards and put the rest on the bottom of your library in a random order. You may play the exiled card this turn. - this.addAbility(new BeginningOfPostcombatMainTriggeredAbility(new FlorianVoldarenScionEffect(), false)); + this.addAbility(new BeginningOfPostcombatMainTriggeredAbility(new FlorianVoldarenScionEffect(), false).addHint(FlorianValue.getHint())); } private FlorianVoldarenScion(final FlorianVoldarenScion card) { @@ -48,6 +51,35 @@ public final class FlorianVoldarenScion extends CardImpl { } } +enum FlorianValue implements DynamicValue { + instance; + private static final ValueHint hint = new ValueHint("Total amount of life your opponents lost this turn", instance); + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + Player controller = game.getPlayer(sourceAbility.getControllerId()); + PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class); + if (controller != null && watcher != null) { + return watcher.getAllOppLifeLost(controller.getId(), game); + } + return 0; + } + + @Override + public FlorianValue copy() { + return instance; + } + + @Override + public String getMessage() { + return ""; + } + + public static ValueHint getHint() { + return hint; + } +} + class FlorianVoldarenScionEffect extends OneShotEffect { FlorianVoldarenScionEffect() {