Package org.pokenet.server.battle

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


                if (--m_turns <= 0) {
                  p.getField().showMessage(p.getName() + " unleashed energy!");
                  p.useMove(new PokemonMove(PokemonType.T_TYPELESS, 0, 1.0, 1) {
                    public int use(BattleMechanics mech, Pokemon user, Pokemon target) {
                      int change = 2 * m_damage;
                      target.changeHealth(-change);
                      return change;
                    }
                  }, p.getOpponent());
                  p.removeStatus(this);
                }
View Full Code Here


          return 0;
        }
        user.faint();
        field.requestAndWaitForSwitch(party);
        target = field.getActivePokemon()[party];
        target.changeHealth(target.getStat(Pokemon.S_HP));
        target.removeStatus(StatusEffect.SPECIAL_EFFECT_LOCK);
        return 0;
      }
      public boolean attemptHit(BattleMechanics mech, Pokemon source, Pokemon target) {
        return true;
View Full Code Here

           field.removeEffect(this);
           return true;
         }
         Pokemon poke = field.getActivePokemon()[m_party];
         field.showMessage(poke.getName() + " took the attack!");
         poke.changeHealth(-m_damage);
         field.removeEffect(this);
         return true;
       }
       return false;
     }
View Full Code Here

         p.getField().showMessage(p.getName() + "'s health was sapped by leech seed!");
         p.changeHealth(-damage, true);

         if (p.hasAbility("Liquid Ooze")) {
           p.getField().showMessage(opponent.getName() + " sucked up liquid ooze!");
           opponent.changeHealth(-damage);
         } else {
           p.getField().showMessage(opponent.getName() + " regained health!");
           opponent.changeHealth(damage);
         }
       }
View Full Code Here

         if (p.hasAbility("Liquid Ooze")) {
           p.getField().showMessage(opponent.getName() + " sucked up liquid ooze!");
           opponent.changeHealth(-damage);
         } else {
           p.getField().showMessage(opponent.getName() + " regained health!");
           opponent.changeHealth(damage);
         }
       }
       return false;
     }
     public boolean apply(Pokemon p) {
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.