Examples of addEffect()


Examples of mage.abilities.common.SimpleStaticAbility.addEffect()

        this.getSpellAbility().addTarget(auraTarget);
        this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
        this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
        // Enchanted creature gets +1/+2 and has flying.
        SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield));
        ability.addEffect(new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA));
        this.addAbility(ability);
    }

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

Examples of mage.abilities.common.SimpleStaticAbility.addEffect()

                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

Examples of mage.abilities.common.SimpleStaticAbility.addEffect()

                    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

Examples of mage.abilities.common.SimpleStaticAbility.addEffect()

                    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

Examples of mage.abilities.common.SpellCastControllerTriggeredAbility.addEffect()

        // Defender
        this.addAbility(DefenderAbility.getInstance());

        // Whenever you cast an instant or sorcery spell, Nivix Cyclops gets +3/+0 until end of turn and can attack this turn as though it didn't have defender.
        Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn), filter, false);
        ability.addEffect(new AsThoughNoDefenderEffect());
        this.addAbility(ability);

    }

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

Examples of mage.abilities.common.TurnedFaceUpSourceTriggeredAbility.addEffect()

       
        // When Jeering Instigator is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap it. That creature gains haste until end of turn.
        Ability ability = new TurnedFaceUpSourceTriggeredAbility(new ConditionalContinousEffect(new GainControlTargetEffect(Duration.EndOfTurn), MyTurnCondition.getInstance(), "if it's your turn, gain control of another target creature until end of turn"));
        Effect effect = new UntapTargetEffect();
        effect.setText("Untap that creature");
        ability.addEffect(effect);
        effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("It gains haste until end of turn");
        ability.addEffect(effect);
        ability.addTarget(new TargetCreaturePermanent(filter));
        this.addAbility(ability);
View Full Code Here

Examples of mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility.addEffect()

                            new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, "return that card to the battlefield under its owner's control with a +1/+1 counter on it"));
                    delayedAbility.setSourceId(source.getSourceId());
                    delayedAbility.setControllerId(source.getControllerId());
                    AddCountersTargetEffect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
                    effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
                    delayedAbility.addEffect(effect);
                    game.addDelayedTriggeredAbility(delayedAbility);
                }
                return true;
            }
        }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalActivatedAbility.addEffect()

                Zone.BATTLEFIELD,
                new BoostSourceEffect(3, 3, Duration.EndOfTurn),
                new ManaCostsImpl<>("{0}"),
                new ChronatogTotemCondition(),
                "{0}: {this} gets +3/+3 until end of turn. You skip your next turn. Activate this ability only once each turn and only if {this} is a creature");
        ability.addEffect(new SkipNextTurnSourceEffect());
        this.addAbility(ability);
        this.addWatcher(new ActivatedAbilityUsedThisTurnWatcher());
    }

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

Examples of mage.abilities.decorator.ConditionalGainActivatedAbility.addEffect()

        Ability thresholdAbility = new ConditionalGainActivatedAbility(Zone.BATTLEFIELD,
            new DrawCardTargetEffect(3),
            new ManaCostsImpl("{U}"),
            new CardsInControllerGraveCondition(7),
            "<i>Threshold</i> - {U}, {T}, Sacrifice {this}: Target player draws three cards, then discards three cards. Activate this ability only if seven or more cards are in your graveyard.");
        thresholdAbility.addEffect(new DiscardTargetEffect(3));
        thresholdAbility.addCost(new TapSourceCost());
        thresholdAbility.addCost(new SacrificeSourceCost());
        thresholdAbility.addTarget(new TargetPlayer());
        this.addAbility(thresholdAbility);
    }
View Full Code Here

Examples of mage.abilities.decorator.ConditionalTriggeredAbility.addEffect()

        // under your control and attach Animate Dead to it. When Animate Dead leaves the battlefield, that creature's controller sacrifices it.
        Ability ability = new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new AnimateDeadReAttachEffect(), false),
                SourceOnBattelfieldCondition.getInstance(),
                "When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it.");
        ability.addEffect(new AnimateDeadChangeAbilityEffect());
        this.addAbility(ability);
        this.addAbility(new LeavesBattlefieldTriggeredAbility(new AnimateDeadLeavesBattlefieldTriggeredEffect(), false));       
       
        // Enchanted creature gets -1/-0.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-1, 0, Duration.WhileOnBattlefield)));
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.