Search in sources :

Example 21 with ManaCosts

use of mage.abilities.costs.mana.ManaCosts in project mage by magefree.

the class CowedByWisdomayCostToAttackBlockEffect method getManaCostToPay.

@Override
public ManaCosts getManaCostToPay(GameEvent event, Ability source, Game game) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null && !controller.getHand().isEmpty()) {
        ManaCosts manaCosts = new ManaCostsImpl();
        manaCosts.add(new GenericManaCost(controller.getHand().size()));
        return manaCosts;
    }
    return null;
}
Also used : ManaCosts(mage.abilities.costs.mana.ManaCosts) Player(mage.players.Player) GenericManaCost(mage.abilities.costs.mana.GenericManaCost) ManaCostsImpl(mage.abilities.costs.mana.ManaCostsImpl)

Aggregations

ManaCosts (mage.abilities.costs.mana.ManaCosts)21 Player (mage.players.Player)16 ManaCostsImpl (mage.abilities.costs.mana.ManaCostsImpl)15 Permanent (mage.game.permanent.Permanent)8 GenericManaCost (mage.abilities.costs.mana.GenericManaCost)7 MageObjectReference (mage.MageObjectReference)6 Ability (mage.abilities.Ability)6 BecomesFaceDownCreatureEffect (mage.abilities.effects.common.continuous.BecomesFaceDownCreatureEffect)6 Card (mage.cards.Card)6 UUID (java.util.UUID)4 OneShotEffect (mage.abilities.effects.OneShotEffect)3 Set (java.util.Set)2 ReflexiveTriggeredAbility (mage.abilities.common.delayed.ReflexiveTriggeredAbility)2 ManaCost (mage.abilities.costs.mana.ManaCost)2 Effect (mage.abilities.effects.Effect)2 AddCountersSourceEffect (mage.abilities.effects.common.counter.AddCountersSourceEffect)2 CardImpl (mage.cards.CardImpl)2 CardSetInfo (mage.cards.CardSetInfo)2 FilterPermanent (mage.filter.FilterPermanent)2 FilterControlledCreaturePermanent (mage.filter.common.FilterControlledCreaturePermanent)2