Package mage.abilities.effects

Examples of mage.abilities.effects.Effect


        // Bestow {2}{W}{W}
        this.addAbility(new BestowAbility(this, "{2}{W}{W}"));
        // Eidolon of Countless Battles and enchanted creature get +1/+1 for each creature you control and +1/+1 for each Aura you control.       
        PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter, 1);
        Effect effect = new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield);
        effect.setText("{this} and enchanted creature get +1/+1 for each creature you control");
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        effect = new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield);
        effect.setText("and +1/+1 for each Aura you control");
        ability.addEffect(effect);
        this.addAbility(ability);
       
    }
View Full Code Here


        this.expansionSetCode = "9ED";

        this.color.setBlue(true);

        // {1}: Return target land you control to its owner's hand.
        Effect returnToHand = new ReturnToHandTargetEffect();
        Target targetLandYouControl = new TargetLandPermanent(landYouControl);
        Ability returnLandToHand = new SimpleActivatedAbility(Zone.BATTLEFIELD, returnToHand, new GenericManaCost(1));
        returnLandToHand.addTarget(targetLandYouControl);
        this.addAbility(returnLandToHand);
View Full Code Here

    @Override
    public boolean checkTrigger(GameEvent event, Game game) {
        Set<UUID> opponents = game.getOpponents(this.getControllerId());
        if (event.getType() == EventType.LOST_LIFE && opponents.contains(event.getPlayerId())) {
            Effect effect = this.getEffects().get(0);
            effect.setValue("targetPlayer", event.getPlayerId());
            effect.setValue("amount", event.getAmount());
            return true;
        }
        return false;
    }
View Full Code Here

        this.expansionSetCode = "BNG";

        this.color.setGreen(true);

        // Skyreaping deals damage to each creature with flying equal to your devotion to green.
        Effect effect = new DamageAllEffect(new DevotionCount(ColoredManaSymbol.G), filter);
        effect.setText("{this} deals damage to each creature with flying equal to your devotion to green <i>(Each {G} in the mana costs of permanents you control counts toward your devotion to green.)</i>");
        this.getSpellAbility().addEffect(effect);
    }
View Full Code Here

        this.toughness = new MageInt(5);

        // Indestructible
        this.addAbility(IndestructibleAbility.getInstance());
        // As long as your devotion to white and blue is less than seven, Ephara isn't a creature.
        Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.U), 7);
        effect.setText("As long as your devotion to white and blue is less than seven, Ephara isn't a creature");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
        // At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card.
        this.addAbility(new ConditionalTriggeredAbility(
                new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false),
                HadAnotherCreatureEnterTheBattlefieldCondition.getInstance(),
View Full Code Here

        this.color.setBlue(true);

        // Target creature gets +1/+0 until end of turn and is unblockable this turn.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0, Duration.EndOfTurn));
        Effect effect = new UnblockableTargetEffect();
        effect.setText("and is unblockable this turn");
        this.getSpellAbility().addEffect(effect);
        // Rebound
        this.addAbility(new ReboundAbility());
    }
View Full Code Here

        this.toughness = new MageInt(1);

        // Bestow {3}{B}
        this.addAbility(new BestowAbility(this, "{3}{B}"));
        // Whenever Spiteful Returned or enchanted creature attacks, defending player loses 2 life.
        Effect effect = new LoseLifeTargetEffect(2);
        effect.setText("defending player loses 2 life");
        this.addAbility(new SpitefulReturnedTriggeredAbility(effect));
        // Enchanted creature gets +1/+1.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1,1, Duration.WhileOnBattlefield)));
    }
View Full Code Here

        this.expansionSetCode = "BNG";

        this.color.setRed(true);

        // Target creature gets +2/+0 and gains first strike until end of turn.
        Effect effect = new BoostTargetEffect(2,0, Duration.EndOfTurn);
        effect.setText("Target creature gets +2/+0");
        this.getSpellAbility().addEffect(effect);
        effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("and gains first strike until end of turn");
        this.getSpellAbility().addEffect(effect);
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
    }
View Full Code Here

        this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Whenever enchanted creature attacks, it gets +X/+0 until end of turn, where X is your devotion to red.
        Effect effect = new BoostEnchantedEffect(new DevotionCount(ColoredManaSymbol.R), new StaticValue(0), Duration.EndOfTurn);
        effect.setText("it gets +X/+0 until end of turn, where X is your devotion to red");
        this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false));
    }
View Full Code Here

        // Until end of turn, target creature gets +6/+6 and gains trample, and all creatures able to block it this turn do so.
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        this.getSpellAbility().addEffect(new BoostTargetEffect(6, 6, Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
        Effect effect = new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn);
        effect.setText("and all creatures able to block it this turn do so");
        this.getSpellAbility().addEffect(effect);

        // Miracle {G}
        this.addAbility(new MiracleAbility(this, new ManaCostsImpl("{G}")));
    }
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.