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);
}
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;
}
Aggregations