Examples of showMessage()


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

            }
            // Just return now to prevent a critical hit from occurring.
            return 0;
        } else if (multiplier < 1.0) {
            if (!silent) {
                field.showMessage("It's not very effective...");
            }
        }
       
        final boolean stab = attacker.isType(moveType);
        double stabFactor = attacker.hasAbility("Adaptability") ? 2.0 : 1.5;
View Full Code Here

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

       
        if (isCritical) {
            damage *= attacker.hasAbility("Sniper") ? 3 : 2;
            if (defender.hasAbility("Anger Point")) {
                if (!silent) {
                    field.showMessage(defender.getName()
                            + "'s Anger Point raised its attack!");
                }
                StatChangeEffect eff = new StatChangeEffect(
                        Pokemon.S_ATTACK,true, 12);
                eff.setDescription(null);
View Full Code Here

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

                        Pokemon.S_ATTACK,true, 12);
                eff.setDescription(null);
                defender.addStatus(defender, eff);
            }
            if (!silent) {
                field.showMessage("A critical hit!");
            }
        }
       
        return ((damage < 1) ? 1 : damage);
    }
View Full Code Here

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

        BattleField field = user.getField();
        FieldEffect effect = field.getEffectByType(SpeedSwapEffect.class);
        if (effect != null) {
          field.removeEffect(effect);
        } else {
          field.showMessage(user.getName() + " twisted the dimensions!");
          field.applyEffect(new SpeedSwapEffect());
        }
        return 0;
      }
      public int getPriority() {
View Full Code Here

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

              public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) {
                if (vetoesMove(p, entry)) {
                  BattleField field = p.getField();
                  String move = entry.getName();
                  field.informUseMove(p, move);
                  field.showMessage(p.getName() + " can't use " + move + " after the taunt!");
                  return null;
                }
                return entry;
              }
            }
View Full Code Here

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

          public int getTier() {
            return 1;
          }
          public boolean applyToField(BattleField field) {
            // Completely made up message.
            field.showMessage("Gravity intensified!");
            return true;
          }
          public boolean apply(Pokemon p) {
            if (p.hasAbility("Levitate")) {
              p.getAbility().deactivate();
View Full Code Here

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

          }
          public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) {
            String name = entry.getName();
            if (!canUseMove(name)) {
              BattleField field = p.getField();
              field.showMessage(p.getName() + " can't use " + name + " because of the Gravity.");
              return null;
            }
            return entry;
          }
View Full Code Here

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

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

    }
   
    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

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

            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
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.