Examples of addEffect()


Examples of mage.abilities.common.DiesCreatureTriggeredAbility.addEffect()

        this.color.setBlack(true);

        // Whenever a creature you control dies, you draw a card and lose 1 life.
        Ability ability = new DiesCreatureTriggeredAbility(new DrawCardSourceControllerEffect(1), false, filter);
        ability.addEffect(new LoseLifeSourceControllerEffect(1));
        this.addAbility(ability);
    }

    public DarkProphecy(final DarkProphecy card) {
        super(card);
View Full Code Here

Examples of mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility.addEffect()

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

        // Whenever Blood Artist or another creature dies, target player loses 1 life and you gain 1 life.
        Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new LoseLifeTargetEffect(1), false);
        ability.addEffect(new GainLifeEffect(1));
        Target target = new TargetPlayer();
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.common.DiesTriggeredAbility.addEffect()

                    new InvertCondition(new CastFromHandCondition()), true,
                    "{this} enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand",""));

        // When Epochrasite dies, exile it with three time counters on it and it gains suspend.
        Ability ability = new DiesTriggeredAbility(new ExileSourceEffect());
        ability.addEffect(new AddCountersSourceEffect(CounterType.TIME.createInstance(3), new StaticValue(0), false, true));
        ability.addEffect(new GainAbilitySourceEffect(new SuspendAbility(3, null, this), Duration.OneUse, true));
        this.addAbility(ability);
    }

    public Epochrasite(final Epochrasite card) {
View Full Code Here

Examples of mage.abilities.common.DrawCardControllerTriggeredAbility.addEffect()

        this.subtype.add("Wizard");
        this.subtype.add("Equipment");

        // Equipped creature has "Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn" and "{4}: Draw a card."
        Ability gainedAbility = new DrawCardControllerTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn), false);
        gainedAbility.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
        Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
        effect.setText("Equipped creature has \"Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn\"");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new GainAbilityAttachedEffect(
                new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(4)), AttachmentType.EQUIPMENT);
View Full Code Here

Examples of mage.abilities.common.EntersBattlefieldAllTriggeredAbility.addEffect()

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

        // Whenever another creature enters the battlefield under your control, that creature gets +2/+0 and gains haste until end of turn.
        Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 0, Duration.EndOfTurn), filter, false, true, rule, true);
        ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        this.addAbility(ability);
       
    }

    public OgreBattledriver(final OgreBattledriver card) {
View Full Code Here

Examples of mage.abilities.common.EntersBattlefieldControlledTriggeredAbility.addEffect()

        Effect effect = new BoostTargetEffect(2,0, Duration.EndOfTurn);
        effect.setText("it gets +2/+0");
        Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false, true, null);
        effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and gains haste until end of turn");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

    public InTheWebOfWar(final InTheWebOfWar card) {
        super(card);
View Full Code Here

Examples of mage.abilities.common.EntersBattlefieldTriggeredAbility.addEffect()

        // Kicker {R} (You may pay an additional {R} as you cast this spell.)
        this.addAbility(new KickerAbility("{R}"));

        // When Goblin Bushwhacker enters the battlefield, if it was kicked, creatures you control get +1/+0 and gain haste until end of turn.
        EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn), false);
        ability.addEffect(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
        this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.getInstance(), "When {this} enters the battlefield, if it was kicked, creatures you control get +1/+0 and gain haste until end of turn."));
    }

    public GoblinBushwhacker(final GoblinBushwhacker card) {
        super(card);
View Full Code Here

Examples of mage.abilities.common.EntersBattlefieldTriggeredAbility.addEffect()

        this.toughness = new MageInt(2);

        // When Kor Hookmaster enters the battlefield, tap target creature an opponent controls.
        // That creature doesn't untap during its controller's next untap step.
        EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
        ability.addEffect(new SkipNextUntapTargetEffect());
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
    }

    public KorHookmaster(final KorHookmaster card) {
View Full Code Here

Examples of mage.abilities.common.EntersBattlefieldTriggeredAbility.addEffect()

        // Flying
        this.addAbility(FlyingAbility.getInstance());

        // When Sphinx of Lost Truths enters the battlefield, draw three cards. Then if it wasn't kicked, discard three cards.
        Ability ability = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(3));
        ability.addEffect(new ConditionalOneShotEffect(new DiscardControllerEffect(3), new InvertCondition(KickedCondition.getInstance()),
                "Then if it wasn't kicked, discard three cards"));
        this.addAbility(ability);
    }

    public SphinxOfLostTruths(final SphinxOfLostTruths card) {
View Full Code Here

Examples of mage.abilities.common.LandfallAbility.addEffect()

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

        LandfallAbility ability = new LandfallAbility(new BoostSourceEffect(4, 4, Duration.EndOfTurn), false);
        ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
        this.addAbility(ability);
    }

    public BalothWoodcrasher(final BalothWoodcrasher card) {
        super(card);
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.