/** * Returns true if this unit has anti-mek training. According to TM pg 155, * any unit that has less than 8 anti-mek skill is assumed to have anti-mek * training. This implies that the unit carries the requisite equipment for * properly performing anti-mek attacks (and the weight and cost that goes * along with that). * @return */ public boolean isAntiMekTrained() { // Anything below the antimech skill default is considered to be AM // trained. See TM pg 155 return getAntiMekSkill() < ANTI_MECH_SKILL_UNTRAINED; }
private void updateTotalSkill(Infantry infantry) { Crew crew = infantry.getCrew(); if (null == crew) { return; } int gunnery = crew.getGunnery(); int antiMek = infantry.getAntiMekSkill(); if (antiMek == 0 || antiMek == 8) { antiMek = gunnery + 1; } BigDecimal skillLevel = BigDecimal.valueOf(gunnery) .add(BigDecimal.valueOf(antiMek)); incrementSkillRatingCounts(getExperienceLevelName(skillLevel)); setTotalSkillLevels(getTotalSkillLevels(false).add(skillLevel)); }
blk.writeBlockData("antimek", (infantry.getAntiMekSkill() + ""));