Package org.pokenet.server.battle.impl

Examples of org.pokenet.server.battle.impl.WildBattleField


        }
      } else if (i.getAttributes().contains(ItemAttribute.BATTLE)) {
        /* Pokeballs */
        if (i.getName().equalsIgnoreCase("POKE BALL")) {
          if (p.getBattleField() instanceof WildBattleField) {
            WildBattleField w = (WildBattleField) p.getBattleField();
            if (!w.throwPokeball(PokeBall.POKEBALL))
              w.queueMove(0, BattleTurn.getMoveTurn(-1));
            return true;
          }
        } else if (i.getName().equalsIgnoreCase("GREAT BALL")) {
          if (p.getBattleField() instanceof WildBattleField) {
            WildBattleField w = (WildBattleField) p.getBattleField();
            if (!w.throwPokeball(PokeBall.GREATBALL))
              w.queueMove(0, BattleTurn.getMoveTurn(-1));
            return true;
          }
        } else if (i.getName().equalsIgnoreCase("ULTRA BALL")) {
          if (p.getBattleField() instanceof WildBattleField) {
            WildBattleField w = (WildBattleField) p.getBattleField();
            if (!w.throwPokeball(PokeBall.ULTRABALL))
              w.queueMove(0, BattleTurn.getMoveTurn(-1));
            return true;
          }
        } else if (i.getName().equalsIgnoreCase("MASTER BALL")) {
          if (p.getBattleField() instanceof WildBattleField) {
            WildBattleField w = (WildBattleField) p.getBattleField();
            if (!w.throwPokeball(PokeBall.MASTERBALL))
              w.queueMove(0, BattleTurn.getMoveTurn(-1));
            return true;
          }
        }
      }
      return false;
View Full Code Here


        Pokemon p = this.getMap().getWildPokemon(this);
        //If we have both the required level to fish this thing up and the rod to do it
        if(this.getFishingLevel() >= DataService.getFishDatabase().getFish(p.getSpeciesName()).getReqLevel() && rod >= DataService.getFishDatabase().getFish(p.getSpeciesName()).getReqRod()) {
          this.addFishingExp(DataService.getFishDatabase().getFish(p.getSpeciesName()).getExperience());
          this.ensureHealthyPokemon();
          m_battleField = new WildBattleField(DataService.getBattleMechanics(),this,p);
        }
        //If you either have too low a fishing level or too weak a rod
        else {
          m_tcpSession.write("FU"); // Notify client you pulled up a fish too strong for you
          this.addFishingExp(10); //Conciliatory exp for "hooking" something even if it got away
View Full Code Here

          if(m_repel > 0)
            m_repel--;
          if(m_repel <= 0 && this.getMap().isWildBattle(m_x, m_y, this)) {
            m_tcpSession.write("U" + getX() + "," + getY());
            this.ensureHealthyPokemon();
            m_battleField = new WildBattleField(
                DataService.getBattleMechanics(),
                this,
                this.getMap().getWildPokemon(this));
            m_movementQueue.clear();
          } else {
View Full Code Here

TOP

Related Classes of org.pokenet.server.battle.impl.WildBattleField

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.