892
edits
mNo edit summary |
mNo edit summary |
||
Line 27: | Line 27: | ||
result = result..'||'..p._getDungeonTotalHP(dung, true) -- accountForEnemyDR = true | result = result..'||'..p._getDungeonTotalHP(dung, true) -- accountForEnemyDR = true | ||
local minDR = | local minDR = p._getDungeonMinDR(dung, 1000, 0.4) | ||
result = result..'||'..minDR["Melee"].."%" | --result = result..'||'..minDR["Melee"].."%" | ||
result = result..'||'..minDR["Ranged"].."%" | --result = result..'||'..minDR["Ranged"].."%" | ||
result = result..'||'..minDR["Magic"].."%" | --result = result..'||'..minDR["Magic"].."%" | ||
result = result..'||'..pm._getDungeonRewards(dung, false) | result = result..'||'..pm._getDungeonRewards(dung, false) | ||
Line 49: | Line 49: | ||
for i, monsterID in Shared.skpairs(dung.monsters) do | for i, monsterID in Shared.skpairs(dung.monsters) do | ||
local monster = Monsters.getMonsterByID(monsterID) | local monster = Monsters.getMonsterByID(monsterID) | ||
if monster == nil and monsterID == -1 then -- affliction doesn't deal any damage | |||
return maxHitsPerMonsterStyle | |||
end | |||
local styleName = Constants.getCombatStyleName(monster.attackType) | local styleName = Constants.getCombatStyleName(monster.attackType) | ||
local maxHit = Monsters._getMonsterMaxHit(monster, true) -- doStuns = true | local maxHit = Monsters._getMonsterMaxHit(monster, true) -- doStuns = true | ||
if maxHit > maxHitsPerMonsterStyle[styleName] then | |||
if styleName == "Random" then | |||
for randomStyle, value in Shared.skpairs(maxHitsPerMonsterStyle) do | |||
if maxHit > value then | |||
maxHitsPerMonsterStyle[randomStyle] = maxHit | |||
end | |||
end | |||
else | |||
if maxHit > maxHitsPerMonsterStyle[styleName] then | |||
maxHitsPerMonsterStyle[styleName] = maxHit | |||
end | |||
end | end | ||
end | end | ||
Line 114: | Line 127: | ||
for tier, aevalue in Shared.skpairs(AutoEatValues) do | for tier, aevalue in Shared.skpairs(AutoEatValues) do | ||
mw.log(aevalue) | --mw.log(aevalue) | ||
end | end | ||
Line 125: | Line 138: | ||
local calculateDr = accountForEnemyDR or false | local calculateDr = accountForEnemyDR or false | ||
totalHp = 0 | totalHp = 0 | ||
for i, monsterID in Shared.skpairs(dung.monsters) do | for i, monsterID in Shared.skpairs(dung.monsters) do | ||
local monster = Monsters.getMonsterByID(monsterID) | local monster = Monsters.getMonsterByID(monsterID) | ||
Line 140: | Line 152: | ||
local monsterPostReductionHP = math.floor(monsterHp / (1-dr)) | local monsterPostReductionHP = math.floor(monsterHp / (1-dr)) | ||
totalHp = totalHp + monsterPostReductionHP | totalHp = totalHp + monsterPostReductionHP | ||
end | end | ||
return totalHp | return totalHp |
edits