Package mage.abilities.effects

Examples of mage.abilities.effects.Effect


        this.color.setGreen(true);

        // Strive - Consign to Dust costs 2G more to cast for each target beyond the first.
        this.addAbility(new StriveAbility("{2}{G}"));
        // Destroy any number of target artifacts and/or enchantments.
        Effect effect = new DestroyTargetEffect();
        effect.setText("Destroy any number of target artifacts and/or enchantments");
        Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, false);
        this.getSpellAbility().addTarget(target);
        this.getSpellAbility().addEffect(effect);
    }
View Full Code Here


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

        // Whenever a creature you control with toughness 4 or greater dies, each opponent loses 2 life and you gain 2 life.
        Ability ability = new DiesCreatureTriggeredAbility(new LoseLifeOpponentsEffect(2), false, toughnessFilter);
        Effect effect = new GainLifeEffect(2);
        effect.setText("and you gain 2 life");
        ability.addEffect(effect);
        this.addAbility(ability);
       
        // {2}{B}, Sacrifice another creature: Put a +1/+1 counter on Kheru Bloodsucker.
        ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl<>("{2}{B}"));
View Full Code Here

        // Strive - Kiora's Dismissal costs U more to cast for each target beyond the first.
        this.addAbility(new StriveAbility("{U}"));
        // Return any number of target enchantments to their owners' hands.
        this.getSpellAbility().addTarget(new TargetPermanent(0, Integer.MAX_VALUE, new FilterEnchantmentPermanent(), false));
        Effect effect = new ReturnToHandTargetEffect();
        effect.setText("Return any number of target enchantments to their owners' hands");
        this.getSpellAbility().addEffect(effect);
    }
View Full Code Here

        this.expansionSetCode = "KTK";

        this.color.setRed(true);

        // Target creature you control gets +1/+0 until end of turn. It fights target creature you don't control.
        Effect effect = new BoostTargetEffect(1,0,Duration.EndOfTurn);
        effect.setApplyEffectsAfter();
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
       
        effect = new FightTargetsEffect();
        effect.setText("It fights target creature you don't control");
        this.getSpellAbility().addEffect(effect);       
        Target target = new TargetCreaturePermanent(filter);
        this.getSpellAbility().addTarget(target);

    }
View Full Code Here

        this.toughness = new MageInt(2);

        // Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Sensation Gorger, you may reveal it.
        // If you do, each player discards his or her hand, then draws four cards.
        KinshipAbility ability = new KinshipAbility(new DiscardHandAllEffect());
        Effect effect = new DrawCardAllEffect(4);
        effect.setText(", then draws four cards");
        ability.addKinshipEffect(effect);
        this.addAbility(ability);
    }
View Full Code Here

        // Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature or player" and "Whenever a creature dies, untap this creature."
        Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(2));
        gainedAbility.addCost(new TapSourceCost());
        gainedAbility.addTarget(new TargetCreatureOrPlayer());
        Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT);
        effect.setText("Equipped creature has \"{2}, {T}: This creature deals 1 damage to target creature or player\"");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new GainAbilityAttachedEffect(new DiesCreatureTriggeredAbility(new UntapSourceEffect(),false), AttachmentType.EQUIPMENT);
        effect.setText("and \"Whenever a creature dies, untap this creature.\"");
        ability.addEffect(effect);
        this.addAbility(ability);
        // Whenever a Shaman creature enters the battlefield, you may attach Thornbite Staff to it.
        this.addAbility(new EntersBattlefieldAllTriggeredAbility(
                Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"),
View Full Code Here

        this.expansionSetCode = "TMP";

        this.color.setRed(true);

        // Kindle deals X damage to target creature or player, where X is 2 plus the number of cards named Kindle in all graveyards.
        Effect effect = new DamageTargetEffect(new KindleCardsInAllGraveyardsCount(filter));
        effect.setText("{this} deals X damage to target creature or player, where X is 2 plus the number of cards named Kindle in all graveyards");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    }
View Full Code Here

        this.expansionSetCode = "MRD";
        this.subtype.add("Equipment");

        // Equipped creature has haste and shroud.
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT));
        Effect effect = new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.EQUIPMENT);
        effect.setText("and shroud");
        ability.addEffect(effect);
        this.addAbility(ability);
        // Equip {0}
        this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(0)));
    }
View Full Code Here

        this.expansionSetCode = "M14";

        this.color.setGreen(true);

        // Whenever Oath of the Ancient Wood or another enchantment enters the battlefield under your control, you may put a +1/+1 counter on target creature.
        Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
        Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, effect, filter, true, false, null, true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "M14";

        this.color.setBlack(true);

        // Choose target creature card in a graveyard that was put there from the battlefield this turn. Put that card onto the battlefield under your control.
        Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
        effect.setText("Choose target creature card in a graveyard that was put there from the battlefield this turn. Put that card onto the battlefield under your control");
        this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
        this.getSpellAbility().addTarget(new TargetCardInGraveyard(new FilterCreatureCard(textFilter)));
        this.addWatcher(new CardsPutIntoGraveyardWatcher());
    }
View Full Code Here

TOP

Related Classes of mage.abilities.effects.Effect

Copyright © 2018 www.massapicom. 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.