Package org.jpokemon.pokemon.move

Examples of org.jpokemon.pokemon.move.Move


      json.put("action", "selectmove");
      json.put("pokemon", pokemon.name());

      for (int i = 0; i < pokemon.moveCount(); i++) {
        JSONObject moveJson = new JSONObject();
        Move move = pokemon.move(i);

        moveJson.put("name", move.name());
        moveJson.put("pp", move.pp());
        moveJson.put("ppMax", move.ppMax());

        moves.add(moveJson);
      }

      json.put("moves", new JSONArray(moves.toString()));
View Full Code Here


        Slot[] allSlots = slots.values().toArray(new Slot[slots.values().size()]);
        randomSlot = allSlots[(int) (Math.random() * allSlots.length)];
      } while (slot.equals(randomSlot));

      int randomMoveIndex = (int) ((Math.random()) * slot.leader().moveCount());
      Move randomMove = slot.leader().move(randomMoveIndex);

      addTurn(new AttackTurn(this, slot, randomSlot, randomMove));
    }
  }
View Full Code Here

TOP

Related Classes of org.jpokemon.pokemon.move.Move

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.