Package mage.abilities.common

Examples of mage.abilities.common.SimpleStaticAbility


        this.expansionSetCode = "TMP";

        this.color.setGreen(true);

        // Artifacts and lands enter the battlefield tapped.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RootMazeEffect()));
    }
View Full Code Here


        super(new ManaCostsImpl(manaString), card.getName() + " using bestow");
        this.timing = TimingRule.SORCERY;
        TargetPermanent auraTarget = new TargetCreaturePermanent();
        this.addTarget(auraTarget);
        this.addEffect(new AttachEffect(Outcome.BoostCreature));
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BestowTypeChangingEffect());
        ability.setRuleVisible(false);
        card.addAbility(ability);
    }
View Full Code Here

        this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
        // Enchanted land is an Island.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesBasicLandEnchantedEffect("Island")));

    }
View Full Code Here

    public EldraziMonument(UUID ownerId) {
        super(ownerId, 199, "Eldrazi Monument", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT}, "{5}");
        this.expansionSetCode = "ZEN";

        // Creatures you control get +1/+1, have flying, and are indestructible.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent(), false)));
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())));
        Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures you control"), false);
        effect.setText("Creatures you control are indestructible");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
        // At the beginning of your upkeep, sacrifice a creature. If you can't, sacrifice Eldrazi Monument.
        this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new EldraziMonumentEffect()));
    }
View Full Code Here

    }

    @Override
    protected void init(UUID choosingPlayerId, GameOptions gameOptions) {
        super.init(choosingPlayerId, gameOptions);
        Ability ability = new SimpleStaticAbility(Zone.COMMAND, new EmptyEffect("Commander effects"));
        //Move commander to command zone
        for (UUID playerId: state.getPlayerList(startingPlayerId)) {
            Player player = getPlayer(playerId);
            if (player != null){
                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);
                        this.commanderCombatWatcher.add(watcher);
                        watcher.addCardInfoToCommander(this);
View Full Code Here

       
        // As Entropic Specter enters the battlefield, choose an opponent.
        this.addAbility(new AsEntersBattlefieldAbility(new ChooseOpponent()));
       
        // Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand.
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInTargetPlayerHandCount(), Duration.WhileOnBattlefield)));
       
        // Whenever Entropic Specter deals damage to a player, that player discards a card.
        this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1, false), false, true));
    }
View Full Code Here

    public TrustyMachete (UUID ownerId) {
        super(ownerId, 209, "Trusty Machete", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
        this.expansionSetCode = "ZEN";
        this.subtype.add("Equipment");
        this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 1)));
    }
View Full Code Here

        super(ownerId, 203, "Grappling Hook", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
        this.expansionSetCode = "ZEN";
        this.subtype.add("Equipment");

        // Equipped creature has double strike.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)));
        // Whenever equipped creature attacks, you may have target creature block it this turn if able.
        Ability ability = new AttacksAttachedTriggeredAbility(new GrapplingHookEffect(), true);
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
        // Equip {4}
View Full Code Here

    public SphereOfResistance(UUID ownerId) {
        super(ownerId, 139, "Sphere of Resistance", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "EXO";

        // Spells cost {1} more to cast.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostIncreasementAllEffect(1)));
    }
View Full Code Here

        Condition condition = new SourceHasCounterCondition(CounterType.LEVEL, level1, level2);
        for (Ability ability : abilities) {
            ContinuousEffect effect = new GainAbilitySourceEffect(ability);
            ConditionalContinousEffect abEffect = new ConditionalContinousEffect(effect, condition, "");
            Ability staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, abEffect);
            staticAbility.setRuleVisible(false);
            constructed.add(staticAbility);
        }

        ContinuousEffect effect = new SetPowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield);
        ConditionalContinousEffect ptEffect = new ConditionalContinousEffect(effect, condition, rule);
        constructed.add(new SimpleStaticAbility(Zone.BATTLEFIELD, ptEffect));

        return constructed;
    }
View Full Code Here

TOP

Related Classes of mage.abilities.common.SimpleStaticAbility

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.