Package mage.abilities

Examples of mage.abilities.Ability.addEffect()


        this.color.setWhite(true);

        // Creatures you control get +0/+1 for each Gate you control and have vigilance.
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
                new BoostControlledEffect(new StaticValue(0),new PermanentsOnBattlefieldCount(filter), Duration.WhileOnBattlefield));
        ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures")));
        this.addAbility(ability);
    }

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


        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

        super(ownerId, 214, "Conjurer's Closet", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{5}");
        this.expansionSetCode = "AVR";

        // At the beginning of your end step, you may exile target creature you control, then return that card to the battlefield under your control.
        Ability ability = new BeginningOfYourEndStepTriggeredAbility(new ExileTargetForSourceEffect("Conjurer's Closet Exile"), true);
        ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect());
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);
    }

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

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

        this.addAbility(FlyingAbility.getInstance());
        Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeSourceEffect(), true);
        ability.addEffect(new DrawCardSourceControllerEffect(3));
        this.addAbility(ability);
    }

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

        this.power = new MageInt(4);
        this.toughness = new MageInt(6);

        // When Auriok Survivors enters the battlefield, you may return target Equipment card from your graveyard to the battlefield. If you do, you may attach it to Auriok Survivors.
        Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), true);
        ability.addEffect(new AuriokSurvivorsEffect());
        ability.addTarget(new TargetCardInYourGraveyard(filter));
        this.addAbility(ability);
    }

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

        // Flying
        this.addAbility(FlyingAbility.getInstance());
        // {2}{U}{R}: Scry 1, then reveal the top card of your library. Stormchaser Chimera gets +X/+0 until end of turn, where X is that card's converted mana cost.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1), new ManaCostsImpl("{2}{U}{R}"));
        ability.addEffect(new StormchaserChimeraEffect());
        this.addAbility(ability);
    }

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

        ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
                new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield),
                condition, "Enchanted creature has double strike as long as it's an enchantment"));
        ReplacementEffect effect = new PreventAllDamageByAttachedEffect(Duration.WhileOnBattlefield, "enchanted creature", false);
        effect.setText("Otherwise, prevent all damage that would be dealt by enchanted creature");
        ability.addEffect(new ConditionalReplacementEffect(effect, new InvertCondition(condition)));
        this.addAbility(ability);
    }

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

        // Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. Untap those creatures.
        Effect effect = new BoostControlledEffect(1,1,Duration.EndOfTurn);
        Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false);
        effect = new UntapAllControllerEffect(new FilterCreaturePermanent(),"Untap those creatures");
        ability.addEffect(effect);
        this.addAbility(ability);

        // Whenever you cast a noncreature spell, you may draw a card. If you do, discard a card.
        effect = new DrawDiscardControllerEffect(1,1);
        effect.setText("you may draw a card. If you do, discard a card");
View Full Code Here

        this.addAbility(DefenderAbility.getInstance());
        // {1}{U}: Put a hatchling counter on Ludevic's Test Subject. Then if there are five or more hatchling counters on it, remove all of them and transform it.
        this.addAbility(new TransformAbility());
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.HATCHLING.createInstance()), new ManaCostsImpl("{1}{U}"));
        ability.addEffect(new LudevicsTestSubjectEffect());
        this.addAbility(ability);
    }

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

        Effect effect = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("creatures you control gain first strike");
        Ability ability = new AttacksTriggeredAbility(effect, false);
        effect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and deathtouch until end of turn");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

    public AnkleShanker(final AnkleShanker 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.