fixed Destiny Spinner (missing card hint);
@@ -5,9 +5,12 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.dynamicvalue.DynamicValue;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CantBeCounteredControlledEffect;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
+import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
@@ -54,6 +57,7 @@ public final class DestinySpinner extends CardImpl {
// {3}{G}: Target land you control becomes an X/X Elemental creature with trample and haste until end of turn, where X is the number of enchantments you control. It's still a land.
Ability ability = new SimpleActivatedAbility(new DestinySpinnerEffect(), new ManaCostsImpl("{3}{G}"));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND));
+ ability.addHint(new ValueHint("Enchantments you control", DestinySpinnerCount.instance));
this.addAbility(ability);
}
@@ -67,6 +71,30 @@ public final class DestinySpinner extends CardImpl {
}
}
+enum DestinySpinnerCount implements DynamicValue {
+ instance;
+
+ @Override
+ public int calculate(Game game, Ability sourceAbility, Effect effect) {
+ return game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, sourceAbility.getControllerId(), game);
+ }
+
+ @Override
+ public DynamicValue copy() {
+ return instance;
+ }
+
+ @Override
+ public String toString() {
+ return "X";
+ }
+
+ @Override
+ public String getMessage() {
+ return "";
+ }
+}
+
class DestinySpinnerEffect extends OneShotEffect {
DestinySpinnerEffect() {
@@ -86,7 +114,7 @@ class DestinySpinnerEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- int pt = game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game);
+ int pt = DestinySpinnerCount.instance.calculate(game, source, this);
game.addEffect(new BecomesCreatureTargetEffect(
new CreatureToken(pt, pt, "")
.withSubType(SubType.ELEMENTAL)
