Package mage.players

Examples of mage.players.ManaPool


        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            for (UUID playerId: controller.getInRange()) {
                Player player = game.getPlayer(playerId);
                if (player != null){
                    ManaPool pool = player.getManaPool();
                    pool.addDoNotEmptyManaType(ManaType.WHITE);
                    pool.addDoNotEmptyManaType(ManaType.GREEN);
                    pool.addDoNotEmptyManaType(ManaType.BLUE);
                    pool.addDoNotEmptyManaType(ManaType.RED);
                    pool.addDoNotEmptyManaType(ManaType.BLACK);
                    pool.addDoNotEmptyManaType(ManaType.COLORLESS);
                }               
            }
            return true;
        }
        return false;   
View Full Code Here


    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        if (you == null) {
            return false;
        }
        ManaPool pool = you.getManaPool();
        int blackMana = pool.getBlack();
        int whiteMana = pool.getWhite();
        int blueMana = pool.getBlue();
        int greenMana = pool.getGreen();
        int redMana = pool.getRed();
        int colorlessMana = pool.getColorless();       
        pool.addMana(new Mana(redMana, greenMana, blueMana, whiteMana, blackMana, colorlessMana, 0), game, source);
        return true;
    }
View Full Code Here

TOP

Related Classes of mage.players.ManaPool

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.