Package games.stendhal.common.constants

Examples of games.stendhal.common.constants.Nature


   * @param width
   * @param height
   */
  private void drawStrike(final Graphics2D g2d, final RPEntity entity,
      final int x, final int y, final int width, final int height) {
    Nature damageType = entity.getShownDamageType();
   
    if (damageType != null) {     
      final Sprite sprite = bladeStrikeSprites.get(damageType).get(getState(entity))[frameBladeStrike];

      final int spriteWidth = sprite.getWidth();
View Full Code Here


   * @param width
   * @param height
   */
  private void drawDistanceAttack(final Graphics2D g2d, final RPEntity entity, final RPEntity target,
      final int x, final int y, final int width, final int height) {
    Nature nature = entity.getShownDamageType();

    int startX = x + width / 2;
    int startY = y + height / 2;
    int endX = (int) (32 * (target.getX() + target.getWidth() / 2));
    // Target at the upper edge of the occupied area.
View Full Code Here

    } else if (qName.equals("abilities")) {
      abilities = true;
    } else if (abilities && qName.equals("damage")) {
      damageType = Nature.parse(attrs.getValue("type"));
    } else if (abilities && qName.equals("susceptibility")) {
      Nature type = Nature.parse(attrs.getValue("type"));
      Double value = Double.valueOf(attrs.getValue("value"));
      susceptibilities.put(type, value);
    }
  }
View Full Code Here

public class AttackEvent extends Event<RPEntity> {
  private static final Logger logger = Logger.getLogger(AttackEvent.class);
 
  @Override
  public void execute() {
    Nature dtype;
    int idx = event.getInt("type");
    try {
      dtype = Nature.values()[idx];
    } catch (ArrayIndexOutOfBoundsException exc) {
      logger.warn("Unknown damage type: " + idx);
View Full Code Here

TOP

Related Classes of games.stendhal.common.constants.Nature

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.