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

Added missing tooltips to the charsheet

git-svn-id: http://svn.net-core.org/repos/t-engine4@3803 51575b47-30f0-44d4-a5cc-537603b46e54
parent 4771ddf9
No related branches found
No related tags found
No related merge requests found
......@@ -283,3 +283,53 @@ All damage of this type that you receive, through any means, is reduced by this
TOOLTIP_SPECIFIC_IMMUNE = [[#GOLD#Effect resistance chance#LAST#
This represents your chance to completely avoid the effect in question.
]]
TOOLTIP_ON_HIT_DAMAGE = [[#GOLD#Damage when hit#LAST#
Each time a creature hits your in melee it will suffer damage.
]]
TOOLTIP_RESISTS_PEN_ALL = [[#GOLD#Damage penetration: all#LAST#
Reduces the amount of effective resistance of your foes to any damage you deal by this percent.
If you have 50% penetration against a creature with 50% resistance it will have an effective resistance of 25%.
This stacks with individual damage type penetrations.
]]
TOOLTIP_RESISTS_PEN = [[#GOLD#Damage penetration: specific#LAST#
Reduces the amount of effective resistance of your foes to all damage of this type you deal by this percent.
If you have 50% penetration against a creature with 50% resistance it will have an effective resistance of 25%.
]]
-------------------------------------------------------------
-- Misc
-------------------------------------------------------------
TOOLTIP_ESP = [[#GOLD#Telepathy#LAST#
Allows you to sense creatures of the given type(s) even if they are not currently in your line of sight.
]]
TOOLTIP_ESP_RANGE = [[#GOLD#Telepathy range#LAST#
Determines the distance up to which you can sense creatures with telepathy.
]]
TOOLTIP_ESP_ALL = [[#GOLD#Telepathy#LAST#
Allows you to sense any creatures even if they are not currently in your line of sight.
]]
TOOLTIP_VISION_LITE = [[#GOLD#Lite radius#LAST#
The maximun distance your lite can light up, anything further can not be see by natural means, unless the place itself is lit.
]]
TOOLTIP_VISION_SIGHT = [[#GOLD#Sight range#LAST#
How far your sight can see, this only works in lit areas.
]]
TOOLTIP_VISION_INFRA = [[#GOLD#Infravision#LAST#
A secondary sight that allows you to see even in the dark, but only creatures can be seen this way.
]]
TOOLTIP_VISION_STEALTH = [[#GOLD#Stealth#LAST#
To use stealth one must possess the 'Stealth' talent.
Stealth allows you to try to hide from any creatures that would otehrwise see you.
Even if they have seen you they will have a harder time hitting you.
Any creature can try to see you through stealth.
]]
TOOLTIP_VISION_SEE_STEALTH = [[#GOLD#See stealth#LAST#
Your power to see stealthed creatures, the higher it is the more likely you are to see them (based on their own stealth score).
]]
TOOLTIP_VISION_INVISIBLE = [[#GOLD#Invisibility#LAST#
Invisible creatures are magically removed from the sight of all others. They can only be see by creatures that can see invisible.
]]
TOOLTIP_VISION_SEE_INVISIBLE = [[#GOLD#See invisible#LAST#
Your power to see invisible creatures, the higher it is the more likely you are to see them (based on their own invisibility score).
If you do not have any see invisible score you will never be able to see invisible creatures.
]]
......@@ -388,31 +388,31 @@ function _M:drawDialog(kind, actor_to_compare)
s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Vision:", w, h, 255, 255, 255, true) h = h + self.font_h
text = compare_fields(player, actor_to_compare, "lite", "%d", "%+.0f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Light radius : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_VISION_LITE, s:drawColorStringBlended(self.font, ("Light radius : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
text = compare_fields(player, actor_to_compare, "sight", "%d", "%+.0f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Vision range : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_VISION_SIGHT, s:drawColorStringBlended(self.font, ("Vision range : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
text = compare_fields(player, actor_to_compare, "infravision", "%d", "%+.0f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Infravision : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_VISION_INFRA, s:drawColorStringBlended(self.font, ("Infravision : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
text = compare_fields(player, actor_to_compare, "stealth", "%.1f", "%+.1f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Stealth : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_VISION_STEALTH, s:drawColorStringBlended(self.font, ("Stealth : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
text = compare_fields(player, actor_to_compare, "see_stealth", "%.1f", "%+.1f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("See stealth : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_VISION_SEE_STEALTH, s:drawColorStringBlended(self.font, ("See stealth : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
text = compare_fields(player, actor_to_compare, "invisible", "%.1f", "%+.1f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Invisibility : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_VISION_INVISIBLE, s:drawColorStringBlended(self.font, ("Invisibility : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
text = compare_fields(player, actor_to_compare, "see_invisible", "%.1f", "%+.1f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("See invisible : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_VISION_SEE_INVISIBLE, s:drawColorStringBlended(self.font, ("See invisible : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
local any_esp = false
......@@ -444,7 +444,7 @@ function _M:drawDialog(kind, actor_to_compare)
if any_esp then
text = compare_fields(player, actor_to_compare, "esp_range", "%d", "%+.0f")
if text then
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Telepathy range: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_ESP_RANGE, s:drawColorStringBlended(self.font, ("Telepathy range: #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
end
......@@ -496,13 +496,13 @@ function _M:drawDialog(kind, actor_to_compare)
if any_esp then
h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("Telepathy of: "), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, ("Telepathy of: "), w, h, 255, 255, 255, true)) h = h + self.font_h
if not esps_compare["All"] then
for type, v in pairs(esps_compare) do
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("%s%s "):format(v[2] and (v[1] and "#GOLD#" or "#00ff00#") or "#ff0000#", type:capitalize()), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_ESP, s:drawColorStringBlended(self.font, ("%s%s "):format(v[2] and (v[1] and "#GOLD#" or "#00ff00#") or "#ff0000#", type:capitalize()), w, h, 255, 255, 255, true)) h = h + self.font_h
end
else
self:mouseTooltip(self.TOOLTIP_LIFE_REGEN, s:drawColorStringBlended(self.font, ("%sAll "):format(esps_compare["All"][1] and "#GOLD#" or "#00ff00#"), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_ESP_ALL, s:drawColorStringBlended(self.font, ("%sAll "):format(esps_compare["All"][1] and "#GOLD#" or "#00ff00#"), w, h, 255, 255, 255, true)) h = h + self.font_h
end
end
......@@ -662,6 +662,42 @@ function _M:drawDialog(kind, actor_to_compare)
end
end
h = 0
w = self.w * 0.75
s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Damage penetration.:", w, h, 255, 255, 255, true) h = h + self.font_h
if player.resists_pen.all then
text = compare_fields(player, actor_to_compare, function(actor, ...) return actor.resists_pen and actor.resists_pen.all or 0 end, "%3d%%", "%+.0f%%")
self:mouseTooltip(self.TOOLTIP_RESISTS_PEN_ALL, s:drawColorStringBlended(self.font, ("All damage : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
local resists_pens = {}
for i, t in ipairs(DamageType.dam_def) do
if player.resists_pen[DamageType[t.type]] and player.resists_pen[DamageType[t.type]] ~= 0 then
resists_pens[t] = resists_pens[t] or {}
resists_pens[t][1] = player.resists_pen[DamageType[t.type]]
end
if actor_to_compare and actor_to_compare.resists_pen[DamageType[t.type]] and actor_to_compare.resists_pen[DamageType[t.type]] ~= 0 then
resists_pens[t] = resists_pens[t] or {}
resists_pens[t][2] = actor_to_compare.resists_pen[DamageType[t.type]]
end
end
for i, ts in pairs(resists_pens) do
if ts[1] then
if ts[2] and ts[2] ~= ts[1] then
self:mouseTooltip(self.TOOLTIP_RESISTS_PEN, s:drawColorStringBlended(self.font, ("%s%-20s: #00ff00#%+d%%%s(%+.0f%%)"):format((i.text_color or "#WHITE#"), i.name:capitalize().."#LAST# damage", ts[1] + (player.resists_pen.all or 0), ts[2] > ts[1] and "#ff0000#" or "#00ff00#", ts[1] - ts[2] ), w, h, 255, 255, 255, true)) h = h + self.font_h
else
self:mouseTooltip(self.TOOLTIP_RESISTS_PEN, s:drawColorStringBlended(self.font, ("%s%-20s: #00ff00#%+d%%"):format((i.text_color or "#WHITE#"), i.name:capitalize().."#LAST# damage", ts[1] + (player.resists_pen.all or 0)), w, h, 255, 255, 255, true)) h = h + self.font_h
end
else
if ts[2] then
self:mouseTooltip(self.TOOLTIP_RESISTS_PEN, s:drawColorStringBlended(self.font, ("%s%-20s: #00ff00#%+d%%(%+.0f%%)"):format((i.text_color or "#WHITE#"), i.name:capitalize().."#LAST# damage", (player.resists_pen.all or 0),-ts[2] ), w, h, 255, 255, 255, true)) h = h + self.font_h
end
end
end
elseif kind=="defence" then
h = 0
w = 0
......@@ -758,7 +794,7 @@ function _M:drawDialog(kind, actor_to_compare)
for i, t in ipairs(DamageType.dam_def) do
if player.on_melee_hit[DamageType[t.type]] and player.on_melee_hit[DamageType[t.type]] ~= 0 then
self:mouseTooltip(self.TOOLTIP_INC_DAMAGE, s:drawColorStringBlended(self.font, ("%s%-10s#LAST#: #00ff00#%.2f"):format((t.text_color or "#WHITE#"), t.name:capitalize(), player.on_melee_hit[DamageType[t.type]]), w, h, 255, 255, 255, true)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_ON_HIT_DAMAGE, s:drawColorStringBlended(self.font, ("%s%-10s#LAST#: #00ff00#%.2f"):format((t.text_color or "#WHITE#"), t.name:capitalize(), player.on_melee_hit[DamageType[t.type]]), w, h, 255, 255, 255, true)) h = h + self.font_h
end
end
......
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