• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
Undo, just comment out cap operation
Line 243: Line 243:  
function ShipCapabilities:_is_midget_submarine(equipment)
 
function ShipCapabilities:_is_midget_submarine(equipment)
 
return equipment:type() == 22
 
return equipment:type() == 22
 +
end
 +
 +
function ShipCapabilities:_attack_power_cap(attack_power, cap)
 +
--if attack_power > cap then
 +
-- return math.floor(cap + math.sqrt(attack_power - cap))
 +
--end
 +
return math.floor(attack_power)
 
end
 
end
   Line 263: Line 270:  
end
 
end
 
end
 
end
return 1, firepower + 5
+
return 1, self:_attack_power_cap(firepower + 5, 150)
 
end
 
end
 
else
 
else
Line 294: Line 301:  
end
 
end
 
if has_planes then
 
if has_planes then
return is_installation and 3 or 2, 1.5 * (firepower + torpedo) + bombing * 2 + 55
+
return is_installation and 3 or 2, self:_attack_power_cap(1.5 * (firepower + torpedo) + bombing * 2 + 55, 150)
 
end
 
end
 
end
 
end
Line 323: Line 330:  
end
 
end
 
end
 
end
return torpedo + 5
+
return self:_attack_power_cap(torpedo + 5, 150)
 
end
 
end
 
return false
 
return false
Line 419: Line 426:  
if self:_is_carrier() then
 
if self:_is_carrier() then
 
if has_planes and self._ship:night_bombing() then
 
if has_planes and self._ship:night_bombing() then
return 8, firepower + torpedo
+
return 8, self:_attack_power_cap(firepower + torpedo, 300)
 
end
 
end
 
return false
 
return false
 
else
 
else
 
if torpedoes >= 2 and torpedo > 0 then
 
if torpedoes >= 2 and torpedo > 0 then
return 7, (firepower + torpedo) * 1.5
+
return 7, self:_attack_power_cap((firepower + torpedo) * 1.5, 300)
 
elseif main_guns >= 3 and firepower > 0 then
 
elseif main_guns >= 3 and firepower > 0 then
return 4, (firepower + torpedo) * 2
+
return 4, self:_attack_power_cap((firepower + torpedo) * 2, 300)
 
elseif main_guns >= 2 and secondary_guns >= 1 and firepower > 0 then
 
elseif main_guns >= 2 and secondary_guns >= 1 and firepower > 0 then
return 5, (firepower + torpedo) * 1.75
+
return 5, self:_attack_power_cap((firepower + torpedo) * 1.75, 300)
 
elseif main_guns >= 1 and torpedoes == 1 and firepower > 0 and torpedo > 0 then
 
elseif main_guns >= 1 and torpedoes == 1 and firepower > 0 and torpedo > 0 then
return 6, (firepower + torpedo) * 1.3
+
return 6, self:_attack_power_cap((firepower + torpedo) * 1.3, 300)
 
elseif main_guns + secondary_guns >= 2 and firepower > 0 then
 
elseif main_guns + secondary_guns >= 2 and firepower > 0 then
return 3, (firepower + torpedo) * 1.2
+
return 3, self:_attack_power_cap((firepower + torpedo) * 1.2, 300)
 
elseif torpedoes > 0 and torpedo > 0 then
 
elseif torpedoes > 0 and torpedo > 0 then
return 2, firepower + torpedo
+
return 2, self:_attack_power_cap(firepower + torpedo, 300)
 
elseif firepower > 0 then
 
elseif firepower > 0 then
return 1, firepower + torpedo
+
return 1, self:_attack_power_cap(firepower + torpedo, 300)
 
else
 
else
 
return false
 
return false
Line 481: Line 488:  
end
 
end
 
if opening_torpedo then
 
if opening_torpedo then
return torpedo + 5
+
return self:_attack_power_cap(torpedo + 5, 150)
 
end
 
end
 
return false
 
return false
Line 527: Line 534:  
depth_charge_sonar_boost = 1.15
 
depth_charge_sonar_boost = 1.15
 
end
 
end
return depth_charge_sonar_boost * (base_asw + 2 * equipment_asw + ship_asw / 5), day, night, not asw_leveled
+
return self:_attack_power_cap(depth_charge_sonar_boost * (base_asw + 2 * equipment_asw + ship_asw / 5), 100), day, night, not asw_leveled
 
end
 
end
   Line 561: Line 568:  
local attack_power = (equipment_torpedo + equipment_bombing) * math.sqrt(size) + 25
 
local attack_power = (equipment_torpedo + equipment_bombing) * math.sqrt(size) + 25
 
if self:_is_torpedo_bomber(equipment) then
 
if self:_is_torpedo_bomber(equipment) then
table.insert(airstrikes, attack_power * 1.5)
+
table.insert(airstrikes, self:_attack_power_cap(attack_power * 1.5, 150))
 
else
 
else
table.insert(airstrikes, attack_power)
+
table.insert(airstrikes, self:_attack_power_cap(attack_power, 150))
 
end
 
end
 
end
 
end
Anonymous user

Navigation menu