Package mage.abilities.effects.common.continious

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


        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // Landfall - Whenever a land enters the battlefield under your control, you may gain control of target creature for as long as you control Roil Elemental.
        ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainControlTargetEffect(Duration.Custom), new PermanentsOnTheBattlefieldCondition(filter), rule);
        Ability ability = new LandfallAbility(Zone.BATTLEFIELD, effect, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here


        this.color.setBlue(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(3);
       
        // {TAP}: Gain control of target creature for as long as that creature is enchanted
        ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainControlTargetEffect(Duration.OneUse), EnchantedTargetCondition.getInstance(), "Gain control of target creature for as long as that creature is enchanted");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        super(ownerId, 137, "Mark of Mutiny", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{R}");
        this.expansionSetCode = "ZEN";

        this.color.setRed(true);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new UntapTargetEffect());
    }
View Full Code Here

        // At the beginning of your upkeep, you may put a treasure counter on Legacy's Allure.
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(new Counter("treasure")), TargetController.YOU, true));

        // Sacrifice Legacy's Allure: Gain control of target creature with power less than or equal to the number of treasure counters on Legacy's Allure.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainControlTargetEffect(Duration.EndOfGame, true),new SacrificeSourceCost());
        ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on Legacy's Allure")));
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "NPH";

        this.color.setRed(true);

        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new UntapTargetEffect());
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
    }
View Full Code Here

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

        this.addAbility(HasteAbility.getInstance());
        // When Zealous Conscripts enters the battlefield, gain control of target permanent until end of turn. Untap that permanent. It gains haste until end of turn.
        Ability ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn));
        ability.addTarget(new TargetPermanent());
        ability.addEffect(new UntapTargetEffect());
        ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "It gains haste until end of turn"));
        this.addAbility(ability);
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // When Keiga, the Tide Star dies, gain control of target creature.
        Ability ability = new DiesTriggeredAbility(new GainControlTargetEffect(Duration.Custom));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setRed(true);

        // At the beginning of combat on your turn, if you control each creature on the battlefield with the greatest power, gain control
        // of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn.
        TriggeredAbility gainControlAbility = new BeginningOfCombatTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn), TargetController.YOU, false);
        gainControlAbility.addEffect(new UntapTargetEffect());
        gainControlAbility.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        gainControlAbility.addTarget(new TargetCreaturePermanent(filter));
        Ability conditionalAbility = new ConditionalTriggeredAbility(gainControlAbility, ControlsEachCreatureWithGreatestPowerCondition.getInstance(), ruleText);
        this.addAbility(conditionalAbility);
View Full Code Here

        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{U}{U}"));
        ability.addTarget(new TargetPermanent());
        this.addAbility(ability);

        // {3}{U}: Gain control of target artifact.
        Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainControlTargetEffect(Duration.WhileOnBattlefield), new ManaCostsImpl("{3}{U}"));
        ability2.addTarget(new TargetArtifactPermanent());
        this.addAbility(ability2);
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        boolean result = false;
        ContinuousEffect gainControl = new GainControlTargetEffect(Duration.EndOfTurn);
        ContinuousEffect gainHaste = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
        for (Permanent creature : game.getBattlefield().getAllActivePermanents(CardType.CREATURE)) {
            creature.untap(game);
            gainControl.setTargetPointer(new FixedTarget(creature.getId()));
            gainHaste.setTargetPointer(new FixedTarget(creature.getId()));
            game.addEffect(gainControl, source);
            game.addEffect(gainHaste, source);
            result = true;
        }
View Full Code Here

TOP

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

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.