Examples of Effect


Examples of mage.abilities.effects.Effect

        // Whenever you cast a creature spell, put a 3/3 green Beast creature token onto the battlefield.
        this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new BeastToken()), filterCreature, false));

        // Whenever you cast a noncreature spell, put three +1/+1 counters on target creature you control.
        Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(3));
        Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false);
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);

        // Whenever a land enters the battlefield under your control, you gain 3 life.
View Full Code Here

Examples of mage.abilities.effects.Effect

        this.toughness = new MageInt(1);

        // A deck can have any number of cards named Shadowborn Apostle.
        this.addInfo("rule", "A deck can have any number of cards named Shadowborn Apostle.");
        // {B}, Sacrifice six creatures named Shadowborn Apostle: Search your library for a Demon creature and put it onto the battlefield. Then shuffle your library.
        Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false, true);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(6,6,filterApostle, false)));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.effects.Effect

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

        // Whenever you cast an enchantment spell, you may have target creature get -2/-2 until end of turn.
        Effect effect = new BoostTargetEffect(-2,-2, Duration.EndOfTurn);
        Ability ability = new SpellCastControllerTriggeredAbility(effect, filter, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);

    }
View Full Code Here

Examples of mage.abilities.effects.Effect

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

        // Whenever an artifact is put into a graveyard from the battlefield, you may have target opponent lose 1 life.
        Effect effect = new LoseLifeTargetEffect(1);
        effect.setText("you may have target opponent lose 1 life");
        Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
                effect, new FilterArtifactPermanent(),
                "Whenever an artifact is put into a graveyard from the battlefield, ", true);
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
View Full Code Here

Examples of mage.abilities.effects.Effect

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

        //Neurok Spy is unblockable as long as defending player controls an artifact.
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableSourceEffect(),
                new DefendingPlayerControlsCondition(new FilterArtifactPermanent()));
        effect.setText("{this} is unblockable as long as defending player controls an artifact");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

Examples of mage.abilities.effects.Effect

        this.subtype.add("Equipment");

        // Equipped creature has "Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature."
        DynamicValue attackingCreatures = new AttackingCreatureCount("attacking creature");
        Ability gainedAbility = new AttacksOrBlocksTriggeredAbility(new BoostSourceEffect(attackingCreatures,attackingCreatures, Duration.EndOfTurn),false);
        Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
        effect.setText("Equipped creature has \"Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature.\"");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        this.addAbility(ability);

        // Whenever a Soldier creature enters the battlefield, you may attach Veteran's Armaments to it.
        this.addAbility(new EntersBattlefieldAllTriggeredAbility(
View Full Code Here

Examples of mage.abilities.effects.Effect

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

        // Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Kithkin Zephyrnaut, you may reveal it.
        // If you do, Kithkin Zephyrnaut gets +2/+2 and gains flying and vigilance until end of turn.
        Effect effect = new BoostSourceEffect(2,2,Duration.EndOfTurn);
        effect.setText("{this} gets +2/+2");
        KinshipAbility ability = new KinshipAbility(effect);
        effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and gains flying");
        ability.addKinshipEffect(effect);
        effect = new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and vigilance until end of turn");
        ability.addKinshipEffect(effect);
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.effects.Effect

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

        // When Festering Newt dies, target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch.
        Effect effect = new ConditionalContinousEffect(
                new BoostTargetEffect(-4,-4, Duration.EndOfTurn),
                new BoostTargetEffect(-1,-1, Duration.EndOfTurn),
                new LockedInCondition(new PermanentsOnTheBattlefieldCondition(filterBogbrewWitch)),
                "target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch");
        Ability ability = new DiesTriggeredAbility(effect);
View Full Code Here

Examples of mage.abilities.effects.Effect

                        // Haste
                        ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
                        effect.setTargetPointer(new FixedTarget(permanent.getId()));
                        game.addEffect(effect, source);
                        // Exile it at end of turn
                        Effect exileEffect = new ExileTargetEffect(new StringBuilder("Exile ").append(permanent.getName()).append(" at the beginning of the next end step").toString());
                        exileEffect.setTargetPointer(new FixedTarget(card.getId()));
                        DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
                        delayedAbility.setSourceId(source.getSourceId());
                        delayedAbility.setControllerId(source.getControllerId());
                        game.addDelayedTriggeredAbility(delayedAbility);
                        return true;
View Full Code Here

Examples of mage.abilities.effects.Effect

        this.getSpellAbility().addTarget(auraTarget);
        this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainControl));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        // You control enchanted permanent.
        Effect effect = new ControlEnchantedEffect();
        effect.setText("You control enchanted permanent");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));

    }
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.