Package org.pokenet.server.battle.mechanics

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


    public void unapply(Pokemon p) {
        if (!m_applied[p.getParty()])
            return;
        m_applied[p.getParty()] = false;
        if (p.hasAbility("Sand Veil")) {
            StatMultiplier mul = p.getMultiplier(Pokemon.S_EVASION);
            mul.decreaseMultiplier();
        }
        if ((p.getField().getMechanics() instanceof JewelMechanics) && p.isType(PokemonType.T_ROCK)) {
            p.getMultiplier(Pokemon.S_SPDEFENCE).divideBy(1.5);
        }
    }
View Full Code Here


    public boolean switchOut(Pokemon p) {
        return true;
    }
   
    private StatMultiplier getMultiplier(Pokemon p) {
        StatMultiplier mul = null;
        if (m_stat == Pokemon.S_ACCURACY) {
            mul = p.getAccuracy();
        } else if (m_stat == Pokemon.S_EVASION) {
            mul = p.getEvasion();
        } else {
View Full Code Here

   
    /**
     * Unapply this status effect.
     */
    public void unapply(Pokemon p) {
        StatMultiplier mul = getMultiplier(p);
        for (int i = 0; i < m_undo; ++i) {
          if(mul != null) {
            if (m_raise) {
                    mul.decreaseMultiplier();
                } else {
                    mul.increaseMultiplier();
                }
          }
        }
    }
View Full Code Here

                    && p.hasAbility("Keen Eye")) {
                return false;
            }
        }
       
        StatMultiplier mul = getMultiplier(p);
        if (mul == null)
            return false;

        int total = 0;
        for (int i = 0; i < m_stages; ++i) {
            boolean changed = false;
            if (m_raise) {
                changed = mul.increaseMultiplier();
            } else {
                changed = mul.decreaseMultiplier();
            }
            if (changed) {
                ++total;
            }
        }
View Full Code Here

TOP

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

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.