Changes

invalid asw value for some equipments from http://ja.kancolle.wikia.com/wiki/%E5%AF%BE%E6%BD%9C
Line 246: Line 246:  
function ShipCapabilities:_is_depth_charge(equipment)
 
function ShipCapabilities:_is_depth_charge(equipment)
 
return equipment:type() == 15
 
return equipment:type() == 15
 +
end
 +
 +
-- small main guns', recon sea planes' and radars' asw is invalid
 +
function ShipCapabilities:_is_unable_asw_equip(equipment)
 +
local equipment_type = equipment:type()
 +
return equipment_type == 1
 +
or equipment_type == 10
 +
or equipment_type == 12
 +
or equipment_type == 13
 +
or equipment_type == 93
 
end
 
end
   Line 621: Line 631:  
bomber = true
 
bomber = true
 
end
 
end
equipment_asw = equipment_asw + (equipment:asw_leveled() or 0)
+
-- some equipments's asw value is invalid
 +
if not _is_unable_asw_equip(equipment) then
 +
    equipment_asw = equipment_asw + (equipment:asw_leveled() or 0)
 +
end
 
end
 
end
 
end
 
end
Anonymous user