Package mage.abilities

Examples of mage.abilities.Ability.addEffect()


        this.addAbility(HasteAbility.getInstance());
        //Battalion - Whenever Legion Loyalist and at least two other creatures attack,
        //creatures you control gain first strike and trample until end of turn and can't be blocked by tokens this turn.
        Ability ability = new BattalionAbility(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()));
        ability.addEffect(new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()));
        ability.addEffect(new CantBeBlockedByTokenEffect());
        this.addAbility(ability);
    }

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


        Effect effect = new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield);
        effect.setText("{this} and enchanted creature get +1/+1 for each creature you control");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield);
        effect.setText("and +1/+1 for each Aura you control");
        ability.addEffect(effect);
        this.addAbility(ability);
       
    }

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

        this.addAbility(DefenderAbility.getInstance());

        // {3}{B}, {T}: Target opponent loses 2 life and reveals a card at random from his or her hand.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2),new ManaCostsImpl("{3}{B}"));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new HiredTorturerEffect());
        ability.addTarget(new TargetOpponent());
        this.addAbility(ability);

    }
View Full Code Here

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

        // Battalion — Whenever Nav Squad Commandos and at least two other creatures attack, Nav Squad Commandos gets +1/+1 until end of turn. Untap it.
        Ability ability = new BattalionAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn));
        ability.addEffect(new UntapSourceEffect());
        this.addAbility(ability);
    }

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

        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());

        // {3}{W}: Prevent all combat damage that would be dealt to and dealt by Moonlight Geist this turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventCombatDamageToSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{3}{W}"));
        ability.addEffect(new PreventCombatDamageBySourceEffect(Duration.EndOfTurn));
        this.addAbility(ability);
    }

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

        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted creature gets +2/+2 and has protection from creatures.
        ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2,2, Duration.WhileOnBattlefield));
        ability.addEffect(new GainAbilityAttachedEffect(new ProtectionAbility(new FilterCreaturePermanent("creatures")), AttachmentType.AURA, Duration.WhileOnBattlefield));
        this.addAbility(ability);
    }

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

        // Deathtouch
        this.addAbility(DeathtouchAbility.getInstance());
        // Bloodrush - {G}, Discard Wasteland Viper: Target attacking creature gets +1/+2 and gains deathtouch until end of turn.
        Ability ability = new BloodrushAbility("{G}", new BoostTargetEffect(1, 2, Duration.EndOfTurn));
        ability.addEffect(new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn));
        this.addAbility(ability);
    }

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

        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
        this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());

        // Overload {1}{R}
        Ability ability = new OverloadAbility(this, new BoostAllEffect(1,0, Duration.EndOfTurn, filter, false), new ManaCostsImpl("{1}{R}"));
        ability.addEffect(new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter, false));
        this.addAbility(ability);
    }

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

        // {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

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.