Package org.pokenet.server.battle.mechanics.moves

Examples of org.pokenet.server.battle.mechanics.moves.PokemonMove


        public boolean isMoveTransformer(boolean enemy) {
            return enemy;
        }

        protected MoveListEntry getEnemyTransformedMove(Pokemon p, MoveListEntry entry) {
            PokemonMove move = entry.getMove();
            if (move.getType().equals(m_type) && move.isAttack()) {
                p.getField().informUseMove(p.getOpponent(), entry.getName());
                int max = p.getStat(Pokemon.S_HP);
                if (p.getHealth() < max) {
                    p.getField().showMessage(p.getName() + "'s " + getName() + " absorbed damage!");
                    p.changeHealth(max / 4);
View Full Code Here


        double maximum = p.getStat(Pokemon.S_HP);
        double current = p.getHealth();
        if ((current * 3.0) > maximum) {
            return entry;
        }
        PokemonMove move = entry.getMove();
        if (move.getType().equals(m_type)) {
            move.setPower((int)((double)move.getPower() * 1.5));
        }
        return entry;
    }
View Full Code Here

     */
    public MoveListEntry getTransformedMove(Pokemon poke, MoveListEntry entry) {
        if (!hasEffects(poke.getField()))
            return entry;
       
        PokemonMove move = entry.getMove();
        PokemonType type = move.getType();
        String name = entry.getName();
        if (type.equals(PokemonType.T_FIRE)) {
            move.setPower((int)((double)move.getPower() * 1.5));
        } else if (type.equals(PokemonType.T_WATER)) {
            move.setPower((int)((double)move.getPower() / 2.0));
        } else if (name.equals("Solarbeam")) {
            if (move instanceof StatusMove) {
                StatusMove statusMove = (StatusMove)move;
                // Assume that the first effect is the ChargeEffect!
                ChargeEffect charge = (ChargeEffect)statusMove.getEffects()[0];
                charge.setTurns(0);
            }
        } else if (name.equals("Thunder")) {
            move.setAccuracy(0.5);
        } else if (name.equals("Weather Ball")) {
            move.setPower(100);
            move.setType(PokemonType.T_FIRE);
        } else if (name.equals("Moonlight") || name.equals("Morning Sun") || name.equals("Synthesis")) {
            StatusMove statusMove = (StatusMove)move;
            // Assume that the first effect is the PercentEffect!
            PercentEffect perc = (PercentEffect)statusMove.getEffects()[0];
            perc.setPercent(2.0/3.0);
View Full Code Here

   
    /**
     * Compound Eyes transforms moves by giving them 30% higher accuracy.
     */
    public MoveListEntry getTransformedMove(Pokemon poke, MoveListEntry entry) {
        PokemonMove move = entry.getMove();
        move.setAccuracy(move.getAccuracy() * 1.3);
        return entry;
    }
View Full Code Here

    public boolean isMoveTransformer(boolean enemy) {
        return !enemy;
    }
   
    public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) {
        PokemonMove move = entry.getMove();
        if (move.getType().equals(m_type)) {
            move.setPower((int)((double)move.getPower() * m_factor));
        }
        if (entry.getName().equals("Judgment")) {
            move.setType(m_type);
        }
        return entry;
    }
View Full Code Here

   
    /**
     * Boost the power of one type of move by 10%.
     */
    public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) {
        PokemonMove move = entry.getMove();
        if (move.getType().equals(m_type)) {
            move.setPower((int)((double)move.getPower() * m_factor));
        }
        return entry;
    }
View Full Code Here

    public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) {
        if (!p.getSpeciesName().equals(m_pokemon)) {
            // No effect for Pokemon other than the specified one.
            return entry;
        }
        PokemonMove move = entry.getMove();
        PokemonType type = move.getType();
        if (p.isType(type)) {
            move.setPower((int)((double)move.getPower() * 1.2));
        }
        return entry;
    }
View Full Code Here

    public boolean isMoveTransformer(boolean enemy) {
        return !enemy;
    }

    public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) {
        PokemonMove move = entry.getMove();
        if (move.isSpecial(p.getField().getMechanics()) == m_special) {
            move.setPower((int)((double)move.getPower() * 1.1));
        }
        return entry;
    }
View Full Code Here

        return (PokemonType.T_NORMAL.equals(m_type)
                    || (move.getEffectiveness(p.getOpponent(), p) > 1.0))
                && move.getType().equals(m_type) && move.isDamaging();
    }
    public MoveListEntry getEnemyTransformedMove(Pokemon p, MoveListEntry entry) {
        PokemonMove move = entry.getMove();
        m_suitable = (isAppropriateMove(p, move) && !p.hasSubstitute());
        if (m_suitable) {
            move.setPower((int)(((double)move.getPower()) * 0.5));
        }
        return entry;
    }
View Full Code Here

        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

TOP

Related Classes of org.pokenet.server.battle.mechanics.moves.PokemonMove

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.