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

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


            m_moveSets = new MoveSetData();
            m_moveSets.loadFromFile(input);
            m_moveSets.pruneMoveSet(); // Slow, but avoids errors.
            m_items = new HoldItemData();
            m_items.loadItemData(input);
            m_moves = new MoveList(false);
            m_moves.loadMoveList(input);
            input.close();
           
            m_species.cacheMoveSets(m_moves, m_moveSets, false);
            m_map.put(m_uuid, this);
View Full Code Here


    MoveListEntry[] moves = new MoveListEntry[4];
    /*
     * Generate a list of possible moves this Pokemon could have at this level
     */
    ArrayList<MoveListEntry> possibleMoves = new ArrayList<MoveListEntry>();
    MoveList moveList = MoveList.getDefaultData();
    /*
     * Get all starter moves
     */
    for (int i = 0; i < ps.getStarterMoves().length; i++) {
      possibleMoves.add(moveList.getMove(ps.getStarterMoves()[i]));
    }
    /*
     * Get moves learned by levelling up
     */
    for (int i = 1; i <= level; i++) {
      if (ps.getLevelMoves().containsKey(i)) {
        MoveListEntry m = moveList.getMove(ps.getLevelMoves().get(i));
        boolean exists = false;
        /* Check if this move is already in the list of possible moves */
        for (int j = 0; j < possibleMoves.size(); j++) {
          if (possibleMoves.get(j) != null
              && possibleMoves.get(j).getName() != null && m != null
View Full Code Here

    try {
      Persister stream = new Persister();
      /*
       * Load all of shoddy's databases
       */
      m_moveList = new MoveList(true);
      m_moveSetData = new MoveSetData();
      m_speciesData = new PokemonSpeciesData();
      m_mechanics = new JewelMechanics(5);
      m_fishingData = new FishDatabase();
      m_fishingData.reinitialise();
View Full Code Here

   * @param species
   * @return
   */
  public MoveListEntry[] getBabyMoves(int species) {
    MoveListEntry[] moves = new MoveListEntry[4];
    MoveList moveList = MoveList.getDefaultData();
    ArrayList<MoveListEntry> possibleMoves = new ArrayList<MoveListEntry>();
    PokemonSpecies s = PokemonSpecies.getDefaultData().getSpecies(species);
    // List of moves by level 5
    for (int i = 1; i <= 5; i++) {
      if (s.getLevelMoves().containsKey(i)) {
        possibleMoves.add(moveList.getMove(s.getLevelMoves().get(i)));
      }
    }

    int moveNum = possibleMoves.size();
    if (possibleMoves.size() <= 4) {
      for (int i = 0; i < possibleMoves.size(); i++) {
        moves[i] = possibleMoves.get(i);
      }
    } else {
      for (int i = 0; i < moves.length; i++) {
        if (possibleMoves.size() == 0)
          moves[i] = null;
        moves[i] = possibleMoves.get(moveNum);
        moveNum--;
        if (moveNum == 0)
          break;
      }
    }

    // Moves that both parents know

    // List of egg moves
    possibleMoves.clear();
    for (int i = 0; i < s.getEggMoves().length; i++) {
      for (int x = 0; i < 4; i++) {
        if (malePoke.getMove(x) == moveList.getMove(s.getEggMoves()[i])) {
          possibleMoves.add(moveList.getMove(s.getEggMoves()[i]));
        }
      }
    }
    for (int i = 0; i < 4; i++) {
      if (moves[i] == null && possibleMoves.size() < i) {
View Full Code Here

TOP

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

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.