Examples of PayLifeCost


Examples of mage.abilities.costs.common.PayLifeCost

            Permanent creature = game.getPermanentOrLKIBattlefield(creatureId);
            if (creature != null) {
                Player opponent = game.getPlayer(source.getFirstTarget());
                boolean paid = false;
                if (opponent != null) {
                    Cost cost = new PayLifeCost(3);
                    if (cost.canPay(source, source.getSourceId(), opponent.getId(), game)
                            && opponent.chooseUse(outcome, new StringBuilder("Pay 3 live to prevent that ").append(creature.getLogName()).append(" returns to ").append(controller.getName()).append("'s hand?").toString(), game)) {
                        if (cost.pay(source, game, source.getSourceId(), opponent.getId(), false)) {
                            paid = true;
                        }
                    }           
                }
                if (opponent == null || !paid) {
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        this.toughness = new MageInt(1);

        // {B}, {T}, Pay 1 life: Put a +1/+1 counter on Cruel Sadist.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ColoredManaCost(ColoredManaSymbol.B));
        ability.addCost(new TapSourceCost());
        ability.addCost(new PayLifeCost(1));
        this.addAbility(ability);
              
        // {2}{B}, {T}, Remove X +1/+1 counters from Cruel Sadist: Cruel Sadist deals X damage to target creature.
        Effect effect = new DamageTargetEffect(new RemovedCountersForCostValue());
        effect.setText("{this} deals X damage to target creature");
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

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

        // Pay 2 life: Regenerate Deepwood Ghoul.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new PayLifeCost(2)));
   }
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        this.color.setBlack(true);

        // If you control a Swamp, you may pay 4 life rather than pay Snuff Out's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(
                new PayLifeCost(4),
                new PermanentsOnTheBattlefieldCondition(filterSwamp, CountType.MORE_THAN, 0), null));
        //
        // Destroy target nonblack creature. It can't be regenerated.
        this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        this.addAbility(ability1);
       
        // {1}, {tap}, Pay 1 life: Put a 0/1 white Goat creature token onto the battlefield.
        Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GoatToken()), new GenericManaCost(1));
        ability2.addCost(new TapSourceCost());
        ability2.addCost(new PayLifeCost(1));
        this.addAbility(ability2);
       
        // {1}, {tap}, Sacrifice a creature: Return target artifact card from your graveyard to your hand.
        Ability ability3 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(1));
        ability3.addTarget(new TargetCardInGraveyard(new FilterArtifactCard("artifact card in your graveyard")));
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        this.getSpellAbility().addTarget(new TargetPlayer());

        // Flashback-{1}{U}, Pay 3 life.
        CostsImpl costs = new CostsImpl();
        costs.add(new ManaCostsImpl("{1}{U}"));
        costs.add(new PayLifeCost(3));
        this.addAbility(new FlashbackAbility(costs, TimingRule.SORCERY));
    }
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        super(ownerId, 307, "Phyrexian Lens", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "INV";

        // {tap}, Pay 1 life: Add one mana of any color to your mana pool.
        Ability ability = new AnyColorManaAbility();
        ability.addCost(new PayLifeCost(1));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        this.toughness = new MageInt(2);

        // All Slivers have "Pay 2 life: Return this permanent to its owner's hand."
        Effect effect = new ReturnToHandSourceEffect(true);
        effect.setText("Return this permanent to its owner's hand");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new PayLifeCost(2));
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, new FilterPermanent("Sliver", "All Slivers"), "All Slivers have \"Pay 2 life: Return this permanent to its owner's hand")));
    }
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        // You may pay {W}{U}{B}{R}{G} rather than pay Bringer of the Black Dawn's mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{W}{U}{B}{R}{G}")));
        // Trample
        this.addAbility(TrampleAbility.getInstance());
        // At the beginning of your upkeep, you may pay 2 life. If you do, search your library for a card, then shuffle your library and put that card on top of it.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary()), new PayLifeCost(2)), TargetController.YOU, false);
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.costs.common.PayLifeCost

        this.expansionSetCode = "RAV";
        this.subtype.add("Forest");
        this.subtype.add("Plains");
        this.addAbility(new GreenManaAbility());
        this.addAbility(new WhiteManaAbility());
        this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.