mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 04:09:54 -08:00
Added a test for conditional mana.
This commit is contained in:
parent
7453d6a39e
commit
54be23cb41
2 changed files with 80 additions and 9 deletions
|
|
@ -54,7 +54,7 @@ public class PillarOfTheParuns extends CardImpl {
|
|||
super(ownerId, 176, "Pillar of the Paruns", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "DIS";
|
||||
|
||||
// {tap}: Add one mana of any color to your mana pool. Spend this mana only to cast a multicolored spell.
|
||||
// {T}: Add one mana of any color to your mana pool. Spend this mana only to cast a multicolored spell.
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(1, new PillarOfTheParunsManaBuilder()));
|
||||
}
|
||||
|
||||
|
|
@ -92,17 +92,11 @@ class PillarOfTheParunsConditionalMana extends ConditionalMana {
|
|||
|
||||
class MultiColoredSpellCastManaCondition extends ManaCondition implements Condition {
|
||||
|
||||
private static final MulticoloredPredicate multicolored = new MulticoloredPredicate();
|
||||
|
||||
private static class LazyHolder {
|
||||
private static final MulticoloredPredicate multicolored = new MulticoloredPredicate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (source instanceof SpellAbility) {
|
||||
MageObject object = game.getObject(source.getSourceId());
|
||||
if (object != null && LazyHolder.multicolored.apply(object, game)) {
|
||||
if (object != null && object.getColor().getColorCount() > 1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -113,4 +107,4 @@ class MultiColoredSpellCastManaCondition extends ManaCondition implements Condit
|
|||
public boolean apply(Game game, Ability source, UUID originalId) {
|
||||
return apply(game, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue