Package org.pokenet.server.battle.mechanics

Examples of org.pokenet.server.battle.mechanics.StatException


  public int getLevel() {
    return m_level;
  }

  public int getIv(int i) throws StatException {
    if ((i < 0) || (i > 5)) throw new StatException();
    return m_iv[i];
  }
View Full Code Here


    if ((i < 0) || (i > 5)) throw new StatException();
    return m_iv[i];
  }

  public int getEv(int i) throws StatException {
    if ((i < 0) || (i > 5)) throw new StatException();
    return m_ev[i];
  }
View Full Code Here

    if (i < m_multiplier.length) {
      if (m_multiplier == null) {
        m_multiplier = new StatMultiplier[m_stat.length];
      }
      if (m_multiplier[i] == null) m_multiplier[i] = new StatMultiplier(false);
      if (i < 0) throw new StatException();
      if (i < 6) return m_multiplier[i];
      if (i == S_ACCURACY) return m_accuracy;
      if (i == S_EVASION) return m_evasion;
    }
    throw new StatException();
  }
View Full Code Here

    }
    throw new StatException();
  }

  public int getRawStat(int i) {
    if ((i < 0) || (i > 5)) throw new StatException();
    return m_stat[i];
  }
View Full Code Here

    if ((i < 0) || (i > 5)) throw new StatException();
    return m_stat[i];
  }

  public void setRawStat(int i, int newStat) {
    if ((i < 0) || (i > 5)) throw new StatException();
    m_stat[i] = newStat;
  }
View Full Code Here

    if ((i < 0) || (i > 5)) throw new StatException();
    m_stat[i] = newStat;
  }

  public int getStat(int i, double multiplier) {
    if ((i < 0) || (i > 5)) throw new StatException();
    if (m_stat == null) {
      calculateStats(false);
    }
    return (int) ((m_stat[i]) * multiplier);
  }
 
View Full Code Here

  public int getStat(int i) {
    if (m_multiplier == null) {
      m_multiplier = new StatMultiplier[m_stat.length];
    }
    if (m_multiplier[i] == null) m_multiplier[i] = new StatMultiplier(false);
    if ((i < 0) || (i > 5)) throw new StatException();
    // Consider stat modifications.
    return getStat(i, m_multiplier[i].getMultiplier());
  }
View Full Code Here

    public PokemonType[] getTypes() {
        return m_type;
    }
   
    public int getBase(int i) throws StatException {
        if ((i < 0) || (i > 5)) throw new StatException();
        return m_base[i];
    }
View Full Code Here

TOP

Related Classes of org.pokenet.server.battle.mechanics.StatException

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.