Package mage.abilities

Examples of mage.abilities.Ability.addEffect()


        this.addAbility(new EntersBattlefieldTappedAbility());
        // {tap}: Add {1} to your mana pool.
        this.addAbility(new ColorlessManaAbility());
        // {tap}: Add {W} or {B} to your mana pool. Salt Flats deals 1 damage to you.
        Ability ability = new WhiteManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
        ability = new BlackManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
    }
View Full Code Here


        // {tap}: Add {W} or {B} to your mana pool. Salt Flats deals 1 damage to you.
        Ability ability = new WhiteManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
        ability = new BlackManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
    }

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

        this.subtype.add("Warrior");
        this.color.setRed(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
        this.addAbility(ability);
    }

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

        this.addAbility(new EntersBattlefieldTappedAbility());
        // {tap}: Add {1} to your mana pool.
        this.addAbility(new ColorlessManaAbility());
        // {tap}: Add {G} or {U} to your mana pool. Skyshroud Forest deals 1 damage to you.
        Ability ability = new GreenManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
        ability = new BlueManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
    }
View Full Code Here

        // {tap}: Add {G} or {U} to your mana pool. Skyshroud Forest deals 1 damage to you.
        Ability ability = new GreenManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
        ability = new BlueManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
    }

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

        this.subtype.add("Wizard");
        this.subtype.add("Equipment");

        // Equipped creature has "Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn" and "{4}: Draw a card."
        Ability gainedAbility = new DrawCardControllerTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn), false);
        gainedAbility.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
        Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
        effect.setText("Equipped creature has \"Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn\"");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new GainAbilityAttachedEffect(
                new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(4)), AttachmentType.EQUIPMENT);
View Full Code Here

        effect.setText("Equipped creature has \"Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn\"");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new GainAbilityAttachedEffect(
                new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(4)), AttachmentType.EQUIPMENT);
        effect.setText("and \"{4}: Draw a card.\"");
        ability.addEffect(effect);
        this.addAbility(ability);

        // Whenever a Wizard creature enters the battlefield, you may attach Diviner's Wand to it.
        this.addAbility(new EntersBattlefieldAllTriggeredAbility(
                Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"),
View Full Code Here

        Effect effect = new BoostEnchantedEffect(-2,0, Duration.WhileOnBattlefield);
        effect.setText("Enchanted creature gets -2/-0");
        ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new CantBlockAttachedEffect(AttachmentType.AURA);
        effect.setText("and can't block");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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

        // Inspired - Whenever King Macar, the Gold-Cursed becomes untapped, you may exile target creature. If you do, put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool."
        Ability ability = new InspiredAbility(new ExileTargetEffect(), true);
        ability.addTarget(new TargetCreaturePermanent());
        Effect effect = new CreateTokenEffect(new GoldToken());
        effect.setText("If you do, put a colorless artifact token named Gold onto the battlefield. It has \"Sacrifice this artifact: Add one mana of any color to your mana pool.\"");
        ability.addEffect(effect);       
        this.addAbility(ability);               
    }

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

        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

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.