Module:Sandbox/FushiTest: Difference between revisions

m
Kills/Damage required
m (Another effective hp fix)
m (Kills/Damage required)
Line 1,136: Line 1,136:


     for i, v in ipairs(monsterResults) do
     for i, v in ipairs(monsterResults) do
    local killsRequired = Shared.round2(quantity/(v.dropChance/100), 0)
   
         table.insert(output, '|-')
         table.insert(output, '|-')
         table.insert(output, '| '..Icons.Icon({v.monster.name, type="monster"}))
         table.insert(output, '| '..Icons.Icon({v.monster.name, type="monster"}))
         table.insert(output, '| '..Shared.formatnum(v.effectiveHp))
         table.insert(output, '| '..Shared.formatnum(v.effectiveHp))
         table.insert(output, '| '..v.dropChance..'%')
         table.insert(output, '| '..v.dropChance..'%')
         table.insert(output, '| {{#invoke:Shared|formatNumber|{{#expr:'..(quantity/(v.dropChance/100))..' round 0}}}}')
         table.insert(output, '| '..Shared.formatnum(killsRequired))
         table.insert(output, '| {{#invoke:Shared|formatNumber|{{#expr:('..(quantity/(v.dropChance/100))..' round 0) *'..v.effectiveHp..'}}}}')
         table.insert(output, '| '..Shared.formatnum(killsRequired * v.effectiveHp))
     end
     end


20

edits