Package mage.abilities.effects

Examples of mage.abilities.effects.Effect


        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);
        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(
View Full Code Here


        // Champion a Treefolk or Warrior
        this.addAbility(new ChampionAbility(this, new String[]{"Treefolk", "Warrior"}));
       
        // Whenever a creature you control becomes blocked, it gets +0/+5 until end of turn.
        Effect effect = new BoostTargetEffect(0, 5, Duration.EndOfTurn);
        effect.setText("it gets +0/+5 until end of turn");
        this.addAbility(new BecomesBlockedAllTriggeredAbility(effect, false, filter, true));

    }
View Full Code Here

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

        // Sliver creatures you control have "This creature can't be blocked except by two or more creatures."
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByOneEffect(2, Duration.WhileOnBattlefield));
        Effect effect = new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter);
        effect.setText("Sliver creatures you control have \"This creature can't be blocked except by two or more creatures.\"");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(0);
        this.toughness = new MageInt(0);

        // Undergrowth Scavenger enters the battlefield with a number of +1/+1 counters on it equal to the number of creature cards in all graveyards.
        Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new CardsInAllGraveyardsCount(new FilterCreatureCard()), true);
        effect.setText("with a number of +1/+1 counters on it equal to the number of creature cards in all graveyards");
        this.addAbility(new EntersBattlefieldAbility(effect));       
    }
View Full Code Here

        // Tap X target creatures.
        this.getSpellAbility().addEffect(new TapTargetEffect("X target creatures"));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1, new FilterCreaturePermanent(), false));
       
        // <i>Ferocious</i> - If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps.
        Effect effect = new IcyBlastSkipNextUntapTargetEffect();
        effect.setText("<br/><br/><i>Ferocious</i> - If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps");
        this.getSpellAbility().addEffect(effect);
    }
View Full Code Here

        this.color.setGreen(true);

        // Put two +1/+1 counters on target creature and untap it
        this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)));
        Effect effect = new UntapTargetEffect();
        effect.setText("and untap it");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

        this.color.setGreen(true);

        // Target creature you control gets +1/+1 and gains hexproof until end of turn.
        this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
        Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn);
        effect.setText("Target creature you control gets +1/+1");
        this.getSpellAbility().addEffect(effect);
        effect = new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and gains hexproof until end of turn");
        this.getSpellAbility().addEffect(effect);
    }
View Full Code Here

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

        // Whenever an Aura becomes attached to Brood Keeper, put a 2/2 red Dragon creature token with flying onto the battlefield.
        // It has "{R}: This creature gets +1/+0 until end of turn."
        Effect effect = new CreateTokenEffect(new BroodKeeperDragonToken());
        effect.setText("put a 2/2 red Dragon creature token with flying onto the battlefield. It has \"{R}: This creature gets +1/+0 until end of turn.\"");
        this.addAbility(new AuraAttachedTriggeredAbility(effect, false));
    }
View Full Code Here

        this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WingmateRocToken())), RaidCondition.getInstance(),
                 "<i>Raid</i> -  When {this} enters the battlefield, if you attacked with a creature this turn, put a 3/4 white Bird creature token with flying onto the battlefield.", false));       
        this.addWatcher(new PlayerAttackedWatcher());

        // Whenever Wingmate Roc attacks, you gain 1 life for each attacking creature.
        Effect effect = new GainLifeEffect(new AttackingCreatureCount());
        effect.setText("you gain 1 life for each attacking creature");
        this.addAbility(new AttacksTriggeredAbility(effect, false));
    }
View Full Code Here

        this.toughness = new MageInt(3);

        // 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);               
    }
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.