Package mage.abilities.decorator

Examples of mage.abilities.decorator.ConditionalTriggeredAbility.addTarget()


        // When Gatekeeper of Malakir enters the battlefield, if it was kicked, target player sacrifices a creature.
        EntersBattlefieldTriggeredAbility ability =
                new EntersBattlefieldTriggeredAbility(new SacrificeEffect(filter, 1, "target player"));
        Ability conditionalAbility = new ConditionalTriggeredAbility(ability, KickedCondition.getInstance(), "When {this} enters the battlefield, if it was kicked, target player sacrifices a creature.");
        conditionalAbility.addTarget(new TargetPlayer());
        this.addAbility(conditionalAbility);
    }

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


        this.toughness = new MageInt(4);

        // Morbid - When Morkut Banshee enters the battlefield, if a creature died this turn, target creature gets -4/-4 until end of turn.
        TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-4, -4, Duration.EndOfTurn));
        TriggeredAbility ability = new ConditionalTriggeredAbility(triggeredAbility, MorbidCondition.getInstance(), staticText);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }

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

        this.toughness = new MageInt(2);

        // <i>Raid</i> - When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.", false);
        ability.addTarget(new TargetCardInYourGraveyard(filter));
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());

    }
View Full Code Here

                new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
                        new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
                        TargetController.ANY, false),
                FeastOnTheFallenCondition.getInstance(),
                "At the beginning of each upkeep, if an opponent lost life last turn, put a +1/+1 counter on target creature you control.");
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);
    }

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

        // When Bloodhusk Ritualist enters the battlefield, target opponent discards a card for each time it was kicked.
        Ability ability = new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(new MultikickerCount())),
                KickedCondition.getInstance(),
                "");
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
    }

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

        this.toughness = new MageInt(3);

        // <em>Raid</em> - When Mardu Heart-Piercer enters the battlefield, if you attacked with a creature this turn, Mardu Heart-Piercer deals 2 damage to target creature or player.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to target creature or player.", false);
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());
    }

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

        this.addAbility(new EntersBattlefieldTappedAbility());
       
        // <em>Raid</em> - When Mardu Skullhunter enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, target opponent discards a card.", false);       
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());
    }

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

        this.toughness = new MageInt(3);

        // When Rushing-Tide Zubera dies, if 4 or more damage was dealt to it this turn, draw three cards.
        Ability ability = new ConditionalTriggeredAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(3)),new RushingTideZuberaCondition(),
                "When {this} dies, if 4 or more damage was dealt to it this turn, draw three cards.");
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
    }

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

        // When Necromancy leaves the battlefield, that creature's controller sacrifices it.
        Ability ability = new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new NecromancyReAttachEffect(), false),
                SourceOnBattelfieldCondition.getInstance(),
                "When {this} enters the battlefield, if it's on the battlefield,  it becomes an Aura with \"enchant creature put onto the battlefield with {this}.\" Put target creature card from a graveyard onto the battlefield under your control and attach {this} to it.");
        ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from a graveyard")));
        this.addAbility(ability);
        this.addAbility(new LeavesBattlefieldTriggeredAbility(new NecromancyLeavesBattlefieldTriggeredEffect(), false));    
    }

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

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

        // When Duergar Hedge-Mage enters the battlefield, if you control two or more Mountains, you may destroy target artifact.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 1), rule1);
        ability.addTarget(new TargetArtifactPermanent());
        this.addAbility(ability);

        // When Duergar Hedge-Mage enters the battlefield, if you control two or more Plains, you may destroy target enchantment.
        Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter2, CountType.MORE_THAN, 1), rule2);
        ability2.addTarget(new TargetPermanent(filter3));
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.