Anonymous

Module:Items/ComparisonTables: Difference between revisions

From Melvor Idle
defenceBonus->meleeDefenceBonus
(Fixed strengthBonus not showing up properly)
(defenceBonus->meleeDefenceBonus)
Line 22: Line 22:
   --Getting some lists set up here that will be used later
   --Getting some lists set up here that will be used later
   --First, the list of columns used by both weapons & armour
   --First, the list of columns used by both weapons & armour
   local statColumns = {'stabAttackBonus', 'slashAttackBonus','blockAttackBonus','rangedAttackBonus', 'magicAttackBonus', 'meleeStrengthBonus', 'rangedStrengthBonus', 'magicDamageBonus', 'defenceBonus', 'rangedDefenceBonus', 'magicDefenceBonus', 'damageReduction', 'attackLevelRequired', 'defenceLevelRequired', 'rangedLevelRequired', 'magicLevelRequired'}
   local statColumns = {'stabAttackBonus', 'slashAttackBonus','blockAttackBonus','rangedAttackBonus', 'magicAttackBonus', 'meleeStrengthBonus', 'rangedStrengthBonus', 'magicDamageBonus', 'meleeDefenceBonus', 'rangedDefenceBonus', 'magicDefenceBonus', 'damageReduction', 'attackLevelRequired', 'defenceLevelRequired', 'rangedLevelRequired', 'magicLevelRequired'}


   if(Shared.tableCount(itemList) == 0) then
   if(Shared.tableCount(itemList) == 0) then
Line 130: Line 130:
   end
   end
   --Defence bonuses
   --Defence bonuses
   if Shared.contains(statColumns, 'defenceBonus') then
   if Shared.contains(statColumns, 'meleeDefenceBonus') then
     table.insert(resultPart, '\r\n!style="padding:0 1em 0 0.5em;"|'..Icons.Icon({'Defence', type='skill', notext='true'}))
     table.insert(resultPart, '\r\n!style="padding:0 1em 0 0.5em;"|'..Icons.Icon({'Defence', type='skill', notext='true'}))
   end
   end