public void setGunneryMechL(int gunnery) { super.setGunneryL(gunnery, 0); }
crew.setGunneryL(gunneryLVal, slot); crew.setGunneryM(gunneryMVal, slot); crew.setGunneryB(gunneryBVal, slot);
/** * update the skills for this squadron */ public void updateSkills() { List<Entity> activeFighters = getActiveSubEntities().orElse(Collections.emptyList()); if(activeFighters.isEmpty()) { return; } int pilotingTotal = 0; int gunneryTotal = 0; int gunneryLTotal = 0; int gunneryMTotal = 0; int gunneryBTotal = 0; for(Entity fighter : activeFighters) { pilotingTotal += fighter.getCrew().getPiloting(); gunneryTotal += fighter.getCrew().getGunnery(); gunneryLTotal += fighter.getCrew().getGunneryL(); gunneryMTotal += fighter.getCrew().getGunneryM(); gunneryBTotal += fighter.getCrew().getGunneryB(); } getCrew().setPiloting(pilotingTotal / activeFighters.size(), 0); getCrew().setGunnery(gunneryTotal / activeFighters.size(), 0); getCrew().setGunneryL(gunneryLTotal / activeFighters.size(), 0); getCrew().setGunneryM(gunneryMTotal / activeFighters.size(), 0); getCrew().setGunneryB(gunneryBTotal / activeFighters.size(), 0); }
ent.getCrew().setGunneryL(skills[0], i); ent.getCrew().setGunneryM(skills[0], i); ent.getCrew().setGunneryB(skills[0], i);
entity.getCrew().setGunnery(Math.min(Math.max(gunnery, 0), 7), slot); entity.getCrew().setGunneryL(Math.min(Math.max(gunnery, 0), 7), slot); entity.getCrew().setGunneryM(Math.min(Math.max(gunnery, 0), 7), slot); entity.getCrew().setGunneryB(Math.min(Math.max(gunnery, 0), 7), slot);
} else { if (client.getGame().getOptions().booleanOption(OptionsConstants.RPG_RPG_GUNNERY)) { entity.getCrew().setGunneryL(gunneryL, i); entity.getCrew().setGunneryB(gunneryB, i); entity.getCrew().setGunneryM(gunneryM, i); } else { entity.getCrew().setGunnery(gunnery, i); entity.getCrew().setGunneryL(gunnery, i); entity.getCrew().setGunneryB(gunnery, i); entity.getCrew().setGunneryM(gunnery, i);