Examples of changeHealth()


Examples of org.pokenet.server.battle.Pokemon.changeHealth()

                        else
                          p.getBattleField().forceExecuteTurn();
                        return true;
                    } else if(i.getId() == 210) { //Figy Berry
                      String message = poke.getName()+" ate the Figy Berry/nThe Figy Berry restored" +poke.getRawStat(0) / 8+" HP to " +poke.getName()+"!";
                        poke.changeHealth(poke.getRawStat(0) / 8);
                        if(!p.isBattling()) {
                            p.getTcpSession().write("Ph" + data[0] + poke.getHealth());
                             p.getTcpSession().write("Ii" + message);
                        }
                        else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

                        else
                             p.getBattleField().forceExecuteTurn();
                        return true;
                    } else if(i.getId() == 214) { //Wiki Berry
                      String message = poke.getName()+" ate the Wiki Berry/nThe Wiki Berry restored" +poke.getRawStat(0) / 8+" HP to " +poke.getName()+"!";
                        poke.changeHealth(poke.getRawStat(0) / 8);
                        if(!p.isBattling()) {
                            p.getTcpSession().write("Ph" + data[0] + poke.getHealth());
                             p.getTcpSession().write("Ii" + message);
                        }
                        else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

                        else
                             p.getBattleField().forceExecuteTurn();
                        return true;
                    } else if(i.getId() == 212) { //Mago Berry
                      String message = poke.getName()+" ate the Mago Berry/nThe Mago Berry restored" +poke.getRawStat(0) / 8+" HP to " +poke.getName()+"!";
                        poke.changeHealth(poke.getRawStat(0) / 8);
                        if(!p.isBattling()) {
                            p.getTcpSession().write("Ph" + data[0] + poke.getHealth());
                             p.getTcpSession().write("Ii" + message);
                        }
                        else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

                        else
                             p.getBattleField().forceExecuteTurn();
                        return true;
                    } else if(i.getId() == 213) { //Aguav Berry
                      String message = poke.getName()+" ate the Aguav Berry/nThe Aguav Berry restored" +poke.getRawStat(0) / 8+" HP to " +poke.getName()+"!";
                        poke.changeHealth(poke.getRawStat(0) / 8);
                        if(!p.isBattling()) {
                            p.getTcpSession().write("Ph" + data[0] + poke.getHealth());
                             p.getTcpSession().write("Ii" + message);
                        }
                        else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

                        else
                             p.getBattleField().forceExecuteTurn();
                        return true;
                    } else if(i.getId() == 214) { //Iapapa Berry
                      String message = poke.getName()+" ate the Iapapa Berry/nThe Iapapa Berry restored" +poke.getRawStat(0) / 8+" HP to " +poke.getName()+"!";
                        poke.changeHealth(poke.getRawStat(0) / 8);
                        if(!p.isBattling()) {
                            p.getTcpSession().write("Ph" + data[0] + poke.getHealth());
                             p.getTcpSession().write("Ii" + message);
                        }
                        else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

                        else
                             p.getBattleField().forceExecuteTurn();
                        return true;
                    }else if (i.getId() == 800) { //Voltorb Lollipop
            String message = poke.getName()+" ate the Voltorb Lollipop/nThe Lollipop restored 50 HP to " +poke.getName()+"!";
            poke.changeHealth(50);
            int random = rand.nextInt(10);
            if(random <3){
              poke.addStatus(new ParalysisEffect());
              message+="/n"+poke.getName()+" was Paralyzed from the Lollipop!";
            }
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

              poke.setHappiness(happiness);
            else
              poke.setHappiness(300);
            int random = rand.nextInt(10);
            if(random <=3){
              poke.changeHealth(30);
              message+="/n"+poke.getName()+" recovered 30HP.";
            }
            if (p.isBattling()) {
              p.getBattleField().forceExecuteTurn();
            }else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

            int randHealth = rand.nextInt(100);
            randHealth-=20;
            if(poke.getHealth()+randHealth<0)
              poke.setHealth(1);
            else
              poke.changeHealth(randHealth);
            if(randHealth>0)
              message+="/n"+poke.getName()+" healed "+randHealth+"HP";
            else
              message+="/n"+poke.getName()+" lost "+-randHealth+"HP";
            if (p.isBattling()) {
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

          poke = p.getParty()[Integer.parseInt(data[0])];
          String message = "";
          if (poke == null) return false;
          if(i.getId() == 1) { //Potion
                        hpBoost = 20;
                        poke.changeHealth(hpBoost);
                        message = "You used Potion on "+poke.getName()+"/nThe Potion restored 20 HP";
                  } else if(i.getId()==2) {//Super Potion
                          hpBoost = 50;
                          poke.changeHealth(hpBoost);
                          message = "You used Super Potion on "+poke.getName()+"/nThe Super Potion restored 50 HP";
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.changeHealth()

                        hpBoost = 20;
                        poke.changeHealth(hpBoost);
                        message = "You used Potion on "+poke.getName()+"/nThe Potion restored 20 HP";
                  } else if(i.getId()==2) {//Super Potion
                          hpBoost = 50;
                          poke.changeHealth(hpBoost);
                          message = "You used Super Potion on "+poke.getName()+"/nThe Super Potion restored 50 HP";
                  } else if(i.getId()==3) { //Hyper Potion
                          hpBoost = 200;
                          poke.changeHealth(hpBoost);
                          message = "You used Hyper Potion on "+poke.getName()+"/nThe Hyper Potion restored 200 HP";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.