Package mage.abilities

Examples of mage.abilities.Ability.addEffect()


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

        // Whenever Turntimber Ranger or another Ally enters the battlefield under your control, you may put a 2/2 green Wolf creature token onto the battlefield. If you do, put a +1/+1 counter on Turntimber Ranger.
        Ability ability = new AllyEntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WolfToken()), true);
        ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
        this.addAbility(ability);
    }

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


                if (player.getSideboard().size() > 0){
                    Card commander =  getCard((UUID)player.getSideboard().toArray()[0]);
                    if (commander != null) {
                        player.setCommanderId(commander.getId());
                        commander.moveToZone(Zone.COMMAND, null, this, true);
                        ability.addEffect(new CommanderReplacementEffect(commander.getId(), alsoLibrary));
                        ability.addEffect(new CommanderCostModification(commander.getId()));
                        ability.addEffect(new CommanderManaReplacementEffect(player.getId(), commander.getSpellAbility().getManaCosts().getMana()));
                        getState().setValue(commander.getId() + "_castCount", 0);
                        CommanderCombatDamageWatcher watcher = new CommanderCombatDamageWatcher(commander.getId());
                        getState().getWatchers().add(watcher);
View Full Code Here

                    Card commander =  getCard((UUID)player.getSideboard().toArray()[0]);
                    if (commander != null) {
                        player.setCommanderId(commander.getId());
                        commander.moveToZone(Zone.COMMAND, null, this, true);
                        ability.addEffect(new CommanderReplacementEffect(commander.getId(), alsoLibrary));
                        ability.addEffect(new CommanderCostModification(commander.getId()));
                        ability.addEffect(new CommanderManaReplacementEffect(player.getId(), commander.getSpellAbility().getManaCosts().getMana()));
                        getState().setValue(commander.getId() + "_castCount", 0);
                        CommanderCombatDamageWatcher watcher = new CommanderCombatDamageWatcher(commander.getId());
                        getState().getWatchers().add(watcher);
                        this.commanderCombatWatcher.add(watcher);
View Full Code Here

                    if (commander != null) {
                        player.setCommanderId(commander.getId());
                        commander.moveToZone(Zone.COMMAND, null, this, true);
                        ability.addEffect(new CommanderReplacementEffect(commander.getId(), alsoLibrary));
                        ability.addEffect(new CommanderCostModification(commander.getId()));
                        ability.addEffect(new CommanderManaReplacementEffect(player.getId(), commander.getSpellAbility().getManaCosts().getMana()));
                        getState().setValue(commander.getId() + "_castCount", 0);
                        CommanderCombatDamageWatcher watcher = new CommanderCombatDamageWatcher(commander.getId());
                        getState().getWatchers().add(watcher);
                        this.commanderCombatWatcher.add(watcher);
                        watcher.addCardInfoToCommander(this);
View Full Code Here

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

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

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

        this.expansionSetCode = "4ED";

        // {2}, {tap}: Untap target attacking creature you control. Prevent all combat damage that would be dealt to and dealt by that creature this turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new PreventCombatDamageToSourceEffect(Duration.EndOfTurn));
        ability.addEffect(new PreventCombatDamageBySourceEffect(Duration.EndOfTurn));
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        // {2}, {tap}: Untap target attacking creature you control. Prevent all combat damage that would be dealt to and dealt by that creature this turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new PreventCombatDamageToSourceEffect(Duration.EndOfTurn));
        ability.addEffect(new PreventCombatDamageBySourceEffect(Duration.EndOfTurn));
        Target target = new TargetCreaturePermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

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

        // {tap}: Add {B} or {G} to your mana pool. Pine Barrens deals 1 damage to you.
        Ability ability = new BlackManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
        ability = new GreenManaAbility();
        ability.addEffect(new DamageControllerEffect(1));
        this.addAbility(ability);
    }

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