Package org.pokenet.server.battle

Examples of org.pokenet.server.battle.BattleField.showMessage()


          }
          public String getName() {
            return "Gravity";
          }
          public void unapplyToField(BattleField field) {
            field.showMessage("Gravity returned to normal!");
          }
        });
        return 0;
      }
      public boolean attemptHit(BattleMechanics mech, Pokemon user, Pokemon target) {
View Full Code Here


    }
   
    public void switchIn(Pokemon p) {
        BattleField field = p.getField();
        if (p.hasAbility("Multitype") && (field != null)) {
            field.showMessage("The foe's " + p.getName()
                    + " transformed into the " + m_type + " type!");
        }
    }
   
    public boolean apply(Pokemon p) {
View Full Code Here

            return false;
        }
       
        BattleField field = poke.getField();
       
        field.showMessage(poke.getName() + " is confused!");
        if (field.getRandom().nextDouble() <= 0.5) {
            return false;
        }
       
        field.showMessage("It hurt itself in its confusion!");
View Full Code Here

        field.showMessage(poke.getName() + " is confused!");
        if (field.getRandom().nextDouble() <= 0.5) {
            return false;
        }
       
        field.showMessage("It hurt itself in its confusion!");
        poke.useMove(new PokemonMove(PokemonType.T_TYPELESS, 40, 1.0, 1) {
                public int use(BattleMechanics mech, Pokemon source, Pokemon target) {
                    int damage = mech.calculateDamage(this, source, target);
                    target.changeHealth(-damage, true);
                    return damage;
View Full Code Here

     * Paralysis has a 25% chance of immobolising the afflicted pokemon.
     */
    public boolean immobilises(Pokemon poke) {
        BattleField field = poke.getField();
        if (field.getRandom().nextDouble() <= 0.25) {
            field.showMessage(poke.getName() + " is paralysed! It can't move!");
            return true;
        }
        return false;
    }
   
View Full Code Here

        BattleField field = poke.getField();
        if (field.getRandom().nextDouble() <= 0.25) {
            poke.removeStatus(this);
            return false;
        }
        field.showMessage(poke.getName() + " is frozen solid!");
        return true;
    }
   
}
View Full Code Here

     */
    public boolean immobilises(Pokemon poke) {
        BattleField field = poke.getField();
       
        if (++m_turns >= 4) {
            field.showMessage("God struck down " + poke.getName() + " with all his might!");
            poke.useMove(new PokemonMove(PokemonType.T_TYPELESS, 10000, 1.0, 1), poke);
            field.showMessage("God forgave " + poke.getName());
            poke.removeStatus(this);
            return true;
        }
View Full Code Here

        BattleField field = poke.getField();
       
        if (++m_turns >= 4) {
            field.showMessage("God struck down " + poke.getName() + " with all his might!");
            poke.useMove(new PokemonMove(PokemonType.T_TYPELESS, 10000, 1.0, 1), poke);
            field.showMessage("God forgave " + poke.getName());
            poke.removeStatus(this);
            return true;
        }
       
        if (field.getRandom().nextDouble() <= 0.6) {
View Full Code Here

       
        if (field.getRandom().nextDouble() <= 0.6) {
            return false;
        }
       
        field.showMessage(poke.getName() + " was too god-fearing to move!");
        return true;
    }
   
}
View Full Code Here

       int layers = getLayers(p);
       int maximum = p.getStat(Pokemon.S_HP);
       double factor = new double[] { 0.125, 0.1875, 0.25 }[layers - 1];
       int damage = (int)(((double)maximum) * factor);
       if (damage < 1) damage = 1;
       field.showMessage(p.getName() + " was hurt by Spikes!");
       p.changeHealth(-damage, true);
     }
     public boolean applyToField(BattleField field) {
       field.showMessage("Spikes were scattered everywhere!");
       return true;
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.