Skip to content
Snippets Groups Projects
Commit a990f68b authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@4667 51575b47-30f0-44d4-a5cc-537603b46e54
parent fc8e9eb5
No related branches found
No related tags found
No related merge requests found
......@@ -1027,7 +1027,9 @@ function _M:tooltip(x, y, seen_by)
ts:add(self.type:capitalize(), " / ", self.subtype:capitalize(), true)
ts:add("Rank: ") ts:merge(rank_color:toTString()) ts:add(rank, {"color", "WHITE"}, true)
ts:add({"color", 0, 255, 255}, ("Level: %d"):format(self.level), {"color", "WHITE"}, true)
ts:add({"color", 255, 0, 0}, ("HP: %d (%d%%)"):format(self.life, self.life * 100 / self.max_life), {"color", "WHITE"}, true)
if self.life < 0 then ts:add({"color", 255, 0, 0}, "HP: unknown", {"color", "WHITE"}, true)
else ts:add({"color", 255, 0, 0}, ("HP: %d (%d%%)"):format(self.life, self.life * 100 / self.max_life), {"color", "WHITE"}, true)
end
if self:attr("encased_in_ice") then
local eff = self:hasEffect(self.EFF_FROZEN)
......
......@@ -331,7 +331,9 @@ function _M:drawDialog(kind, actor_to_compare)
h = h + self.font_h
text = compare_fields(player, actor_to_compare, "max_life", "%d", "%+.0f")
self:mouseTooltip(self.TOOLTIP_LIFE, s:drawColorStringBlended(self.font, ("#c00000#Life: #00ff00#%d/%s"):format(player.life, text), w, h, 255, 255, 255, true)) h = h + self.font_h
if player.life < 0 then self:mouseTooltip(self.TOOLTIP_LIFE, s:drawColorStringBlended(self.font, ("#c00000#Life: #00ff00#???/%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
else self:mouseTooltip(self.TOOLTIP_LIFE, s:drawColorStringBlended(self.font, ("#c00000#Life: #00ff00#%d/%s"):format(player.life, text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
if player:knowTalent(player.T_STAMINA_POOL) then
text = compare_fields(player, actor_to_compare, "max_stamina", "%d", "%+.0f")
......
......@@ -410,11 +410,9 @@ function _M:getStatDescription(stat_id)
text = text.."Accuracy: "..color..(diff * 0.35).."#LAST#\n"
end
elseif stat_id == self.actor.STAT_STR then
text = text.."Physical power: "..color..(diff).."#LAST#\n"
text = text.."Max encumberance: "..color..(diff * 1.8).."#LAST#\n"
text = text.."Physical save: "..color..(diff * 0.35).."#LAST#\n"
if not self.actor.use_psi_combat then
text = text.."Accuracy: "..color..(diff * 0.35).."#LAST#\n"
end
elseif stat_id == self.actor.STAT_CUN then
text = text.."Spell/Physical crit. chance: "..color..(diff * 0.3).."#LAST#\n"
text = text.."Mental save: "..color..(diff * 0.35).."#LAST#\n"
......@@ -428,9 +426,7 @@ function _M:getStatDescription(stat_id)
elseif stat_id == self.actor.STAT_DEX then
text = text.."Defense: "..color..(diff * 0.35).."#LAST#\n"
text = text.."Ranged defense: "..color..(diff * 0.35).."#LAST#\n"
if not self.actor.use_psi_combat then
text = text.."Accuracy: "..color..(diff * 0.35).."#LAST#\n"
end
text = text.."Accuracy: "..color..(diff).."#LAST#\n"
end
if self.actor.player and self.desc_def and self.desc_def.getStatDesc and self.desc_def.getStatDesc(stat_id, self.actor) then
......
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