Package mage.abilities.effects.common.continious

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


        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Morph {2}{U}
        this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}")));
        // When Misfire Weaver is turned face up, target creature  you control gains hexproof until end of turn
        Effect effect = new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn);
        Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect);
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);

    }
View Full Code Here


            CreateTokenEffect effect = new CreateTokenEffect(new MarduCharmWarriorToken(), 2);
            effect.apply(game, source);
            for (UUID tokenId :effect.getLastAddedTokenIds()) {
                Permanent token = game.getPermanent(tokenId);
                if (token != null) {
                    ContinuousEffect continuousEffect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
                    continuousEffect.setTargetPointer(new FixedTarget(tokenId));
                    game.addEffect(continuousEffect, source);
                }
            }
            return true;
        }
View Full Code Here

        this.toughness = new MageInt(2);

        // Other green creatures you control get +1/+1.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filterGreen, true)));
        // {G}, {t}: Another target green creature you control gains trample until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(),Duration.EndOfTurn), new ManaCostsImpl("{G}"));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetControlledCreaturePermanent(filterGreen2));
        this.addAbility(ability);
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (FerociousCondition.getInstance().apply(game, source)) {
                ContinuousEffect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
                effect.setTargetPointer(getTargetPointer());
                game.addEffect(effect, source);
            }
            return true;
        }
        return false;
View Full Code Here

        // {T}: Add {1} to your mana pool.
        this.addAbility(new ColorlessManaAbility());

        // {X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{X}{R}{G}"));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new BoostTargetEffect(new ManacostVariableValue(), new StaticValue(0), Duration.EndOfTurn));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        this.toughness = new MageInt(1);

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // Whenever Trained Condor attacks, another target creature you control gains flying until end of turn.
        Effect effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
        Ability ability = new AttacksTriggeredAbility(effect, false);
        Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        mode.getTargets().add(new TargetCreaturePermanent());
        this.getSpellAbility().addMode(mode);

        // * Up to X target creatures gain fear until end of turn.
        mode = new Mode();
        Effect effect = new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("Up to X target creatures gain fear until end of turn");
        mode.getEffects().add(effect);
        mode.getTargets().add(new TargetCreaturePermanent(0,1));
        this.getSpellAbility().addMode(mode);       
    }
View Full Code Here

    public VialOfPoison(UUID ownerId) {
        super(ownerId, 226, "Vial of Poison", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
        this.expansionSetCode = "M14";

        // {1}, Sacrifice Vial of Poison: Target creature gains deathtouch until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{1}"));
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(4);
        this.toughness = new MageInt(5);

        // At the beginning of your upkeep, target non-Wall creature an opponent controls gains forestwalk until your next upkeep.
        GainAbilityTargetEffect effect = new GainAbilityTargetEffect(new ForestwalkAbility(), Duration.Custom,
        "target non-Wall creature an opponent controls gains forestwalk until your next upkeep");
        effect.setDurationToPhase(PhaseStep.UPKEEP);
        Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false);
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setRed(true);

        // Target creature gets +3/+3 and gains first strike until end of turn.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
    }
View Full Code Here

TOP

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

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.