Line 87: |
Line 87: |
| local row1, row2, row3, row4 = {}, {}, {}, {} | | local row1, row2, row3, row4 = {}, {}, {}, {} |
| local los, fighter_power = 0, 0 | | local los, fighter_power = 0, 0 |
| + | local ship_item1, ship_item2 |
| for index, item_key in ipairs(self._args) do | | for index, item_key in ipairs(self._args) do |
| local item | | local item |
Line 95: |
Line 96: |
| if mw.ustring.find(item_key, '/') then | | if mw.ustring.find(item_key, '/') then |
| item = self._item_class(self:process_item_key(item_key)) | | item = self._item_class(self:process_item_key(item_key)) |
| + | if ship_item1 == nil then |
| + | ship_item1 = item |
| + | else |
| + | ship_item2 = item |
| + | end |
| else | | else |
| item = self._equip_class(self:process_item_key(item_key)) | | item = self._equip_class(self:process_item_key(item_key)) |
Line 104: |
Line 110: |
| + Searchlight LoS x (0.91) + √(base LoS of each ship) x (1.69) | | + Searchlight LoS x (0.91) + √(base LoS of each ship) x (1.69) |
| + (HQ Lv. rounded up to the next multiple of 5) x (-0.61)--]] | | + (HQ Lv. rounded up to the next multiple of 5) x (-0.61)--]] |
| + | local ship |
| + | if (index - 1) % 10 < 5 then |
| + | ship = ship_item1 |
| + | else |
| + | ship = ship_item2 |
| + | end |
| local slot_number = (index - 1) % 5 | | local slot_number = (index - 1) % 5 |
| local multiplier = { | | local multiplier = { |
Line 118: |
Line 130: |
| los = los + (item:los() * multiplier[item:type()]) | | los = los + (item:los() * multiplier[item:type()]) |
| end | | end |
− | fighter_power = fighter_power + math.floor(math.sqrt(select(2, item:slot(slot_number)))) | + | fighter_power = fighter_power + math.floor(math.sqrt(select(2, ship:slot(slot_number)))) |
| end | | end |
| end | | end |