Examples of GainControlTargetEffect


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

    }

    @Override
    public boolean apply(Game game, Ability source) {
        ConditionalContinousEffect effect = new ConditionalContinousEffect(
                new GainControlTargetEffect(Duration.Custom),
                new SourceOnBattelfieldCondition(),
                "gain control of target creature for as long as Sower of Temptation remains on the battlefield");
        game.addEffect(effect, source);
        return false;
    }
View Full Code Here

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

            for (Map.Entry<UUID, UUID> entry : playerCreature.entrySet()) {
                Player player = game.getPlayer(entry.getKey());
                if (player != null) {
                    Permanent creature = game.getPermanent(entry.getValue());
                    if (creature != null) {
                        ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, player.getId());
                        effect.setTargetPointer(new FixedTarget(creature.getId()));
                        game.addEffect(effect, source);
                        game.informPlayers(new StringBuilder(player.getName()).append(" gains control of ").append(creature.getName()).toString());
                    }
                }
            }
View Full Code Here

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

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

        // When Master Thief enters the battlefield, gain control of target artifact for as long as you control Master Thief.
        ConditionalContinousEffect effect = new ConditionalContinousEffect(
                new GainControlTargetEffect(Duration.Custom),
                new SourceOnBattlefieldControlUnchangedCondition(),
                "gain control of target artifact for as long as you control Master Thief");
        Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
        ability.addTarget(new TargetPermanent(filter));
        this.addAbility(ability);
View Full Code Here

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

        if (controller != null) {
            for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
                // only creatures of controller & target opponent
                if (permanent.getControllerId().equals(source.getControllerId()) || permanent.getControllerId().equals(targetOpponent.getId())) {
                    UUID newController = permanent.getControllerId().equals(source.getControllerId()) ? targetOpponent.getId() : source.getControllerId();
                    ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn, true, newController);
                    effect.setTargetPointer(new FixedTarget(permanent.getId()));
                    game.addEffect(effect, source);
                    permanent.untap(game);
                    effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
                    effect.setTargetPointer(new FixedTarget(permanent.getId()));
                    game.addEffect(effect, source);
                }
            }
            return true;
        }
View Full Code Here

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

        toughness = new MageInt(2);

        // Remove a ki counter from Azamuki, Treachery Incarnate: Gain control of target creature until end of turn.
        Ability ability = new SimpleActivatedAbility(
                Zone.BATTLEFIELD,
                new GainControlTargetEffect(Duration.EndOfTurn),
                new RemoveCountersSourceCost(CounterType.KI.createInstance()));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

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

        ability.addEffect(effect);
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
       
        // -2: Gain control of target artifact.
        effect = new GainControlTargetEffect(Duration.EndOfGame);
        effect.setText("Gain control of target artifact");
        ability = new LoyaltyAbility(effect, -2);
        ability.addTarget(new TargetArtifactPermanent());
        this.addAbility(ability);
       
View Full Code Here

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

        effects1.add(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()));
        this.addAbility(new LoyaltyAbility(effects1, 1));

        // -2: Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
        Effects effects2 = new Effects();
        effects2.add(new GainControlTargetEffect(Duration.EndOfTurn));
        effects2.add(new UntapTargetEffect());
        effects2.add(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        LoyaltyAbility ability = new LoyaltyAbility(effects2, -2);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
View Full Code Here

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

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

        // {tap}: Gain control of target creature with power less than or equal to the number of creatures you control.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new GainControlTargetEffect(Duration.Custom),
                new TapSourceCost());
        ability.addTarget(new BeguilerOfWillsTarget());
        this.addAbility(ability);
    }
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent targetCreature = game.getPermanent(source.getFirstTarget());
        if (targetCreature != null) {
            source.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId()));
            game.addEffect(new GainControlTargetEffect(Duration.EndOfTurn), source);
            targetCreature.untap(game);
            game.addEffect(new BoostTargetEffect(source.getManaCostsToPay().getX(), 0, Duration.EndOfTurn), source);
            game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), source);
            return true;
        }
View Full Code Here

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

        this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
       
        // Enchanted land has "{tap}, Discard a card: Gain control of target creature until end of turn."
        Ability controlAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainControlTargetEffect(Duration.EndOfTurn), new TapSourceCost());
        controlAbility.addTarget(new TargetCreaturePermanent());
        controlAbility.addCost(new DiscardTargetCost(new TargetCardInHand()));
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(controlAbility, AttachmentType.AURA,
                Duration.WhileOnBattlefield, "Enchanted land has \"{t}, Discard a card: Gain control of target creature until end of turn.\"")));
    }
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.