Line 271: |
Line 271: |
| end | | end |
| | | |
− | -- Basic attack power for shelling and carrier shelling, including anti-installation modifiers. | + | -- Basic attack power for shelling and carrier shelling, including anti-installation modifiers and fleet firepower. |
− | function ShipCapabilities:day_battle(vs_installation) | + | function ShipCapabilities:day_battle(vs_installation, fleet_firepower) |
| if not self:_is_submarine() then | | if not self:_is_submarine() then |
| local firepower = self._ship:firepower_leveled() | | local firepower = self._ship:firepower_leveled() |
Line 296: |
Line 296: |
| firepower = firepower + (anti_installation.wg_equiped and 75 or 0) | | firepower = firepower + (anti_installation.wg_equiped and 75 or 0) |
| end | | end |
− | return 1, (5 + firepower) * anti_installation_modifier | + | return 1, (5 + (fleet_firepower or 0) + firepower) * anti_installation_modifier |
| end | | end |
| else | | else |
Line 350: |
Line 350: |
| end | | end |
| | | |
− | -- Basic attack power for closing torpedo. | + | -- Basic attack power for closing torpedo, including fleet torpedo. |
− | function ShipCapabilities:closing_torpedo() | + | function ShipCapabilities:closing_torpedo(fleet_torpedo) |
| local torpedo = self._ship:torpedo_leveled() | | local torpedo = self._ship:torpedo_leveled() |
| if torpedo and torpedo > 0 then | | if torpedo and torpedo > 0 then |
Line 363: |
Line 363: |
| end | | end |
| end | | end |
− | return 5 + torpedo | + | return 5 + (fleet_torpedo or 0) + torpedo |
| end | | end |
| return false | | return false |
Line 453: |
Line 453: |
| | | |
| -- Basic attack power for night battle carrier shelling. | | -- Basic attack power for night battle carrier shelling. |
− | -- Or basic attack power for night battle attack, including night special attack and anti-installation modifiers. | + | -- Or basic attack power for night battle attack, including night special attack, anti-installation and contact modifiers. |
− | function ShipCapabilities:night_battle(vs_installation) | + | function ShipCapabilities:night_battle(vs_installation, contact) |
| local main_guns, secondary_guns, torpedoes, has_planes, firepower, torpedo = 0, 0, 0, false, self._ship:firepower_leveled(), self._ship:torpedo_leveled() | | local main_guns, secondary_guns, torpedoes, has_planes, firepower, torpedo = 0, 0, 0, false, self._ship:firepower_leveled(), self._ship:torpedo_leveled() |
| if not firepower or not torpedo then | | if not firepower or not torpedo then |
Line 491: |
Line 491: |
| anti_installation_modifier = anti_installation.type_3_shell_equiped and 2.5 or 1 | | anti_installation_modifier = anti_installation.type_3_shell_equiped and 2.5 or 1 |
| firepower = firepower + (anti_installation.wg_equiped and 75 or 0) | | firepower = firepower + (anti_installation.wg_equiped and 75 or 0) |
| + | end |
| + | if contact then |
| + | firepower = firepower + 5 |
| end | | end |
| if self:_is_carrier() then | | if self:_is_carrier() then |
Line 532: |
Line 535: |
| end | | end |
| | | |
− | -- Basic attack power for opening torpedo. | + | -- Basic attack power for opening torpedo, including fleet torpedo. |
− | function ShipCapabilities:opening_torpedo() | + | function ShipCapabilities:opening_torpedo(fleet_torpedo) |
| local torpedo = self._ship:torpedo_leveled() | | local torpedo = self._ship:torpedo_leveled() |
| local opening_torpedo = self._ship:opening_torpedo() | | local opening_torpedo = self._ship:opening_torpedo() |
Line 558: |
Line 561: |
| end | | end |
| if opening_torpedo then | | if opening_torpedo then |
− | return 5 + torpedo | + | return 5 + (fleet_torpedo or 0) + torpedo |
| end | | end |
| return false | | return false |