Package megamek.common

Examples of megamek.common.Pilot


        out.write("\" jumpMp=\"");
        out.write(String.valueOf(entity.getOriginalJumpMP()));
        out.write("\">");

        // Add the crew this entity.
        final Pilot crew = entity.getCrew();
        out.write("<pilot name=\"");
        out.write(crew.getName());
        out.write("\" gunnery=\"");
        out.write(String.valueOf(crew.getGunnery()));
        out.write("\" piloting=\"");
        out.write(String.valueOf(crew.getPiloting()));
        if (crew.isDead() || (crew.getHits() > 5)) {
            out.write("\" hits=\"Dead");
        } else if (crew.getHits() > 0) {
            out.write("\" hits=\"");
            out.write(String.valueOf(crew.getHits()));
        }
        if (crew.countAdvantages() > 0) {
            out.write("\" advantages=\"");
            out.write(String.valueOf(crew.getAdvantageList(" ")));
        }
        if (crew.countMDImplants() > 0) {
            out.write("\" implants=\"");
            out.write(String.valueOf(crew.getImplantList(" ")));
        }
        out.write("\"/>");

        // Write the game-specific data.
        out.write("<entityData gameId=\"");
View Full Code Here


            }
            System.out.println("Loading " + ms.getName());
            Entity e = new MechFileParser(ms.getSourceFile(), ms.getEntryName())
                    .getEntity();
            e
                    .setCrew(new Pilot(st.nextToken(), Integer.parseInt(st
                            .nextToken()), Integer.parseInt(st.nextToken())));
            try {
                String direction = st.nextToken();
                if (direction.equalsIgnoreCase("N")) {
                    e.setFacing(0);
View Full Code Here

     * @param damage
     *            The <code>int</code> amount of damage.
     */
    private Vector<Report> damageCrew(Entity en, int damage) {
        Vector<Report> vDesc = new Vector<Report>();
        Pilot crew = en.getCrew();
        if (!crew.isDead() && !crew.isEjected() && !crew.isDoomed()) {
            crew.setHits(crew.getHits() + damage);
            Report r = new Report(6025);
            r.subject = en.getId();
            r.indent(2);
            r.addDesc(en);
            r.add(crew.getName());
            r.add(damage);
            r.newlines = 0;
            vDesc.addElement(r);
            if (Pilot.DEATH > crew.getHits()) {
                vDesc.addAll(resolveCrewDamage(en, damage));
            } else if (!crew.isDoomed()) {
                crew.setDoomed(true);
                vDesc.addAll(destroyEntity(en, "pilot death", true));
            }
        }
        return vDesc;
    }
View Full Code Here

                entity.setOffBoard(0, Entity.NONE);
            }

            // change entity
            if (client.game.getOptions().booleanOption("rpg_gunnery")) {
                entity.setCrew(new Pilot(name, gunneryL, gunneryM, gunneryB,
                        piloting));
            } else {
                entity.setCrew(new Pilot(name, gunnery, piloting));
            }
            entity.getCrew().setInitBonus(init);
            entity.getCrew().setCommandBonus(command);
            if (entity instanceof Mech) {
                Mech mech = (Mech) entity;
View Full Code Here

                entity.setOffBoard(0, Entity.NONE);
            }

            // change entity
            if (client.game.getOptions().booleanOption("rpg_gunnery")) {
                entity.setCrew(new Pilot(name, gunneryL, gunneryM, gunneryB,
                        piloting));
            } else {
                entity.setCrew(new Pilot(name, gunnery, piloting));
            }
            entity.getCrew().setInitBonus(init);
            entity.getCrew().setCommandBonus(command);
            if (entity instanceof Mech) {
                Mech mech = (Mech) entity;
View Full Code Here

TOP

Related Classes of megamek.common.Pilot

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.