Package org.pokenet.server.battle.mechanics.moves

Examples of org.pokenet.server.battle.mechanics.moves.MoveSet


   
    /**
     * Handle the moves from a mod data line.
     */
    private void handleMoves(int species, ArrayList<String> moves, int category) {
        MoveSet set = m_moveSets.getMoveSet(species);
        ArrayList<String> removals = new ArrayList<String>();
        ArrayList<String> additions = new ArrayList<String>();
        Iterator<String> i = moves.iterator();
        while (i.hasNext()) {
            String item = (String)i.next();
            char c = item.charAt(0);
            if (c == '-') {
                removals.add(item.substring(1).trim());
            } else {
                String move;
                if (c == '+') {
                    move = item.substring(1);
                } else {
                    move = item;
                }
                additions.add(move.trim());
            }
        }
        String[][] arr = set.getMoves();
        removeMoves(arr, (String[])removals.toArray(new String[removals.size()]));
        ArrayList<String> update = new ArrayList<String>(Arrays.asList(arr[category]));
        update.addAll(additions);
        arr[category] = (String[])update.toArray(new String[update.size()]);
    }
View Full Code Here


        TreeSet<String> unimplemented = new TreeSet<String>();
        HashSet<String> implemented = new HashSet<String>();
       
        m_movesets = new TreeSet[m_database.length];
        for (int i = 0; i < m_database.length; ++i) {
            MoveSet set = null;
            try {
                set = moveSet.getMoveSet(i);
            } catch (IllegalArgumentException e) { }
            if (set == null) {
                m_movesets[i] = null;
                continue;
            }
            String[][] moves = set.getMoves();
            TreeSet<String> list = new TreeSet<String>();
            for (int j = 0; j < moves.length; ++j) {
                if (!requireImplementation) {
                    list.addAll(Arrays.asList(moves[j]));
                    continue;
View Full Code Here

TOP

Related Classes of org.pokenet.server.battle.mechanics.moves.MoveSet

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.