make Morph cost reduction a separate class (and fix to work with new system)

This commit is contained in:
Steven Knipe 2023-09-18 03:33:20 -07:00
parent 3f82c36813
commit e7927cb50f
8 changed files with 49 additions and 67 deletions

View file

@ -0,0 +1,33 @@
package mage.abilities.effects.common.cost;
import mage.abilities.Ability;
import mage.abilities.keyword.MorphAbility;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
public class MorphSpellsCostReductionControllerEffect extends SpellsCostReductionControllerEffect{
private static final FilterCreatureCard standardFilter = new FilterCreatureCard("Face-down creature spells");
public MorphSpellsCostReductionControllerEffect(int amount) {
super(standardFilter, amount);
}
public MorphSpellsCostReductionControllerEffect(FilterCard filter, int amount) {
super(filter, amount);
}
protected MorphSpellsCostReductionControllerEffect(final MorphSpellsCostReductionControllerEffect effect) {
super(effect);
}
@Override
public MorphSpellsCostReductionControllerEffect copy() {
return new MorphSpellsCostReductionControllerEffect(this);
}
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify instanceof MorphAbility) {
return super.applies(abilityToModify, source, game);
}
return false;
}
}