Package mage.abilities.costs.common

Examples of mage.abilities.costs.common.SacrificeTargetCost


        this.subtype.add("Rogue");
        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl(""));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        this.addAbility(ability);
    }
View Full Code Here


    this.expansionSetCode = "ROE";
    this.color.setBlack(true);
    this.subtype.add("Vampire");
    this.power = new MageInt(1);
    this.toughness = new MageInt(1);
    this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledCreaturePermanent())));
  }
View Full Code Here

    this.power = new MageInt(2);
    this.toughness = new MageInt(2);
    TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
    Costs costs = new CostsImpl();
    costs.add(new TapSourceCost());
    costs.add(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false)));
    this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KnightOfTheReliquaryEffect()));
    this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay), costs));
  }
View Full Code Here

        this.color.setGreen(true);
        this.subtype.add("Lizard");
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddPlusOneCountersSourceEffect(1), new ManaCostsImpl());
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        this.addAbility(ability);
    }
View Full Code Here

    this.subtype.add("Wizard");
    this.color.setBlack(true);
    this.power = new MageInt(1);
    this.toughness = new MageInt(1);

    this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new SacrificeTargetCost(new TargetControlledCreaturePermanent())));
  }
View Full Code Here

    @Override
    public int calculate(Game game, Ability sourceAbility, Effect effect) {
        for (Cost cost: sourceAbility.getCosts()) {
            if (cost instanceof SacrificeTargetCost) {
                SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost;
                int toughnessSum = 0;
                for (Permanent permanent :sacrificeCost.getPermanents()) {
                    toughnessSum += permanent.getToughness().getValue();
                }
                return toughnessSum;
            }
        }
View Full Code Here

    @Override
    public int calculate(Game game, Ability sourceAbility, Effect effect) {
        for (Cost cost: sourceAbility.getCosts()) {
            if (cost instanceof SacrificeTargetCost) {
                SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost;
                int powerSum = 0;
                for (Permanent permanent :sacrificeCost.getPermanents()) {
                    powerSum += permanent.getPower().getValue();
                }
                return powerSum;
            }
        }
View Full Code Here

        // Shroud (This creature can't be the target of spells or abilities.)
        this.addAbility(ShroudAbility.getInstance());

        // When Scythe Tiger enters the battlefield, sacrifice it unless you sacrifice a land.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter)))));
    }
View Full Code Here

    public AltarOfDementia(UUID ownerId) {
        super(ownerId, 266, "Altar of Dementia", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "TMP";

        // Sacrifice a creature: Target player puts a number of cards equal to the sacrificed creature's power from the top of his or her library into his or her graveyard.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AltarOfDementiaEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
       
    }
View Full Code Here

    public CarnageAltar(UUID ownerId) {
        super(ownerId, 198, "Carnage Altar", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "ZEN";

        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(3));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        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.