Line 202: |
Line 202: |
| ! colspan="2" |Offence | | ! colspan="2" |Offence |
| ! colspan="3" |Defence | | ! colspan="3" |Defence |
| + | |- |
| !style="width:60px;"|Rank | | !style="width:60px;"|Rank |
| !style="width:85px;"|Name | | !style="width:85px;"|Name |
Line 294: |
Line 295: |
| local setup = setups[name] or setups[type_code] | | local setup = setups[name] or setups[type_code] |
| | | |
− | local air_power = Combat.air_power(ship) | + | if type_code == "CV" then |
− | | + | local air_power = Combat.air_power(ship) |
− | return format{
| + | return format{ |
− | template,
| + | template, |
− | rank = rank,
| + | rank = rank, |
− | name = note and format{'[[${name}|<span title="${note}">${name}</span>]]<sup>?</sup>', name = name, note = note} or
| + | name = note and format{'[[${name}|<span title="${note}">${name}</span>]]<sup>?</sup>', name = name, note = note} or |
− | string.format("[[%s]]", name),
| + | string.format("[[%s]]", name), |
− | fp = ship._firepower_max,
| + | fp = ship._firepower_max, |
− | torp = ship._torpedo_max or "",
| + | torp = ship._torpedo_max or "", |
− | fp_plus_torp = ship._firepower_max + (ship._torpedo_max or 0),
| + | hp = ship._hp, |
− | db_attack = format_damage(ship, Combat.shelling, nil, setup, "main", setup and setup.spotting, true),
| + | armor = ship._armor_max, |
− | db_torp = format_damage(ship, Combat.torpedo, nil, setup, "torpedo"),
| + | evasion_rate = string.format("%s%%, %s%%", Combat.evasion_rate(ship), Combat.evasion_rate(ship, true)), |
− | nb_da = format_damage(ship, Combat.night_battle, Combat.modifier.night_attack.double, setup, "main"),
| + | slot_all = air_power.slot_all, |
− | nb_ci = format_damage(ship, Combat.night_battle, Combat.modifier.night_attack.cut_in.torpedo, setup, "torpedo"),
| + | slot1 = air_power.slot1, |
− | luck_minus_cap = luck_diff < 0 and "−" .. -luck_diff or luck_diff,
| + | slot2 = air_power.slot2, |
− | nb_ci_rate = Combat.nb_cut_in_rate(ship, Combat.nb_cut_in_types.torpedo) .. '%',
| + | slot3 = air_power.slot3, |
− | hp = ship._hp,
| + | slot4 = air_power.slot4, |
− | armor = ship._armor_max,
| + | aerial = "", |
− | evasion_rate =
| + | shelling = "", |
− | string.format("%s%%, %s%%",
| + | } |
− | Combat.evasion_rate(ship),
| + | else |
− | Combat.evasion_rate(ship, true)),
| + | return format{ |
− | slot_all = air_power.slot_all,
| + | template, |
− | slot1 = air_power.slot1,
| + | rank = rank, |
− | slot2 = air_power.slot2,
| + | name = note and format{'[[${name}|<span title="${note}">${name}</span>]]<sup>?</sup>', name = name, note = note} or |
− | slot3 = air_power.slot3,
| + | string.format("[[%s]]", name), |
− | slot4 = air_power.slot4,
| + | fp = ship._firepower_max, |
− | }
| + | torp = ship._torpedo_max or "", |
| + | fp_plus_torp = ship._firepower_max + (ship._torpedo_max or 0), |
| + | db_attack = format_damage(ship, Combat.shelling, nil, setup, "main", setup and setup.spotting, true), |
| + | db_torp = format_damage(ship, Combat.torpedo, nil, setup, "torpedo"), |
| + | nb_da = format_damage(ship, Combat.night_battle, Combat.modifier.night_attack.double, setup, "main"), |
| + | nb_ci = format_damage(ship, Combat.night_battle, Combat.modifier.night_attack.cut_in.torpedo, setup, "torpedo"), |
| + | luck_minus_cap = luck_diff < 0 and "−" .. -luck_diff or luck_diff, |
| + | nb_ci_rate = Combat.nb_cut_in_rate(ship, Combat.nb_cut_in_types.torpedo) .. '%', |
| + | hp = ship._hp, |
| + | armor = ship._armor_max, |
| + | evasion_rate = string.format("%s%%, %s%%", Combat.evasion_rate(ship), Combat.evasion_rate(ship, true)), |
| + | } |
| + | end |
| + | |
| else | | else |
| return "" | | return "" |