Package mage.abilities.common

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


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

        // At the beginning of your upkeep, you may sacrifice Blood Speaker. If you do, search your library for a Demon card, reveal that card, and put it into your hand. Then shuffle your library.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, true);
        ability.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true, true, "If you do, search your library for "));
        this.addAbility(ability);

        // Whenever a Demon enters the battlefield under your control, return Blood Speaker from your graveyard to your hand.
        this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter, false));
    }
View Full Code Here


        this.addAbility(FlyingAbility.getInstance());
        // Trample
        this.addAbility(TrampleAbility.getInstance());
        // At the beginning of your upkeep, sacrifice a non-Zombie creature, then put a 2/2 black Zombie creature token onto the battlefield.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(filter, 1, ""), TargetController.YOU, false);
        ability.addEffect(new CreateTokenEffect(new ZombieToken("ALA")));
        this.addAbility(ability);
    }

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

        this.subtype.add("Faerie");
        this.color.setBlack(true);

        // At the beginning of your upkeep, you lose 1 life and put a 1/1 black Faerie Rogue creature token with flying onto the battlefield.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(1), TargetController.YOU, false);
        ability.addEffect(new CreateTokenEffect(new FaerieToken(), 1));
        this.addAbility(ability);
    }

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

        // At the beginning of your upkeep, put a colorless artifact token named Land Mine onto the battlefield
        // with "{R}, Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying."
        // Then flip a coin.  If you lose the flip, Goblin Kaboomist deals 2 damage to itself.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new LandMineToken()), TargetController.YOU, false);
        ability.addEffect(new GoblinKaboomistFlipCoinEffect());
        this.addAbility(ability);
    }

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

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

        // At the beginning of your upkeep, you draw X cards and you lose X life, where X is the number of Zombies you control.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false);
        ability.addEffect(new LoseLifeSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)));
        this.addAbility(ability);
    }

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

        this.color.setBlack(true);

        // At the beginning of your upkeep, if you have no cards in hand, sacrifice Brink of Madness and target opponent discards his or her hand.
        TriggeredAbility ability  = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false);
        ability.addEffect(new BrinkOfMadnessEffect());
        ability.addTarget(new TargetOpponent());
        CardsInHandCondition contition = new CardsInHandCondition(CardsInHandCondition.CountType.EQUAL_TO, 0);
        this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have no cards in hand, sacrifice {this} and target opponent discards his or her hand."));
       
    }
View Full Code Here

        Effect effect = new LoseLifeTargetEffect(1);
        effect.setText("that player loses 1 life");
        Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.ANY, false, true);
        effect = new DiscardTargetEffect(1);
        effect.setText("and discards a card");
        ability.addEffect(effect);
        this.addAbility(ability);
       
        // Hellbent - Skip your upkeep step if you have no cards in hand.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousRuleModifyingEffect(
                new GibberingDescentSkipUpkeepEffect(),
View Full Code Here

        // At the beginning of each upkeep, you draw a card and you lose 1 life.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false);
        Effect effect = new LoseLifeSourceControllerEffect(1);
        effect.setText("and you lose 1 life");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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

        effect.setText("untap target creature");
        Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true);
       
        effect = new GainControlTargetEffect(Duration.EndOfTurn);
        effect.setText("and gain control of it until end of turn.");
        ability.addEffect(effect);
       
        effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("That creature gains haste until end of turn.");
        ability.addEffect(effect);
       
View Full Code Here

        effect.setText("and gain control of it until end of turn.");
        ability.addEffect(effect);
       
        effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("That creature gains haste until end of turn.");
        ability.addEffect(effect);
       
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
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.