Search in sources :

Example 1 with BasicManaEffect

use of mage.abilities.effects.mana.BasicManaEffect in project mage by magefree.

the class DomriChaosBringerTriggeredAbility method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player == null) {
        return false;
    }
    ManaEffect manaEffect;
    if (player.chooseUse(Outcome.PutManaInPool, "Choose red or green mana", "", "Red", "Green", source, game)) {
        manaEffect = new BasicManaEffect(Mana.RedMana(1));
    } else {
        manaEffect = new BasicManaEffect(Mana.GreenMana(1));
    }
    game.addDelayedTriggeredAbility(new DomriChaosBringerTriggeredAbility(source.getSourceId(), game.getTurnNum()), source);
    return manaEffect.apply(game, source);
}
Also used : Player(mage.players.Player) BasicManaEffect(mage.abilities.effects.mana.BasicManaEffect) ManaEffect(mage.abilities.effects.mana.ManaEffect) BasicManaEffect(mage.abilities.effects.mana.BasicManaEffect)

Example 2 with BasicManaEffect

use of mage.abilities.effects.mana.BasicManaEffect in project mage by magefree.

the class IrencragFeatCantCastEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    new BasicManaEffect(Mana.RedMana(7)).apply(game, source);
    CastSpellLastTurnWatcher watcher = game.getState().getWatcher(CastSpellLastTurnWatcher.class);
    if (watcher == null) {
        return false;
    }
    int start = watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId());
    game.addEffect(new IrencragFeatCantCastEffect(start), source);
    return true;
}
Also used : BasicManaEffect(mage.abilities.effects.mana.BasicManaEffect) CastSpellLastTurnWatcher(mage.watchers.common.CastSpellLastTurnWatcher)

Aggregations

BasicManaEffect (mage.abilities.effects.mana.BasicManaEffect)2 ManaEffect (mage.abilities.effects.mana.ManaEffect)1 Player (mage.players.Player)1 CastSpellLastTurnWatcher (mage.watchers.common.CastSpellLastTurnWatcher)1