/** * Calculates the battle value of this emplacement */ @Override public int calculateBattleValue() { return calculateBattleValue(false, false); }
private static String formatArmorGunEmplacement(GunEmplacement ge) { StringBuffer sb = new StringBuffer(1024); sb.append(" ----------").append(CommonConstants.NL) .append(" | |").append(CommonConstants.NL) .append(" CF | ") .append(renderArmor(ge.getArmor(GunEmplacement.LOC_GUNS))) .append(" |").append(CommonConstants.NL) .append(" | |").append(CommonConstants.NL) .append(" -----------------") .append(CommonConstants.NL); return sb.toString(); }
@Override public boolean isCrippled() { if (isMilitary() && !hasViableWeapons()) { if (PreferenceManager.getClientPreferences().debugOutputOn()) { System.out.println(getDisplayName() + " CRIPPLED: no viable weapons left."); } return true; } return false; }
dbv += getTotalArmor(); for (Mounted mounted : getEquipment()) { EquipmentType etype = mounted.getType(); boolean hasTargComp = hasTargComp(); for (Mounted mounted : getWeaponList()) { WeaponType wtype = (WeaponType) mounted.getType(); double dBV = wtype.getBV(this); for (Mounted mounted : getAmmo()) { AmmoType atype = (AmmoType) mounted.getType(); if (useGeometricMeanBV()) { finalBV = 2 * Math.sqrt(obv * dbv); if (finalBV == 0) { xbv += getExtraC3BV((int)Math.round(finalBV)); pilotFactor = getCrew().getBVSkillMultiplier(game);
public Entity getEntity() throws EntityLoadingException { GunEmplacement e = new GunEmplacement(); e.setChassis(dataFile.getDataAsString("Name")[0]); e.setModel(dataFile.getDataAsString("Model")[0]); } else { e.setModel(""); e.setSource(dataFile.getDataAsString("source")[0]); e.setHasNoTurret(true); e.setArmorTonnage(e.getArmorWeight()); return e;
r.newlines = 0; vDesc.addElement(r); vDesc.addAll(getCrew().getDescVector(false)); r = new Report(7070, Report.PUBLIC); r.add(getKillNumber()); vDesc.addElement(r); if (isDestroyed()) { Entity killer = game.getEntity(killerId); if (killer == null) { } else if (getCrew().isEjected()){ r = new Report(7071, Report.PUBLIC); vDesc.addElement(r);
@Override public void addEquipment(Mounted mounted, int loc, boolean rearMounted) throws LocationFullException { super.addEquipment(mounted, loc, rearMounted); // Add the piece equipment to our slots. addCritical(loc, new CriticalSlot(mounted)); }
@Override public boolean isLocationProhibited(Coords c, int currElevation) { IHex hex = game.getBoard().getHex(c); if(hex.containsTerrain(Terrains.SPACE) && doomedInSpace()) { return true; } //gun emplacements must be placed on a building return !hex.containsTerrain(Terrains.BUILDING); }