Skip to content
Snippets Groups Projects
Commit 13b91a5c authored by DarkGod's avatar DarkGod
Browse files

sanity check even though I have *zero* idea how this could happen

parent c8cff4ce
No related branches found
No related tags found
No related merge requests found
......@@ -2099,7 +2099,7 @@ function _M:tooltip(x, y, seen_by)
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
local stats = self:getCombatStats("mainhand", self.INVEN_MAINHAND, i )
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
if stats then tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)") end
table.append(ts, tst)
ts:add(true)
end
......@@ -2110,7 +2110,7 @@ function _M:tooltip(x, y, seen_by)
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
local stats = self:getCombatStats("offhand", self.INVEN_OFFHAND, i)
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
if stats then tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)") end
table.append(ts, tst)
ts:add(true)
end
......@@ -2121,7 +2121,7 @@ function _M:tooltip(x, y, seen_by)
tst = tst:splitLines(game.tooltip.max-1, game.tooltip.font, 2)
tst = tst:extractLines(true)[1]
local stats = self:getCombatStats("psionic", self.INVEN_PSIONIC_FOCUS, i)
tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)")
if stats then tst:add(" (#RED#"..math.floor(stats.dmg).."#LAST#)") end
table.append(ts, tst)
ts:add(true)
end
......
......@@ -322,7 +322,7 @@ function _M:onTakeHit(value, src, death_note)
if src then
if src.targetable and not self.ai_target.actor and not (self.never_anger and self:reactionToward(src) > 0) then self:setTarget(src) end
-- Get angry if hurt by a friend
if src.faction and self:reactionToward(src) >= 0 and self.fov then
if src.faction and self:reactionToward(src) >= 0 and self.fov and self.checkAngered then
self:checkAngered(src, false, -50)
-- Share reaction with allies
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment