public void applyDamage(){
  for (  Mounted mounted : getEquipment()) {
    if (mounted.isHit()) {
      mounted.setDestroyed(true);
    }
  }
  for (int i=0; i < locations(); i++) {
    for (int j=0; j < getNumberOfCriticals(i); j++) {
      final CriticalSlot cs=getCritical(i,j);
      if ((cs != null) && cs.isHit()) {
        cs.setDestroyed(true);
      }
    }
  }
  for (int i=0; i < locations(); i++) {
    setLocationBlownOffThisPhase(i,false);
  }
  for (int i=0; i < locations(); i++) {
    if (getInternal(i) == IArmorState.ARMOR_DOOMED) {
      setArmor(IArmorState.ARMOR_DESTROYED,i);
      setArmor(IArmorState.ARMOR_DESTROYED,i,true);
      setInternal(IArmorState.ARMOR_DESTROYED,i);
      for (Iterator<NarcPod> iter=narcPods.iterator(); iter.hasNext(); ) {
        NarcPod p=iter.next();
        if (p.getLocation() == i) {
          iter.remove();
        }
      }
      for (Iterator<INarcPod> iter=iNarcPods.iterator(); iter.hasNext(); ) {
        INarcPod p=iter.next();
        if (p.getLocation() == i) {
          iter.remove();
        }
      }
      for (Iterator<NarcPod> iter=pendingNarcPods.iterator(); iter.hasNext(); ) {
        NarcPod p=iter.next();
        if (p.getLocation() == i) {
          iter.remove();
        }
      }
      for (Iterator<INarcPod> iter=pendingINarcPods.iterator(); iter.hasNext(); ) {
        INarcPod p=iter.next();
        if (p.getLocation() == i) {
          iter.remove();
        }
      }
    }
  }
}

public void applyDamage ( ) { for ( Mounted mounted : getEquipment ( ) ) { if ( mounted . isHit ( ) ) { mounted . setDestroyed ( true ) ; } } for ( int i = 0 ; i < locations ( ) ; i ++ ) { for ( int j = 0 ; j < getNumberOfCriticals ( i ) ; j ++ ) { final CriticalSlot cs = getCritical ( i , j ) ; if ( ( cs != null ) && cs . isHit ( ) ) { cs . setDestroyed ( true ) ; } } } for ( int i = 0 ; i < locations ( ) ; i ++ ) { setLocationBlownOffThisPhase ( i , false ) ; } for ( int i = 0 ; i < locations ( ) ; i ++ ) { if ( getInternal ( i ) == IArmorState . ARMOR_DOOMED ) { setArmor ( IArmorState . ARMOR_DESTROYED , i ) ; setArmor ( IArmorState . ARMOR_DESTROYED , i , true ) ; setInternal ( IArmorState . ARMOR_DESTROYED , i ) ; for ( Iterator < NarcPod > iter = narcPods . iterator ( ) ; iter . hasNext ( ) ; ) { NarcPod p = iter . next ( ) ; if ( p . getLocation ( ) == i ) { iter . remove ( ) ; } } for ( Iterator < INarcPod > iter = iNarcPods . iterator ( ) ; iter . hasNext ( ) ; ) { INarcPod p = iter . next ( ) ; if ( p . getLocation ( ) == i ) { iter . remove ( ) ; } } for ( Iterator < NarcPod > iter = pendingNarcPods . iterator ( ) ; iter . hasNext ( ) ; ) { NarcPod p = iter . next ( ) ; if ( p . getLocation ( ) == i ) { iter . remove ( ) ; } } for ( Iterator < INarcPod > iter = pendingINarcPods . iterator ( ) ; iter . hasNext ( ) ; ) { INarcPod p = iter . next ( ) ; if ( p . getLocation ( ) == i ) { iter . remove ( ) ; } } } } }
applies any damage that the entity has suffered . when anything gets hit it is simply marked as " hit " but does not stop working until this is called .
