Package mage.target

Examples of mage.target.TargetPlayer


        // As an additional cost to cast Tormented Thoughts, sacrifice a creature.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), false)));

        // Target player discards a number of cards equal to the sacrificed creature's power.
        this.getSpellAbility().addEffect(new TormentedThoughtsDiscardEffect());
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here


        this.subtype.add("Curse");

        this.color.setRed(true);

        // Enchant player
        TargetPlayer target = new TargetPlayer();
        this.getSpellAbility().addTarget(target);
        this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
        Ability ability = new EnchantAbility(target.getTargetName());
        this.addAbility(ability);

        // At the beginning of enchanted player's upkeep, Curse of the Pierced Heart deals 1 damage to that player.
        this.addAbility(new CurseOfThePiercedHeartAbility());
    }
View Full Code Here

        this.expansionSetCode = "KTK";

        // {2}, Exile Cranial Archive: Target player shuffles his or her gravyeard into his or her library. Draw a card.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CranialArchiveEffect(), new GenericManaCost(2));
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);

    }
View Full Code Here

        this.subtype.add("Curse");

        this.color.setBlack(true);

        // Enchant player
        TargetPlayer auraTarget = new TargetPlayer();
        this.getSpellAbility().addTarget(auraTarget);
        this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature));
        this.addAbility(new EnchantAbility(auraTarget.getTargetName()));

        // Creatures enchanted player controls get -1/-1.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CurseOfDeathsHoldEffect()));
    }
View Full Code Here

        this.addAbility(new ColorlessManaAbility());

        // {3}{B}{R}, {T}: Stensia Bloodhall deals 2 damage to target player.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{B}{R}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        // When Ruthless Ripper is turned face up, target player loses 2 life.
        Effect effect = new LoseLifeTargetEffect(2);
        effect.setText("target player loses 2 life");
        Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "ISD";

        // {2}, {tap}: Target player exiles a card from his or her graveyard. If it's a creature card, you gain 2 life.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GraveyardShovelEffect(), new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        // +1: Each player discards a card.
        this.addAbility(new LoyaltyAbility(new DiscardEachPlayerEffect(), 1));
       
        // -2: Target player sacrifices a creature.
        LoyaltyAbility ability = new LoyaltyAbility(new SacrificeEffect(new FilterCreaturePermanent(), 1, "Target player"), -2);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
       
        // -6: Separate all permanents target player controls into two piles. That player sacrifices all permanents in the pile of his or her choice.
        ability = new LoyaltyAbility(new LilianaOfTheVeilEffect(), -6);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());
        // At the beginning of your upkeep, target player draws a card and loses 1 life.
        Ability ability = new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new DrawCardTargetEffect(1), false);
        ability.addEffect(new LoseLifeTargetEffect(1));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType().equals(GameEvent.EventType.ZONE_CHANGE)) {
            ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
            if (zEvent.isDiesEvent() && zEvent.getTarget() != null && zEvent.getTargetId().equals(getTargets().getFirstTarget())) {
                this.getTargets().clear(); // else spell fizzels because target creature died
                Target target = new TargetPlayer();
                target.add(zEvent.getTarget().getControllerId(), game);
                this.addTarget(target);
                return true;
            }
        }
        return false;
View Full Code Here

TOP

Related Classes of mage.target.TargetPlayer

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.