From a990f68b8bfe586968702ec37d8eb7d69867fcf2 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 22 Nov 2011 13:00:16 +0000 Subject: [PATCH] fix git-svn-id: http://svn.net-core.org/repos/t-engine4@4667 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Actor.lua | 4 +++- game/modules/tome/dialogs/CharacterSheet.lua | 4 +++- game/modules/tome/dialogs/LevelupDialog.lua | 8 ++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 0bca8fdaf9..a8ff9c3c02 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -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) diff --git a/game/modules/tome/dialogs/CharacterSheet.lua b/game/modules/tome/dialogs/CharacterSheet.lua index d2bd3bba15..f80393789b 100644 --- a/game/modules/tome/dialogs/CharacterSheet.lua +++ b/game/modules/tome/dialogs/CharacterSheet.lua @@ -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") diff --git a/game/modules/tome/dialogs/LevelupDialog.lua b/game/modules/tome/dialogs/LevelupDialog.lua index 3dc5b13eb3..1af7d12d75 100644 --- a/game/modules/tome/dialogs/LevelupDialog.lua +++ b/game/modules/tome/dialogs/LevelupDialog.lua @@ -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 -- GitLab