Package mage.target

Examples of mage.target.TargetSource


    private TargetSource target;

    public RuneOfProtectionWhiteEffect() {
        super(Duration.EndOfTurn);
        target = new TargetSource(filter);
       
        staticText = "The next time a white source of your choice would deal damage to you this turn, prevent that damage";
    }
View Full Code Here


    }

    @Override
    public void init(Ability source, Game game) {
        Player player = game.getPlayer(source.getControllerId());
        TargetSource target = new TargetSource();
        target.setNotTarget(true);
        if (player != null) {
            target.choose(Outcome.PreventDamage, player.getId(), source.getSourceId(), game);
            this.targetSource = target;
        }
    }
View Full Code Here

    }
    private TargetSource target;

    public PilgrimOfVirtueEffect() {
        super(Duration.EndOfTurn);
        target = new TargetSource(filter);
       
        staticText = "The next time a black source of your choice would deal damage to you this turn, prevent that damage";
    }
View Full Code Here

    private TargetSource target;

    public RuneOfProtectionBlueEffect() {
        super(Duration.EndOfTurn);
        target = new TargetSource(filter);
       
        staticText = "The next time a blue source of your choice would deal damage to you this turn, prevent that damage";
    }
View Full Code Here

   
    private final TargetSource targetSource;

    public OraclesAttendantsReplacementEffect() {
        super(Duration.EndOfTurn, Outcome.RedirectDamage);
        this.targetSource = new TargetSource();
        this.staticText = "All damage that would be dealt to target creature this turn by a source of your choice is dealt to {this} instead";
    }
View Full Code Here

    }
    private TargetSource target;

    public PilgrimOfJusticeEffect() {
        super(Duration.EndOfTurn);
        target = new TargetSource(filter);
       
        staticText = "The next time a red source of your choice would deal damage to you this turn, prevent that damage";
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Target target = new TargetSource();
            target.setRequired(true);
            target.setNotTarget(true);
            if (controller.chooseTarget(outcome, target, source, game)) {
                ContinuousEffect continuousEffect = new InterventionPactPreventDamageEffect();
                continuousEffect.setTargetPointer(new FixedTarget(target.getFirstTarget()));
                game.addEffect(continuousEffect, source);
            }
            return true;
        }
        return false;
View Full Code Here

    private TargetSource target;

    public RuneOfProtectionGreenEffect() {
        super(Duration.EndOfTurn);
        target = new TargetSource(filter);
       
        staticText = "The next time a green source of your choice would deal damage to you this turn, prevent that damage";
    }
View Full Code Here

       
        // Sacrifice Burrenton Forge-Tender: Prevent all damage a red source of your choice would deal this turn.
        Effect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, false);
        effect.setText("Prevent all damage a red source of your choice would deal this turn");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,  effect, new SacrificeSourceCost());
        TargetSource targetSource = new TargetSource(filterObject);
        ability.addTarget(targetSource);
        this.addAbility(ability);

    }
View Full Code Here

        filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
        this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));

        // The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to target creature or player instead.
        this.getSpellAbility().addEffect(new ShiningShoalPreventDamageTargetEffect(Duration.EndOfTurn, new ExileFromHandCostCardConvertedMana()));
        this.getSpellAbility().addTarget(new TargetSource());
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    }
View Full Code Here

TOP

Related Classes of mage.target.TargetSource

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.