mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
fix face-down creature spells cost reduction to include disguise (#11962)
This commit is contained in:
parent
d5295b0de3
commit
5df392af64
6 changed files with 77 additions and 41 deletions
|
|
@ -0,0 +1,46 @@
|
|||
package mage.abilities.effects.common.cost;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
|
||||
public class FaceDownSpellsCostReductionControllerEffect extends SpellsCostReductionControllerEffect{
|
||||
|
||||
private static final FilterCreatureCard standardFilter = new FilterCreatureCard("Face-down creature spells");
|
||||
|
||||
/**
|
||||
* Face-down creature spells you cast cost
|
||||
* @param amount less to cast
|
||||
*/
|
||||
public FaceDownSpellsCostReductionControllerEffect(int amount) {
|
||||
super(standardFilter, amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Face-down spells you cast cost
|
||||
* @param filter with matching characteristics
|
||||
* @param amount less to cast
|
||||
*/
|
||||
public FaceDownSpellsCostReductionControllerEffect(FilterCard filter, int amount) {
|
||||
super(filter, amount);
|
||||
}
|
||||
|
||||
protected FaceDownSpellsCostReductionControllerEffect(final FaceDownSpellsCostReductionControllerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FaceDownSpellsCostReductionControllerEffect copy() {
|
||||
return new FaceDownSpellsCostReductionControllerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
if (abilityToModify instanceof SpellAbility && ((SpellAbility) abilityToModify).getSpellAbilityCastMode().isFaceDown()) {
|
||||
return super.applies(abilityToModify, source, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue