@Override protected double getConvInfantryStandardDamage(int range, Infantry inf) { if (inf.getPrimaryWeapon() == null) { return inf.getDamagePerTrooper() * TROOP_FACTOR[Math.min(inf.getShootingStrength(), 30)] / 10.0; } else { return 0; } }
protected double getConvInfantryStandardDamage(int range, Infantry inf) { if (inf.getPrimaryWeapon() == null) { int baseDamage = (int)Math.ceil(inf.getDamagePerTrooper() * inf.getShootingStrength()); return Compute.calculateClusterHitTableAmount(7, baseDamage) / 10.0; } else { return 0; } }
Infantry inf = (Infantry) entity; sWeapons.append("Primary Weapon: "); if (null == inf.getPrimaryWeapon()) { sWeapons.append("None\n"); } else { sWeapons.append(inf.getPrimaryWeapon().getDesc() + "\n");
if(infantry.getSecondaryN() > 1 && null != infantry.getSecondaryWeapon()) { model = "(" + infantry.getSecondaryWeapon().getInternalName() + ")"; } else if(null != infantry.getPrimaryWeapon()) { model = "(" + infantry.getPrimaryWeapon().getInternalName() + ")";
setModelData("transportWeight", inf.getWeight()); setModelData("weaponPrimary", String.format("%d %s", (inf.getSquadSize() - inf.getSecondaryN()) * inf.getSquadN(), inf.getPrimaryWeapon().getName())); if (inf.getSecondaryWeapon() != null) { setModelData("weaponSecondary", String.format("%d %s", inf.getSecondaryN() * inf.getSquadN(), inf.getPrimaryWeapon().getName())); } else { setModelData("weaponSecondary", Messages.getString("TROView.None")); setModelData("squadCount", inf.getSquadN()); setModelData("armorDivisor", inf.getDamageDivisor()); InfantryWeapon rangeWeapon = inf.getPrimaryWeapon(); if (inf.getSecondaryN() > 1) { rangeWeapon = inf.getSecondaryWeapon();
InfantryWeapon primary_weapon = attacker.getPrimaryWeapon(); InfantryWeapon secondary_weapon = attacker.getSecondaryWeapon();
InfantryWeapon primaryType = ((Infantry)entity).getPrimaryWeapon(); InfantryWeapon secondaryType = ((Infantry)entity).getSecondaryWeapon(); if(null == primaryW && null != primaryType) {
if (((Infantry)en).getSecondaryWeapon() != null && ((Infantry)en).getSecondaryN() >= 2) { baseRange = ((Infantry)en).getSecondaryWeapon().getInfantryRange(); } else if (((Infantry)en).getPrimaryWeapon() != null){ baseRange = ((Infantry)en).getPrimaryWeapon().getInfantryRange();
Infantry inf = (Infantry) entity; retVal.add(new LabeledElement("Primary Weapon", (null != inf.getPrimaryWeapon())? inf.getPrimaryWeapon().getDesc() : "None")); retVal.add(new LabeledElement("Secondary Weapon", (null != inf.getSecondaryWeapon())?
blk.writeBlockData("secondn", infantry.getSecondaryN()); if (null != infantry.getPrimaryWeapon()) { blk.writeBlockData("Primary", infantry.getPrimaryWeapon() .getInternalName());