Examples of TargetCreatureOrPlayerAmount


Examples of mage.target.common.TargetCreatureOrPlayerAmount

class InfernoTitanAbility extends TriggeredAbilityImpl<InfernoTitanAbility> {

  public InfernoTitanAbility() {
    super(Zone.BATTLEFIELD, new DamageMultiEffect(3), false);
    this.addTarget(new TargetCreatureOrPlayerAmount(3));
  }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

    this.toughness = new MageInt(5);

    this.addAbility(FlashAbility.getInstance());
    this.addAbility(FlyingAbility.getInstance());
    Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect(5), false);
    ability.addTarget(new TargetCreatureOrPlayerAmount(5));
    this.addAbility(ability);
  }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

    public void init(Ability source, Game game) {
        super.init(source, game);
        Target target = source.getTargets().get(0);
        MageObject sourceObject = game.getObject(source.getSourceId());
        if (target instanceof TargetCreatureOrPlayerAmount && sourceObject != null) {
            TargetCreatureOrPlayerAmount multiTarget = (TargetCreatureOrPlayerAmount) target;
            for (UUID targetId: multiTarget.getTargets()) {
                Player player = null;
                Permanent permanent = game.getPermanent(targetId);
                if (permanent == null) {
                    player = game.getPlayer(targetId);
                }
                targetAmountMap.put(targetId, multiTarget.getTargetAmount(targetId));
                StringBuilder sb = new StringBuilder(sourceObject.getName()).append(": Prevent the next ");
                sb.append(multiTarget.getTargetAmount(targetId)).append(" damage to ");
                if (player != null) {
                    sb.append(player.getName());
                } else if (permanent != null) {
                    sb.append(permanent.getName());
                }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

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

        // When Gang of Devils dies, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players.
        Ability ability = new DiesTriggeredAbility(new DamageMultiEffect(3));
        ability.addTarget(new TargetCreatureOrPlayerAmount(3));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

        this.color.setRed(true);

        // Pyrotechnics deals 4 damage divided as you choose among any number of target creatures and/or players.
        this.getSpellAbility().addEffect(new DamageMultiEffect(4));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(4));
    }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

        this.addAbility(new ConvokeAbility());
        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // When Angel of Salvation enters the battlefield, prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
        Ability ability = new EntersBattlefieldTriggeredAbility(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 5));
        ability.addTarget(new TargetCreatureOrPlayerAmount(5));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

        this.color.setRed(true);

        // Flames of the Firebrand deals 3 damage divided as you choose among one, two, or three target creatures and/or players.
        this.getSpellAbility().addEffect(new DamageMultiEffect(3));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(3));
    }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

        this.color.setWhite(true);

        // Prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
        this.getSpellAbility().addEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 5));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(5));
    }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

        this.color.setRed(true);

        // Violent Eruption deals 4 damage divided as you choose among any number of target creatures and/or players.
        this.getSpellAbility().addEffect(new DamageMultiEffect(4));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(4));

        // Madness {1}{R}{R}
        this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}{R}")));
    }
View Full Code Here

Examples of mage.target.common.TargetCreatureOrPlayerAmount

        this.color.setRed(true);

        // Conflagrate deals X damage divided as you choose among any number of target creatures and/or players.
        DynamicValue xValue = new ManacostVariableValue();
        this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue));       
       
        // Flashback-{R}{R}, Discard X cards.
        Ability ability = new FlashbackAbility(new ManaCostsImpl("{R}{R}"), TimingRule.SORCERY);
        ability.addCost(new DiscardXTargetCost(new FilterCard("cards")));
        this.addAbility(ability);
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.