Because of the recent shipyard changes, shipyards were not being picked up as bombardment targets. I have modified the planetary bombardment code so that each hit has a 10% chance of hitting a shipyard (if any exist). If a shipyard is hit the following process is followed:
If the shipyard has slipways, the chance of a slipway being destroyed is equal to the (Damage Caused / (Capacity / 1000)) * 100. Which means that if a 4 point warhead hit a shipyard with slipways of 10,000 capacity, the chance of a slipway being destroyed is 40% (4 / (10000/1000))*100. This is an all or nothing situation, like a ship system being hit.
If a the last slipway is destroyed, the capacity of the shipyard is set to 1000 (like a starting shipyard).
If a shipyard with no slipways is hit, the hit is applied against the shipyard directly, which is treated a 10,000 ton slipway for purposes of determining if it is destroyed. If this is a successful hit, that shipyard is destroyed and a new shipyard would have to be built to replace it.
If a shipyard has more current tasks than slipways due to the destruction of slipways, the excess tasks are removed and any partially built ships forming those tasks are destroyed. Tasks are removed in order of least accumulated build points.
Steve