Package mage.abilities.effects.common.continious

Examples of mage.abilities.effects.common.continious.SetPowerToughnessTargetEffect


        // -1: Target artifact becomes an artifact creature with base power and toughness 5/5.
        Effect effect = new AddCardTypeTargetEffect(CardType.CREATURE, Duration.EndOfGame);
        effect.setText("");
        LoyaltyAbility ability1 = new LoyaltyAbility(effect, -1);
        effect = new SetPowerToughnessTargetEffect(5,5, Duration.EndOfGame);
        effect.setText("Target artifact becomes an artifact creature with base power and toughness 5/5");
        ability1.addEffect(effect);
        ability1.addTarget(new TargetArtifactPermanent());
        this.addAbility(ability1);
View Full Code Here


                if (controller.chooseTarget(outcome, target, source, game)) {
                    Permanent attackingCreature = game.getPermanent(target.getFirstTarget());
                    if (attackingCreature != null) {
                        int newSourcePower = attackingCreature.getPower().getValue();
                        int newAttackerPower = sourceCreature.getPower().getValue();
                        ContinuousEffect effect = new SetPowerToughnessTargetEffect(newSourcePower, sourceCreature.getToughness().getValue(), Duration.EndOfCombat);
                        effect.setTargetPointer(new FixedTarget(source.getSourceId()));
                        game.addEffect(effect, source);
                        effect = new SetPowerToughnessTargetEffect(newAttackerPower, attackingCreature.getToughness().getValue(), Duration.EndOfCombat);
                        effect.setTargetPointer(new FixedTarget(attackingCreature.getId()));
                        game.addEffect(effect, source);
                        return true;
                    }
                }
            }
View Full Code Here

    public Diminish(UUID ownerId) {
        super(ownerId, 52, "Diminish", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}");
        this.expansionSetCode = "M11";
        this.color.setBlue(true);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new SetPowerToughnessTargetEffect(1, 1, Duration.EndOfTurn));
    }
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);
       
        //{1}: Target creature you control has base power and toughness 7/7 until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SetPowerToughnessTargetEffect(7, 7, Duration.EndOfTurn), new GenericManaCost(1));
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.abilities.effects.common.continious.SetPowerToughnessTargetEffect

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.