@Override public String getName() { return "Mech: " + mech.getDisplayName(); }
@Override public StringBuffer printEntity() { StringBuffer buff = new StringBuffer(); buff.append("Mech: ").append(mech.getDisplayName()).append("\n"); buff.append("Found in: ").append(fileString).append("\n"); buff.append(printTechLevel()); buff.append("Intro year: ").append(mech.getYear()); buff.append(printSource()); buff.append(printShortMovement()); if (correctWeight(buff, true, true)) { buff.append("Weight: ").append(getWeight()).append(" (") .append(calculateWeight()).append(")\n"); } buff.append(printWeightCalculation()).append("\n"); buff.append(printArmorPlacement()); correctArmor(buff); buff.append(printLocations()); correctCriticals(buff); // printArmor(buff); printFailedEquipment(buff); return buff; }
if (((double) getArmor(LOC_HEAD) / getOArmor(LOC_HEAD)) <= 0.33) { logger.log(Mech.class, METHOD_NAME, LogLevel.DEBUG, getDisplayName() + " HEAVY DAMAGE: Less than 1/3 head armor remaining"); return true; getDisplayName() + " HEAVY DAMAGE: Less than 25% armor remaining"); return true; getDisplayName() + " HEAVY DAMAGE: Two limbs with internal damage"); return true; getDisplayName() + " HEAVY DAMAGE: Torse internal damage"); return true; getDisplayName() + " HEAVY DAMAGE: Engine hit"); return true; getDisplayName() + " HEAVY DAMAGE: Gyro hit"); return true; getDisplayName() + " Three crew hits"); return true; getDisplayName() + " HEAVY DAMAGE: Less than 25% weapons operable"); return true;
if (((double) getArmor(LOC_HEAD) / getOArmor(LOC_HEAD)) <= 0.67) { logger.log(Mech.class, METHOD_NAME, LogLevel.DEBUG, getDisplayName() + " MODERATE DAMAGE: Less than 2/3 head armor"); return true; getDisplayName() + " MODERATE DAMAGE: Less than 50% armor"); return true; getDisplayName() + " MODERATE DAMAGE: Limb with internal damage"); return true; getDisplayName() + " MODERATE DAMAGE: 2 crew hits"); return true; getDisplayName() + " HEAVY DAMAGE: Less than 50% weapons operable"); return true;
if (countInternalDamagedLimbs() >= 3) { logger.log(Mech.class, METHOD_NAME, LogLevel.DEBUG, getDisplayName() + " CRIPPLED: 3+ limbs have taken internals."); return true; getDisplayName() + " CRIPPLED: 2+ torsos have taken internals."); return true; getDisplayName() + " CRIPPLED: Left Torso destroyed."); return true; getDisplayName() + " CRIPPLED: Right Torso destroyed."); return true; getDisplayName() + " CRIPPLED: 2 Engine Hits."); return true; getDisplayName() + " CRIPPLED: Engine + Gyro hit."); return true; SYSTEM_SENSORS, LOC_CT) > 0)) { logger.log(Mech.class, METHOD_NAME, LogLevel.DEBUG, getDisplayName() + " CRIPPLED: Sensors destroyed."); return true; getDisplayName() + " CRIPPLED: Pilot has taken 4+ damage."); return true; getDisplayName() + " CRIPPLED: Immobilized.");
if (getArmor(LOC_HEAD) < getOArmor(LOC_HEAD)) { logger.log(Mech.class, METHOD_NAME, LogLevel.DEBUG, getDisplayName() + " LIGHT DAMAGE: head armor damaged"); return true; getDisplayName() + " LIGHT DAMAGE: less than 75% armor remaining"); return true; getDisplayName() + " LIGHT DAMAGE: crew hit"); return true; getDisplayName() + " HEAVY DAMAGE: Less than 75% weapons operable"); return true;
public Mounted addEquipment(EquipmentType etype, EquipmentType etype2, int loc, boolean omniPod) throws LocationFullException { Mounted mounted = new Mounted(this, etype); Mounted mounted2 = new Mounted(this, etype2); mounted.setOmniPodMounted(omniPod); mounted2.setOmniPodMounted(omniPod); // check criticals for space if (getEmptyCriticals(loc) < 1) { throw new LocationFullException(mounted.getName() + " and " + mounted2.getName() + " do not fit in " + getLocationAbbr(loc) + " on " + getDisplayName() + "\n free criticals in location: " + getEmptyCriticals(loc) + ", criticals needed: " + 1); } super.addEquipment(mounted, loc, false); super.addEquipment(mounted2, loc, false); CriticalSlot cs = new CriticalSlot(mounted); cs.setMount2(mounted2); addCritical(loc, cs); return mounted; }
throw new LocationFullException(mounted.getName() + " does not fit in " + getLocationAbbr(loc) + " on " + getDisplayName() + "\n free criticals in location: " + getEmptyCriticals(loc) + ", criticals needed: " throw new LocationFullException(mounted.getName() + " does not fit in " + getLocationAbbr(loc) + " on " + getDisplayName() + "\n needs " + getEmptyCriticals(loc)