Search in sources :

Example 1 with CantBeCounteredControlledEffect

use of mage.abilities.effects.common.CantBeCounteredControlledEffect in project mage by magefree.

the class DomriAnarchOfBolasEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player == null) {
        return false;
    }
    Mana mana = new Mana();
    if (player.chooseUse(outcome, "Choose a color of mana to add", null, "Red", "Green", source, game)) {
        mana.increaseRed();
    } else {
        mana.increaseGreen();
    }
    player.getManaPool().addMana(mana, game, source);
    game.addEffect(new CantBeCounteredControlledEffect(StaticFilters.FILTER_SPELL_A_CREATURE, Duration.EndOfTurn), source);
    return true;
}
Also used : Player(mage.players.Player) Mana(mage.Mana) CantBeCounteredControlledEffect(mage.abilities.effects.common.CantBeCounteredControlledEffect)

Aggregations

Mana (mage.Mana)1 CantBeCounteredControlledEffect (mage.abilities.effects.common.CantBeCounteredControlledEffect)1 Player (mage.players.Player)1