Package mage.filter.common

Examples of mage.filter.common.FilterControlledCreaturePermanent


        // Sliver creatures you control have "{T}: Add one mana of any color to your mana pool."
        Ability ability = new AnyColorManaAbility();
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
                new GainAbilityAllEffect(ability,
                Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Sliver","Sliver creatures"),
                "Sliver creatures you control have \"{T}: Add one mana of any color to your mana pool.\"")));
    }
View Full Code Here


        // Return target creature card from your graveyard to the battlefield.
        this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
        this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
        // Flashback-Sacrifice three creatures.
        this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(3,3,new FilterControlledCreaturePermanent("three creatures"),true)), TimingRule.SORCERY));
    }
View Full Code Here

        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // Sacrifice a creature: Target player discards two cards. Activate this ability only any time you could cast a sorcery.
        TargetControlledPermanent target = new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("a creature"), true);
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2), new SacrificeTargetCost(target));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setWhite(true);
        this.color.setBlue(true);

        // Choose one — Creatures you control gain lifelink until end of turn;
        this.getSpellAbility().addEffect(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures")));

        // or draw a card;
        Mode mode = new Mode();
        mode.getEffects().add(new DrawCardSourceControllerEffect(1));
        this.getSpellAbility().addMode(mode);
View Full Code Here

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

        // At the beginning of your upkeep, return a creature you control to its owner's hand.
        this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new ReturnToHandChosenControlledPermanentEffect(new FilterControlledCreaturePermanent())));
    }
View Full Code Here

        ability.addEffect(new ConditionalContinousEffect(
                new GainAbilitySourceEffect(TrampleAbility.getInstance()),
                new CardsInControllerGraveCondition(7),
                " has trample,"));
       
        Ability gainedAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(new FilterControlledCreaturePermanent(), 1, ""), TargetController.YOU, false);
       
        ability.addEffect(new ConditionalContinousEffect(
                new GainAbilitySourceEffect(gainedAbility),
                new CardsInControllerGraveCondition(7),
                " and has \"At the beginning of your upkeep, sacrifice a creature.\" "));
View Full Code Here

        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));

        this.addAbility(new LoyaltyAbility(new GainLifeEffect(2), 1));

        Effects effects1 = new Effects();
        effects1.add(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()));
        effects1.add(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()));
        this.addAbility(new LoyaltyAbility(effects1, -1));

        this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new AvatarToken()), -6));
View Full Code Here

        }
        if (player == null || sourcePermanent == null) {
            return false;
        }

        FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature other than " + sourcePermanent.getName());
        filter.add(new AnotherPredicate());

        Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
        if (target.canChoose(source.getSourceId(), player.getId(), game)) {
            player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
            Permanent permanent = game.getPermanent(target.getFirstTarget());
View Full Code Here

        // {3}, Sacrifice Glaring Spotlight: Creatures you control gain hexproof until end of turn and are unblockable this turn.
        Ability ability = new SimpleActivatedAbility(
                Zone.BATTLEFIELD, new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent(),false),
                new GenericManaCost(3));
        ability.addEffect(new UnblockableAllEffect(new FilterControlledCreaturePermanent(), Duration.EndOfTurn));
        ability.addCost(new SacrificeSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

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

        //When Foundry Champion enters the battlefield, it deals damage to target creature or player equal to the number of creatures you control.
        Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())));
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
       
        //{R}: Foundry Champion gets +1/+0 until end of turn.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterControlledCreaturePermanent

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.