- Fixed Vile Manifestation

This commit is contained in:
Jeff 2019-03-29 14:53:24 -05:00
parent 65bb9b2161
commit 7d1cdb7b85

View file

@ -1,4 +1,3 @@
package mage.cards.v;
import java.util.UUID;
@ -9,7 +8,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.keyword.BasicLandcyclingAbility;
import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -25,33 +26,38 @@ import mage.filter.predicate.mageobject.AbilityPredicate;
* @author spjspj
*/
public final class VileManifestation extends CardImpl {
private static final FilterCard filter = new FilterCard();
static {
filter.add(new AbilityPredicate(CyclingAbility.class));
filter.add(mage.filter.predicate.Predicates.or(
new AbilityPredicate(CyclingAbility.class),
new AbilityPredicate(BasicLandcyclingAbility.class)));
}
public VileManifestation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.HORROR);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
// Vile Manifestation gets +1/+0 for each card with cycling in your graveyard.
DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCard(filter));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, new StaticValue(0), Duration.WhileOnBattlefield));
Effect effect = new BoostSourceEffect(amount, new StaticValue(0), Duration.WhileOnBattlefield);
effect.setText("Vile Manifestation gets +1/+0 for each card with cycling in your graveyard.");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
this.addAbility(ability);
// Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
}
public VileManifestation(final VileManifestation card) {
super(card);
}
@Override
public VileManifestation copy() {
return new VileManifestation(this);