Package mage.abilities.costs.common

Examples of mage.abilities.costs.common.SacrificeTargetCost


        // Whenever Rhys the Exiled attacks, you gain 1 life for each Elf you control.
        this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter2, 1)), false));
       
        // {B}, Sacrifice an Elf: Regenerate Rhys the Exiled.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ColoredManaCost(ColoredManaSymbol.B));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
        this.addAbility(ability);
    }
View Full Code Here


        // {2}{U}, {T}, Sacrifice another creature: Reveal cards from the top of your library until you reveal a nonlegendary creature card.
        // Put that card onto the battlefield and the rest on the bottom of your library in a random order.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new JaliraMasterPolymorphistEffect(), new ManaCostsImpl("{2}{U}"));
        ability.addCost(new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
        this.addAbility(ability);

    }
View Full Code Here

        // Sacrifice an artifact: Target artifact is indestructible this turn.
        Effect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("Target artifact is indestructible this turn");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                effect, new SacrificeTargetCost(new TargetControlledPermanent(filterControlled)));
        ability.addTarget(new TargetPermanent(filter));
        this.addAbility(ability);
    }
View Full Code Here

        this.subtype.add("Beast");
        this.power = new MageInt(0);
        this.toughness = new MageInt(0);

        // Sacrifice an artifact: Put a +1/+1 counter on Arcbound Ravager.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new SacrificeTargetCost(new TargetControlledPermanent(filter))));
        // Modular 1
        this.addAbility(new ModularAbility(this, 1));
    }
View Full Code Here

        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // {T}, Sacrifice an artifact: Add {R}{R} to your mana pool.
        Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(2), new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
        this.addAbility(ability);
    }
View Full Code Here

   
    @Override
    public boolean apply(Game game, Ability source) {
        Player opponent = game.getPlayer(source.getFirstTarget());
        if (opponent != null) {
            Cost cost = new SacrificeTargetCost(new TargetControlledCreaturePermanent());
            if (cost.canPay(source, source.getSourceId(), opponent.getId(), game)
                    && opponent.chooseUse(outcome, "Sacrifice a creature to prevent the card draw?", game)) {
                if (cost.pay(source, game, source.getSourceId(), opponent.getId(), false)) {
                    return true;
                }
            }
            cost = new PayLifeCost(3);
            if (cost.canPay(source, source.getSourceId(), opponent.getId(), game)
                    && opponent.chooseUse(outcome, "Pay 3 life to prevent the card draw?", game)) {
                if (cost.pay(source, game, source.getSourceId(), opponent.getId(), false)) {
                    return true;
                }
            }
            game.getPlayer(source.getControllerId()).drawCards(1, game);
            return true;
View Full Code Here

        this.expansionSetCode = "M15";

        this.color.setGreen(true);

        // As an additional cost to cast Life's Legacy, sacrifice a creature.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))));
        // Draw cards equal to the sacrificed creature's power.
        this.getSpellAbility().addEffect(new LifesLegacyEffect());

    }
View Full Code Here

    public WandOfTheElements(UUID ownerId) {
        super(ownerId, 158, "Wand of the Elements", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
        this.expansionSetCode = "DST";
        Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WandOfTheElementsFirstToken()), new TapSourceCost());
        firstAbility.addCost(new SacrificeTargetCost(new TargetControlledPermanent(islandFilter)));
        this.addAbility(firstAbility);
        Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WandOfTheElementsSecondToken()), new TapSourceCost());
        secondAbility.addCost(new SacrificeTargetCost(new TargetControlledPermanent(mountainFilter)));
        this.addAbility(secondAbility);

    }
View Full Code Here

        this.expansionSetCode = "M14";

        // {1}, {T}, Sacrifice a creature: You gain 4 life.
        Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(4), new ManaCostsImpl("{1}"));
        ability1.addCost(new TapSourceCost());
        ability1.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)));
        this.addAbility(ability1);
        // {1}, {T}, Sacrifice a creature named Festering Newt: Each opponent loses 4 life. You gain life equal to the life lost this way.
        Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BubblingCauldronEffect(), new ManaCostsImpl("{1}"));
        ability2.addCost(new TapSourceCost());
        ability2.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
        this.addAbility(ability2);
    }
View Full Code Here

        this.power = new MageInt(1);
        this.toughness = new MageInt(2);

        // {T}, Sacrifice an artifact: Draw a card.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.abilities.costs.common.SacrificeTargetCost

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.