Skip to content
Snippets Groups Projects

1.6.6 misc2.21.14

Merged Chris Davidson requested to merge Shibari/t-engine4:1.6.6Misc into master
1 file
+ 11
7
Compare changes
  • Side-by-side
  • Inline
  • 4e15c4b4
    This was using a very naive combatDamage call on each slot instead of doing the interpreting the character sheet does.  Now they both use the same method, though I'm not 100% I covered all the special casing.
@@ -2098,7 +2098,8 @@ function _M:tooltip(x, y, seen_by)
local tst = ("#LIGHT_BLUE#Main:#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString()
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
tst:add(" ("..math.floor(self:combatDamage(o.combat))..")")
local stats = self:getCombatStats("mainhand", self.INVEN_MAINHAND, i )
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
table.append(ts, tst)
ts:add(true)
end
@@ -2107,8 +2108,9 @@ function _M:tooltip(x, y, seen_by)
for i, o in ipairs(self:getInven("OFFHAND")) do
local tst = ("#LIGHT_BLUE#Off :#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString()
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
tst:add(" ("..math.floor(self:combatDamage(o.combat))..")")
tst = tst:extractLines(true)[1]
local stats = self:getCombatStats("offhand", self.INVEN_OFFHAND, i)
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
table.append(ts, tst)
ts:add(true)
end
@@ -2118,7 +2120,8 @@ function _M:tooltip(x, y, seen_by)
local tst = ("#LIGHT_BLUE#Psi :#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString()
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
tst:add(" ("..math.floor(self:combatDamage(o.combat))..")")
local stats = self:getCombatStats("psionic", self.INVEN_PSIONIC_FOCUS, i)
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
table.append(ts, tst)
ts:add(true)
end
@@ -2128,7 +2131,6 @@ function _M:tooltip(x, y, seen_by)
local tst = ("#LIGHT_BLUE#Ammo:#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString()
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
tst:add(" ("..math.floor(self:combatDamage(o.combat))..")")
table.append(ts, tst)
ts:add(true)
end
@@ -2140,7 +2142,8 @@ function _M:tooltip(x, y, seen_by)
local tst = ("#LIGHT_BLUE#Unarmed:#LAST#"..o:getShortName({force_id=true, do_color=true, no_add_name=true})):toTString()
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
tst:add(" ("..math.floor(self:combatDamage(self.combat))..") ")
local stats = self:getCombatStats("barehand", self.INVEN_MAINHAND, i)
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
table.append(ts, tst)
ts:add(true)
end
@@ -2149,7 +2152,8 @@ function _M:tooltip(x, y, seen_by)
local tst = ("#LIGHT_BLUE#Unarmed:#LAST#"):toTString()
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
tst:add(" ("..math.floor(self:combatDamage(self.combat))..") ")
local stats = self:getCombatStats("barehand", self.INVEN_MAINHAND, i)
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
table.append(ts, tst)
ts:add(true)
end
Loading