[ONE] Implement Font of Progress

This commit is contained in:
theelk801 2023-01-27 20:14:44 -05:00
parent 4f37f32d6a
commit 8a96c26e67
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,52 @@
package mage.cards.f;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CountersSourceCount;
import mage.abilities.effects.common.MillCardsTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FontOfProgress extends CardImpl {
private static final DynamicValue xValue = new CountersSourceCount(CounterType.OIL);
public FontOfProgress(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{U}");
// Font of Progress enters the battlefield with two oil counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.OIL.createInstance(2)),
"with two oil counters on it"
));
// {3}, {T}: Target player mills X cards, where X is the number of oil counters on Font of Progress.
Ability ability = new SimpleActivatedAbility(new MillCardsTargetEffect(xValue)
.setText("target player mills X cards, where X is the number of oil counters on {this}"), new GenericManaCost(3));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}
private FontOfProgress(final FontOfProgress card) {
super(card);
}
@Override
public FontOfProgress copy() {
return new FontOfProgress(this);
}
}

View file

@ -69,6 +69,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
cards.add(new SetCardInfo("Ezuri, Stalker of Spheres", 201, Rarity.RARE, mage.cards.e.EzuriStalkerOfSpheres.class));
cards.add(new SetCardInfo("Feed the Infection", 93, Rarity.UNCOMMON, mage.cards.f.FeedTheInfection.class));
cards.add(new SetCardInfo("Flensing Raptor", 12, Rarity.COMMON, mage.cards.f.FlensingRaptor.class));
cards.add(new SetCardInfo("Font of Progress", 51, Rarity.UNCOMMON, mage.cards.f.FontOfProgress.class));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Free from Flesh", 131, Rarity.COMMON, mage.cards.f.FreeFromFlesh.class));
cards.add(new SetCardInfo("Furnace Skullbomb", 228, Rarity.COMMON, mage.cards.f.FurnaceSkullbomb.class));