Examples of addEffect()


Examples of mage.abilities.LoyaltyAbility.addEffect()

        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false));

        // +1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to target creature or player.
        LoyaltyAbility ability = new LoyaltyAbility(new ChandraAblazeEffect1(), 1);
        ability.addEffect(new ChandraAblazeEffect2());
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
        // -2: Each player discards his or her hand, then draws three cards.
        ability = new LoyaltyAbility(new DiscardHandAllEffect(), -2);
        ability.addEffect(new ChandraAblazeEffect4());
View Full Code Here

Examples of mage.abilities.LoyaltyAbility.addEffect()

        ability.addEffect(new ChandraAblazeEffect2());
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
        // -2: Each player discards his or her hand, then draws three cards.
        ability = new LoyaltyAbility(new DiscardHandAllEffect(), -2);
        ability.addEffect(new ChandraAblazeEffect4());
        this.addAbility(ability);
        // -7: Cast any number of red instant and/or sorcery cards from your graveyard without paying their mana costs.
        ability = new LoyaltyAbility(new ChandraAblazeEffect5(), -7);
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.abilities.LoyaltyAbility.addEffect()

        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));

        // +2: Sorin Markov deals 2 damage to target creature or player and you gain 2 life.
        LoyaltyAbility ability1 = new LoyaltyAbility(new DamageTargetEffect(2), 2);
        ability1.addEffect(new GainLifeEffect(2));
        ability1.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability1);

        // -3: Target opponent's life total becomes 10.
        LoyaltyAbility ability2 = new LoyaltyAbility(new SorinMarkovEffect(), -3);
View Full Code Here

Examples of mage.abilities.TriggeredAbility.addEffect()

        this.addAbility(TrampleAbility.getInstance());
        // Tribute 1
        this.addAbility(new TributeAbility(1));
        // When Fanatic of Xenagos enters the battlefield, if its tribute wasn't paid, it gets +1/+1 and gains haste until end of turn.
        TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn));
        ability.addEffect( new GainAbilitySourceEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn)));
        this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.getInstance(),
                "When {this} enters the battlefield, if its tribute wasn't paid, it gets +1/+1 and gains haste until end of turn."));
    }

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

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

        this.color.setRed(true);

        // {3}{R}{R}: Untap all creatures you control. After this main phase, there is an additional combat phase followed by an additional main phase. Activate this ability only any time you could cast a sorcery.
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), "Untap all creatures you control"), new ManaCostsImpl<>("{3}{R}{R}"));
        ability.addEffect(new AdditionalCombatPhaseEffect());
        this.addAbility(ability);
    }

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

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

        // {1}{R}: Forgestoker Dragon deals 1 damage to target creature. That creature can't block this combat. Activate this ability only if Forgestoker Dragon is attacking.
        Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}"), new SourceAttackingCondition());
        ability.addTarget(new TargetCreaturePermanent());
        Effect effect = new CantBlockTargetEffect(Duration.EndOfCombat);
        effect.setText("That creature can't block this combat");
        ability.addEffect(effect);
        this.addAbility(ability);

    }

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

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

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

        // Whenever Turntimber Ranger or another Ally enters the battlefield under your control, you may put a 2/2 green Wolf creature token onto the battlefield. If you do, put a +1/+1 counter on Turntimber Ranger.
        Ability ability = new AllyEntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WolfToken()), true);
        ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
        this.addAbility(ability);
    }

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

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

        this.color.setWhite(true);

        // As Runed Halo enters the battlefield, name a card.
        Ability ability = new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL));
        // You have protection from the chosen name.
        ability.addEffect(new RunedHaloSetProtectionEffect());
        this.addAbility(ability);
    }

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

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

        Effect effect = new BoostTargetEffect(5,5,Duration.EndOfTurn);
        effect.setText("it gets +5/+5");
        Ability ability = new AttackedByCreatureTriggeredAbility(Zone.COMMAND, effect, false, true);
        effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn,
                "and gains trample until end of turn");
        ability.addEffect(effect);
        this.getAbilities().add(ability);
    }
}
View Full Code Here

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

        this.subtype.add("Equipment");

        // Whenever equipped creature attacks, defending player reveals cards from the top of his or her library until he or she reveals a land card.
        // The creature gets +1/+0 until end of turn for each card revealed this way. That player puts the revealed cards into his or her graveyard.
        Ability ability = new AttacksAttachedTriggeredAbility(new TrepanationBladeDiscardEffect());
        ability.addEffect(new TrepanationBladeBoostEffect());
        this.addAbility(ability);
        // Equip {2}
        this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2)));
    }
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.