Package mage.abilities.condition

Examples of mage.abilities.condition.InvertCondition


        this.toughness = new MageInt(8);

        // Tromokratis has hexproof unless it's attacking or blocking.
        Effect effect = new ConditionalContinousEffect(
                new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield),
                new InvertCondition(new SourceMatchesFilterCondition(new FilterAttackingOrBlockingCreature())),
                "{this} has hexproof unless it's attacking or blocking");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

        // Tromokratis can't be blocked unless all creatures defending player controls block it.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedUnlessAllEffect()));
View Full Code Here


        this.addAbility(FlyingAbility.getInstance());
        // As long as Pristine Angel is untapped, it has protection from artifacts and from all colors.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
                new ConditionalContinousEffect(
                new GainAbilitySourceEffect(new ProtectionAbility(filter), Duration.WhileOnBattlefield),
                new InvertCondition(new SourceTappedCondition()),
                "As long as {this} is untapped, it has protection from artifacts and from all colors")));
        // Whenever you cast a spell, you may untap Pristine Angel.
        this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), true));
    }
View Full Code Here

    public HinterlandHarbor(UUID ownerId) {
        super(ownerId, 241, "Hinterland Harbor", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0));
        String abilityText = "tapped unless you control a Forest or an Island";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new GreenManaAbility());
        this.addAbility(new BlueManaAbility());
    }
View Full Code Here

        // Reveal the top eight cards of your library. You may put a creature card from among them onto the battlefield. Put the rest into your graveyard.
        // <i>Ferocious</i> - If you control a creature with power 4 or greater, you may put two creature cards onto the battlefield instead of one.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new SeeTheUnwrittenEffect(1),
                new SeeTheUnwrittenEffect(2),
                new InvertCondition(FerociousCondition.getInstance()),
                "Reveal the top eight cards of your library. You may put a creature card from among them onto the battlefield. Put the rest into your graveyard" +
                 "<br/><br/><i>Ferocious</i> - If you control a creature with power 4 or greater, you may put two creature cards onto the battlefield instead of one"       ));
    }
View Full Code Here

        this.color.setBlue(true);

        // Counter target noncreature spell unless its controller pays {1}.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new CounterUnlessPaysEffect(new GenericManaCost(1)),
                new InvertCondition(FerociousCondition.getInstance()),
                "Counter target noncreature spell unless its controller pays {1}."));
        // <i>Ferocious</i> - If you control a creature with power 4 or greater, counter that spell instead.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new CounterTargetEffect(),
                FerociousCondition.getInstance(),
View Full Code Here

        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted creature gets +2/+2 as long as it's a Human. Otherwise, it can't attack or block.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostEquippedEffect(2, 2), new EquippedHasSubtypeCondition("Human"), rule)));
        Effect effect = new ConditionalRestrictionEffect(new CantAttackBlockAttachedEffect(AttachmentType.AURA), new InvertCondition(new EquippedHasSubtypeCondition("Human")));
        effect.setText("Otherwise, it can't attack or block");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        this.toughness = new MageInt(5);

        // Raid - When Bellowing Saddlebrute enters the battlefield, you lose 4 life unless you attacked with a creature this turn
        this.addAbility(new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(4)),
                new InvertCondition(RaidCondition.getInstance()),
                "<i>Raid</i> - When {this} enters the battlefield, you lose 4 life unless you attacked with a creature this turn"
        ));
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

    public ClifftopRetreat(UUID ownerId) {
        super(ownerId, 238, "Clifftop Retreat", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

        Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0));
        String abilityText = "tap it unless you control a Mountain or a Plains";
        this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText));
        this.addAbility(new RedManaAbility());
        this.addAbility(new WhiteManaAbility());
    }
View Full Code Here

        this.toughness = new MageInt(4);

        // When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game.
        this.addAbility(new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new LoseGameSourceControllerEffect(), false),
                new InvertCondition(new CastFromHandCondition()),
                "When {this} enters the battlefield, if you didn't cast it from your hand, you lose the game"
        ));
        this.addWatcher(new CastFromHandWatcher());

        // Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated.
View Full Code Here

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

        // Other Human creatures you control get +1/+1.
        Effect effect = new ConditionalContinousEffect(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true), new InvertCondition(new TransformedCondition()), ruleText);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

        // At the beginning of each upkeep, if no spells were cast last turn, transform Mayor of Avabruck.
        this.addAbility(new TransformAbility());
        TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
View Full Code Here

TOP

Related Classes of mage.abilities.condition.InvertCondition

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.