public int getFullShots() { int fullShots = ((AmmoType)type).getShots(); if(unit != null) { Mounted m = unit.getEntity().getEquipment(equipmentNum); if(null != m && m.getOriginalShots() > 0) { fullShots = m.getOriginalShots(); } } if(null != unit && unit.getEntity() instanceof Protomech) { //if protomechs are using alternate munitions then cut in half if(((AmmoType)type).getMunitionType() != AmmoType.M_STANDARD) { fullShots = fullShots / 2; } } if(oneShot) { fullShots = 1; } return fullShots; }
if (entity.hasETypeFlag(Entity.ETYPE_BATTLEARMOR) || entity.hasETypeFlag(Entity.ETYPE_PROTOMECH)) { mounted.setAmmoCapacity(mounted.getOriginalShots() * ((AmmoType) mounted.getType()).getKgPerShot() * 1000); } else { mounted.setAmmoCapacity(mounted.getOriginalShots()
final String name = stripNotes(m.getName()); if (m.getType() instanceof AmmoType) { row.put("name", name.replaceAll("^BA\\s+", "") + " (" + m.getOriginalShots() + ")"); } else { row.put("name", stripNotes(m.getName())); row.put("mass", ((AmmoType) m.getType()).getKgPerShot() * m.getOriginalShots()); } else { row.put("mass", m.getType().getTonnage(ba) * 1000);
if (null == part) { part = new LargeCraftAmmoBin((int)entity.getWeight(), m.getType(), eqNum, m.getOriginalShots() - m.getBaseShotsLeft(), m.getAmmoCapacity(), campaign); ((LargeCraftAmmoBin) part).setBay(entity.getBayByAmmo(m)); toAdd.add(part);