mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
Fix Shaman of Forgotten Ways mana ability (#7163)
This commit is contained in:
parent
de37ad1da1
commit
1862b16d04
1 changed files with 2 additions and 19 deletions
|
@ -15,6 +15,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.mana.ConditionalAnyColorManaAbility;
|
import mage.abilities.mana.ConditionalAnyColorManaAbility;
|
||||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||||
|
import mage.abilities.mana.conditional.CreatureCastConditionalMana;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.AbilityWord;
|
import mage.constants.AbilityWord;
|
||||||
|
@ -69,7 +70,7 @@ class ShamanOfForgottenWaysManaBuilder extends ConditionalManaBuilder {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConditionalMana build(Object... options) {
|
public ConditionalMana build(Object... options) {
|
||||||
return new ShamanOfForgottenWaysConditionalMana(this.mana);
|
return new CreatureCastConditionalMana(this.mana);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 {
|
class ShamanOfForgottenWaysEffect extends OneShotEffect {
|
||||||
|
|
||||||
public ShamanOfForgottenWaysEffect() {
|
public ShamanOfForgottenWaysEffect() {
|
||||||
|
|
Loading…
Reference in a new issue