Search in sources :

Example 6 with SaprolingToken

use of mage.game.permanent.token.SaprolingToken in project mage by magefree.

the class MorbidBloomEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    Card card = game.getCard(source.getFirstTarget());
    if (player == null || card == null) {
        return false;
    }
    player.moveCards(card, Zone.EXILED, source, game);
    int toughness = card.getToughness().getValue();
    if (toughness < 1) {
        return true;
    }
    return new SaprolingToken().putOntoBattlefield(toughness, game, source, player.getId());
}
Also used : SaprolingToken(mage.game.permanent.token.SaprolingToken) Player(mage.players.Player) FilterCard(mage.filter.FilterCard) FilterCreatureCard(mage.filter.common.FilterCreatureCard) Card(mage.cards.Card)

Example 7 with SaprolingToken

use of mage.game.permanent.token.SaprolingToken in project mage by magefree.

the class SarpadianEmpiresCreateSelectedTokenEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    String tokenType = game.getState().getValue(source.getSourceId().toString() + "_SarpadianEmpiresVolVii").toString();
    Token token;
    switch(tokenType) {
        case "White Citizen":
            token = new CitizenToken();
            break;
        case "Blue Camarid":
            token = new CamaridToken();
            break;
        case "Black Thrull":
            token = new ThrullToken();
            break;
        case "Red Goblin":
            token = new GoblinToken();
            break;
        default:
            token = new SaprolingToken();
            break;
    }
    token.putOntoBattlefield(1, game, source, source.getControllerId());
    return true;
}
Also used : SaprolingToken(mage.game.permanent.token.SaprolingToken) ThrullToken(mage.game.permanent.token.ThrullToken) CitizenToken(mage.game.permanent.token.CitizenToken) GoblinToken(mage.game.permanent.token.GoblinToken) CamaridToken(mage.game.permanent.token.CamaridToken) CitizenToken(mage.game.permanent.token.CitizenToken) ThrullToken(mage.game.permanent.token.ThrullToken) SaprolingToken(mage.game.permanent.token.SaprolingToken) Token(mage.game.permanent.token.Token) CamaridToken(mage.game.permanent.token.CamaridToken) GoblinToken(mage.game.permanent.token.GoblinToken)

Aggregations

SaprolingToken (mage.game.permanent.token.SaprolingToken)7 Player (mage.players.Player)6 Card (mage.cards.Card)3 CreateTokenEffect (mage.abilities.effects.common.CreateTokenEffect)2 Permanent (mage.game.permanent.Permanent)2 Token (mage.game.permanent.token.Token)2 TargetCreaturePermanent (mage.target.common.TargetCreaturePermanent)2 UUID (java.util.UUID)1 MageObject (mage.MageObject)1 Cards (mage.cards.Cards)1 CardsImpl (mage.cards.CardsImpl)1 Choice (mage.choices.Choice)1 ChoiceColor (mage.choices.ChoiceColor)1 ChoiceImpl (mage.choices.ChoiceImpl)1 CardType (mage.constants.CardType)1 FilterCard (mage.filter.FilterCard)1 FilterPermanent (mage.filter.FilterPermanent)1 FilterControlledLandPermanent (mage.filter.common.FilterControlledLandPermanent)1 FilterCreatureCard (mage.filter.common.FilterCreatureCard)1 ColorPredicate (mage.filter.predicate.mageobject.ColorPredicate)1