public void engineFix() { engineHit = false; unlockTurret(); for (Mounted m : getWeaponList()) { WeaponType wtype = (WeaponType) m.getType(); if (wtype.hasFlag(WeaponType.F_ENERGY)) { m.setBreached(false); // not destroyed, just // unpowered } } }
public boolean correctCriticals(StringBuffer buff) { Vector<Mounted> unallocated = new Vector<Mounted>(); boolean correct = true; for (Mounted mount : tank.getMisc()) { if (mount.getLocation() == Entity.LOC_NONE && !(mount.getType().getCriticals(tank) == 0)) { unallocated.add(mount); } } for (Mounted mount : tank.getWeaponList()) { if (mount.getLocation() == Entity.LOC_NONE) { unallocated.add(mount); } } for (Mounted mount : tank.getAmmo()) { int ammoType = ((AmmoType)mount.getType()).getAmmoType(); if ((mount.getLocation() == Entity.LOC_NONE) && (mount.getUsableShotsLeft() > 1 || ammoType == AmmoType.T_CRUISE_MISSILE )) { unallocated.add(mount); } } if (!unallocated.isEmpty()) { buff.append("Unallocated Equipment:\n"); for (Mounted mount : unallocated) { buff.append(mount.getType().getInternalName()).append("\n"); } correct = false; } return correct; }
for (Mounted mounted : getWeaponList()) { WeaponType wtype = (WeaponType) mounted.getType(); double dBV = wtype.getBV(this); for (Mounted possibleMG : getWeaponList()) { if (possibleMG.getType().hasFlag(WeaponType.F_MG) && (possibleMG.getLocation() == mounted
/** * apply the effects of an "engine hit" crit */ public void engineHit() { engineHit = true; immobilize(); lockTurret(getLocTurret()); lockTurret(getLocTurret2()); for (Mounted m : getWeaponList()) { WeaponType wtype = (WeaponType) m.getType(); if (wtype.hasFlag(WeaponType.F_ENERGY) // Chemical lasers still work even after an engine hit. && !(wtype instanceof CLChemicalLaserWeapon) // And presumably vehicle flamers should, too; we can always // remove this again if ruled otherwise. && !(wtype instanceof VehicleFlamerWeapon)) { m.setBreached(true); // not destroyed, just unpowered } } }
for (Mounted m : getWeaponList()) { if ((m.getLocation() == loc) && !m.isDestroyed() && !m.isJammed() && !m.isHit() for (Mounted m : getWeaponList()) { if (m.getLocation() == loc) { return CRIT_STABILIZER; for (Mounted m : getWeaponList()) { if ((m.getLocation() == loc) && !m.isDestroyed() && !m.isHit()) { switch (roll) { case 6: for (Mounted m : getWeaponList()) { if ((m.getLocation() == loc) && !m.isDestroyed() && !m.isJammed() && !m.isHit() for (Mounted m : getWeaponList()) { if (m.getLocation() == loc) { return CRIT_STABILIZER; for (Mounted m : getWeaponList()) { if ((m.getLocation() == loc) && !m.isDestroyed() && !m.isHit()) { case 6: if (!isStabiliserHit(loc)) { for (Mounted m : getWeaponList()) {
@Override public double getWeightPowerAmp() { if (getEntity().isSupportVehicle() && (getEntity().getWeight() < 5)) { return 0; } if (!engine.isFusion() && (engine.getEngineType() != Engine.FISSION)) { double weight = 0; for (Mounted m : tank.getWeaponList()) { WeaponType wt = (WeaponType) m.getType(); if (wt.hasFlag(WeaponType.F_ENERGY) && !(wt instanceof CLChemicalLaserWeapon) && !(wt instanceof VehicleFlamerWeapon)) { weight += wt.getTonnage(tank); } if ((m.getLinkedBy() != null) && (m.getLinkedBy().getType() instanceof MiscType) && m.getLinkedBy().getType(). hasFlag(MiscType.F_PPC_CAPACITOR)) { weight += ((MiscType)m.getLinkedBy().getType()).getTonnage(tank); } } return TestEntity.ceil(weight / 10, getWeightCeilingPowerAmp()); } return 0; }
double turretWeight = 0; double paWeight = 0; for (Mounted m : getWeaponList()) { WeaponType wt = (WeaponType) m.getType(); if (wt.hasFlag(WeaponType.F_LASER) || wt.hasFlag(WeaponType.F_PPC)) {