package mage.abilities.effects.common; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.Card; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.Duration; import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.Predicate; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardIdPredicate; import mage.game.Game; import mage.game.events.EntersTheBattlefieldEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInHand; /** * Effect for the AmplifyAbility *
* 702.37. Amplify 702.37a Amplify is a static ability. “Amplify N” means “As
* this object enters the battlefield, reveal any number of cards from your hand
* that share a creature type with it. This permanent enters the battlefield
* with N +1/+1 counters on it for each card revealed this way. You can't reveal
* this card or any other cards that are entering the battlefield at the same
* time as this card.” 702.37b If a creature has multiple instances of amplify,
* each one works separately.
*
* @author FenrisulfrX
*/
public class AmplifyEffect extends ReplacementEffectImpl {
private final AmplifyFactor amplifyFactor;
public enum AmplifyFactor {
Amplify1("Amplify 1", "put one +1/+1 counters on it", 1),
Amplify2("Amplify 2", "put two +1/+1 counters on it", 2),
Amplify3("Amplify 3", "put three +1/+1 counters on it", 3);
private final String text;
private final String ruleText;
private final int factor;
AmplifyFactor(String text, String ruleText, int factor) {
this.text = text;
this.ruleText = ruleText;
this.factor = factor;
}
@Override
public String toString() {
return text;
}
public String getRuleText() {
return ruleText;
}
public int getFactor() {
return factor;
}
}
private static class AmplifyPredicate implements Predicate