Fix Shaman of Forgotten Ways mana ability (#7163)

This commit is contained in:
Daniel Bomar 2021-01-01 11:26:57 -06:00 committed by GitHub
parent de37ad1da1
commit 1862b16d04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.mana.ConditionalAnyColorManaAbility;
import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.abilities.mana.conditional.CreatureCastConditionalMana;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
@ -69,7 +70,7 @@ class ShamanOfForgottenWaysManaBuilder extends ConditionalManaBuilder {
@Override
public ConditionalMana build(Object... options) {
return new ShamanOfForgottenWaysConditionalMana(this.mana);
return new CreatureCastConditionalMana(this.mana);
}
@Override
@ -78,24 +79,6 @@ class ShamanOfForgottenWaysManaBuilder extends ConditionalManaBuilder {
}
}
class ShamanOfForgottenWaysConditionalMana extends ConditionalMana {
public ShamanOfForgottenWaysConditionalMana(Mana mana) {
super(mana);
this.staticText = "Spend this mana only to cast creature spells";
addCondition(new ShamanOfForgottenWaysManaCondition());
}
}
class ShamanOfForgottenWaysManaCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
MageObject object = source.getSourceObject(game);
return object instanceof Spell && object.isCreature();
}
}
class ShamanOfForgottenWaysEffect extends OneShotEffect {
public ShamanOfForgottenWaysEffect() {