Examples of AnotherPredicate


Examples of mage.filter.predicate.permanent.AnotherPredicate

        this(effect, optional, new FilterCreaturePermanent("a creature"));
    }

    public DiesCreatureTriggeredAbility(Effect effect, boolean optional, boolean another) {
        this(effect, optional, new FilterCreaturePermanent("another creature"));
        filter.add(new AnotherPredicate());
    }
View Full Code Here

Examples of mage.filter.predicate.permanent.AnotherPredicate

        filter.add(new AnotherPredicate());
    }
   
    public DiesCreatureTriggeredAbility(Effect effect, boolean optional, boolean another, boolean setTargetPointer) {
        this(effect, optional, new FilterCreaturePermanent("another creature"));
        filter.add(new AnotherPredicate());
        this.setTargetPointer = setTargetPointer;
    }
View Full Code Here

Examples of mage.filter.predicate.permanent.AnotherPredicate

            i++;
        }
        this.objectDescription = sb.toString();
        FilterControlledPermanent filter = new FilterControlledPermanent(objectDescription);
        filter.add(Predicates.or(subtypesPredicates));
        filter.add(new AnotherPredicate());

        // When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control.
        Ability ability1 = new EntersBattlefieldTriggeredAbility(
                new SacrificeSourceUnlessPaysEffect(new ChampionExileCost(filter, new StringBuilder(card.getName()).append(" championed permanents").toString())),false);
        ability1.setRuleVisible(false);
View Full Code Here

Examples of mage.filter.predicate.permanent.AnotherPredicate

    public JourneyToNowhere(UUID ownerId) {
        super(ownerId, 14, "Journey to Nowhere", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
        this.expansionSetCode = "ZEN";
        this.color.setWhite(true);
        FilterCreaturePermanent filter = new FilterCreaturePermanent();
        filter.add(new AnotherPredicate());
        Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect("Journey to Nowhere exile"), false);
        Target target = new TargetPermanent(filter);
        ability1.addTarget(target);
        this.addAbility(ability1);
        Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false);
View Full Code Here

Examples of mage.filter.predicate.permanent.AnotherPredicate

        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

Examples of mage.filter.predicate.permanent.AnotherPredicate

        // You may choose not to untap Hisoka's Guard during your untap step.
        this.addAbility(new SkipUntapOptionalAbility());

        // {1}{U}, {T}: Target creature you control other than Hisoka's Guard has shroud for as long as Hisoka's Guard remains tapped. (It can't be the target of spells or abilities.)
        FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
        filter.add(new AnotherPredicate());
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HisokasGuardGainAbilityTargetEffect(), new ManaCostsImpl("{1}{U}"));
        ability.addCost(new TapSourceCost());
        Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
        ability.addTarget(target);
        this.addAbility(ability);
View Full Code Here

Examples of mage.filter.predicate.permanent.AnotherPredicate

        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

Examples of mage.filter.predicate.permanent.AnotherPredicate

        if (you == null) {
            return false;
        }
        Permanent arsenalThresher = game.getPermanent(source.getSourceId());
        FilterArtifactCard filter = new FilterArtifactCard();
        filter.add(new AnotherPredicate());
        if (you.chooseUse(Outcome.Benefit, "Do you want to reveal other artifacts in your hand?", game)) {
            Cards cards = new CardsImpl();
            if (you.getHand().count(filter, source.getSourceId(), source.getControllerId(), game) > 0) {
                TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter);
                if (you.choose(Outcome.Benefit, target, source.getSourceId(), game)) {
View Full Code Here

Examples of mage.filter.predicate.permanent.AnotherPredicate

        // First strike
        this.addAbility(FirstStrikeAbility.getInstance());
        // Other Knight creatures you control get +1/+1 and are indestructible.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
        FilterCreaturePermanent indestructibleFilter = filter.copy();
        indestructibleFilter.add(new AnotherPredicate());
        indestructibleFilter.add(new ControllerPredicate(TargetController.YOU));
        indestructibleFilter.setMessage("Other Knight creatures you control");
        Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, indestructibleFilter, false);
        effect.setText("Other Knight creatures you control are indestructible");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
View Full Code Here

Examples of mage.filter.predicate.permanent.AnotherPredicate

    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        if (super.checkTrigger(event, game)) {
            getTargets().clear();
            FilterCreaturePermanent filter = new FilterCreaturePermanent("up to three other target creatures");
            filter.add(new AnotherPredicate());
            TargetCreaturePermanent target1 = new TargetCreaturePermanent(0,3, filter, false);
            game.getPlayer(getControllerId()).chooseTarget(Outcome.Exile, target1, this, game);
            if (target1.getTargets().size() > 0) {
                getTargets().add(target1);
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.