Package mage

Examples of mage.Mana


    public boolean apply(Game game, Ability source) {
        ChoiceColor choice = (ChoiceColor) source.getChoices().get(0);
        Player player = game.getPlayer(source.getControllerId());
        int count = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
        if (choice.getColor().isBlack()) {
            player.getManaPool().addMana(new Mana(0, 0, 0, 0, count, 0, 0), game, source);
            return true;
        } else if (choice.getColor().isBlue()) {
            player.getManaPool().addMana(new Mana(0, 0, count, 0, 0, 0, 0), game, source);
            return true;
        } else if (choice.getColor().isRed()) {
            player.getManaPool().addMana(new Mana(count, 0, 0, 0, 0, 0, 0), game, source);
            return true;
        } else if (choice.getColor().isGreen()) {
            player.getManaPool().addMana(new Mana(0, count, 0, 0, 0, 0, 0), game, source);
            return true;
        } else if (choice.getColor().isWhite()) {
            player.getManaPool().addMana(new Mana(0, 0, 0, count, 0, 0, 0), game, source);
            return true;
        }
        return false;
    }
View Full Code Here


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

        // At the beginning of your upkeep, add {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end.
        Effect effect = new AddManaToManaPoolEffect(new Mana(Mana.GreenMana), "your", true);
        effect.setText("add {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end");       
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false));
    }
View Full Code Here

        this.subtype.add("Arcane");

        this.color.setRed(true);

        // Add {R}{R}{R} to your mana pool.
        this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(3, 0, 0, 0, 0, 0, 0)));
        // Splice onto Arcane {1}{R}
        this.addAbility(new SpliceOntoArcaneAbility("{1}{R}"));
    }
View Full Code Here

        this.color.setRed(true);
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);

        this.addAbility(new EntersBattlefieldTriggeredAbility(new BasicManaEffect(new Mana(ColoredManaSymbol.R))));
    }
View Full Code Here

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

        // When Burning-Tree Emissary enters the battlefield, add {R}{G} to your mana pool.
        this.addAbility(new EntersBattlefieldTriggeredAbility(new BasicManaEffect(new Mana(1,1,0,0,0,0,0))));
    }
View Full Code Here

        this.color.setRed(true);
        this.power = new MageInt(3);
        this.toughness = new MageInt(3);

        // <em>Raid</em> - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool.
        this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToControllersManaPoolEffect(new Mana(1,0,0,1,1,0,0))), RaidCondition.getInstance(),
                 "<i>Raid</i> -  When {this} enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool.", false));
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

        this.color.setRed(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(1);

        // {T}, Sacrifice Generator Servant: Add {2} to your mana pool.  If that mana is spent on a creature spell, it gains haste until end of turn.
        Mana mana = Mana.ColorlessMana(2);
        mana.setFlag(true); // used to indicate this mana ability
        SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, mana, new TapSourceCost());
        ability.addCost(new SacrificeSourceCost());
        ability.getEffects().get(0).setText("Add {2} to your mana pool. If that mana is spent on a creature spell, it gains haste until end of turn.");
        this.addAbility(ability);
       
View Full Code Here

        // Morph {2}
        this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}")));
       
        // When Rattleclaw Mystic is turned face up, add {G}{U}{R} to your mana pool.
        this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddManaToControllersManaPoolEffect(new Mana(1,1,1,0,0,0,0))));

    }
View Full Code Here

        this.subtype.add("Elf");
        this.subtype.add("Druid");
        this.color.setGreen(true);
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);
        this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 3, 0, 0, 0, 0, 0), new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, false))));
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        List<Permanent> lands = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game);
        Mana types = new Mana();
        for (Permanent land : lands) {
            Abilities<ManaAbility> mana = land.getAbilities().getManaAbilities(Zone.BATTLEFIELD);
            for (ManaAbility ability : mana) {
                types.add(ability.getNetMana(game));
            }
        }
        Choice choice = new ChoiceImpl(false);
        choice.setMessage("Pick a mana color");
        if (types.getBlack() > 0) {
            choice.getChoices().add("Black");
        }
        if (types.getRed() > 0) {
            choice.getChoices().add("Red");
        }
        if (types.getBlue() > 0) {
            choice.getChoices().add("Blue");
        }
        if (types.getGreen() > 0) {
            choice.getChoices().add("Green");
        }
        if (types.getWhite() > 0) {
            choice.getChoices().add("White");
        }
        if (types.getColorless() > 0) {
            choice.getChoices().add("Colorless");
        }
        if (types.getAny() > 0) {
            choice.getChoices().add("Black");
            choice.getChoices().add("Red");
            choice.getChoices().add("Blue");
            choice.getChoices().add("Green");
            choice.getChoices().add("White");
View Full Code Here

TOP

Related Classes of mage.Mana

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.