Package mage.abilities

Examples of mage.abilities.Ability.addEffect()


        Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn);
        effect.setText("{this} gets +2/+0");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{3}{R}"));
        effect = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and gains trample until end of turn");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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


        Effect effect = new BoostEnchantedEffect(1,1,Duration.WhileOnBattlefield);
        effect.setText("Enchanted creature gets +1/+1");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA);
        effect.setText("and has flying");
        ability.addEffect(effect);
        this.addAbility(ability);       
    }

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

       
        // When Siege Rhino enters the battlefield, each opponent loses 3 life and you gain 3 life.
        Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(3));
        Effect effect = new GainLifeEffect(3);
        effect.setText("and you gain 3 life");
        ability.addEffect(effect);       
        this.addAbility(ability);
    }

    public SiegeRhino(final SiegeRhino 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

        Effect effect1 = new BoostControlledEffect(2, 2, Duration.EndOfTurn);
        effect1.setText("Creatures you control get +2/+2");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect1, new ManaCostsImpl("{4}{W}{W}"));
        Effect effect2 = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect2.setText("and gain first strike");
        ability.addEffect(effect2);
        Effect effect3 = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn);
        effect3.setText("and lifelink until end of turn");
        ability.addEffect(effect3);
        this.addAbility(ability);
View Full Code Here

        Effect effect2 = new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect2.setText("and gain first strike");
        ability.addEffect(effect2);
        Effect effect3 = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn);
        effect3.setText("and lifelink until end of turn");
        ability.addEffect(effect3);
        this.addAbility(ability);

        // {4}{W}{W}, Exile Soul of Theros from your graveyard: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn.
        ability = new SimpleActivatedAbility(Zone.GRAVEYARD, effect1, new ManaCostsImpl("{4}{W}{W}"));
        ability.addCost(new ExileSourceFromGraveCost());
View Full Code Here

        this.addAbility(ability);

        // {4}{W}{W}, Exile Soul of Theros from your graveyard: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn.
        ability = new SimpleActivatedAbility(Zone.GRAVEYARD, effect1, new ManaCostsImpl("{4}{W}{W}"));
        ability.addCost(new ExileSourceFromGraveCost());
        ability.addEffect(effect2);
        ability.addEffect(effect3);
        this.addAbility(ability);
    }

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

        // {4}{W}{W}, Exile Soul of Theros from your graveyard: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn.
        ability = new SimpleActivatedAbility(Zone.GRAVEYARD, effect1, new ManaCostsImpl("{4}{W}{W}"));
        ability.addCost(new ExileSourceFromGraveCost());
        ability.addEffect(effect2);
        ability.addEffect(effect3);
        this.addAbility(ability);
    }

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

        Effect effect = new BoostEnchantedEffect(4,4,Duration.WhileOnBattlefield);
        effect.setText("Enchanted creature gets +4/+4");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new GainAbilityAttachedEffect(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect()), AttachmentType.AURA, Duration.WhileOnBattlefield);
        effect.setText("and has \"When this creature becomes the target of a spell or ability, sacrifice it.\"");
        ability.addEffect(effect);
        this.addAbility(ability);
    }

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

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

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