Skip to content
Snippets Groups Projects
Commit ace91e5d authored by Chris Davidson's avatar Chris Davidson
Browse files

Add mana, vim, negative, and positive displays to Actor tooltips if the player knows Antimagic

parent afc92f3f
No related branches found
No related tags found
No related merge requests found
......@@ -1901,6 +1901,22 @@ function _M:tooltip(x, y, seen_by)
else ts:add({"color", 0, 255, 255}, ("Level: %d"):format(self.level), {"color", "WHITE"}, true) end
if self:attr("invulnerable") then ts:add({"color", "PURPLE"}, "INVULNERABLE!", true) end
ts:add({"color", 255, 0, 0}, ("HP: %d (%d%%) #GREEN#+%0.2f#LAST#"):format(self.life, self.life * 100 / self.max_life, self.life_regen * util.bound(self.healing_factor or 1)), {"color", "WHITE"})
-- Avoid cluttering tooltip if resources aren't relevant (add menu option?)
if game.player:knowTalentType("wild-gift/antimagic") then
if self:knowTalent(self.T_MANA_POOL) then
ts:add(("\nMana: "..self.resources_def.mana.color.."%d / %d#LAST#"):format(self.mana, self.max_mana, true))
end
if self:knowTalent(self.T_VIM_POOL) then
ts:add(("\nVim: "..self.resources_def.vim.color.."%d / %d#LAST#"):format(self.vim, self.max_vim, true))
end
if self:knowTalent(self.T_POSITIVE_POOL) then
ts:add(("\nPositive: "..self.resources_def.positive.color.."%d / %d#LAST#"):format(self.positive, self.max_positive, true))
end
if self:knowTalent(self.T_NEGATIVE_POOL) then
ts:add(("\nNegative: "..self.resources_def.negative.color.."%d / %d#LAST#"):format(self.negative, self.max_negative, true))
end
end
if self:knowTalent(self.T_SOLIPSISM) then
local psi_percent = 100*self.psi/self.max_psi
......
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