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

Added tooltips to all character sheet info and to the left side pane

Added Mouse:delegate() method to allow delegation of mouse events to sub handlers


git-svn-id: http://svn.net-core.org/repos/t-engine4@1292 51575b47-30f0-44d4-a5cc-537603b46e54
parent ec1c9592
No related branches found
No related tags found
No related merge requests found
......@@ -170,6 +170,7 @@ function _M:registerDialog(d)
if d.key then d.key:setCurrent() end
if d.mouse then d.mouse:setCurrent() end
if d.on_register then d:on_register() end
if self.onRegisterDialog then self:onRegisterDialog(d) end
end
--- Undisplay a dialog, removing its own keyhandler if needed
......@@ -185,6 +186,7 @@ function _M:unregisterDialog(d)
if last.key then last.key:setCurrent() end
if last.mouse then last.mouse:setCurrent() end
if last.on_recover_focus then last:on_recover_focus() end
if self.onUnregisterDialog then self:onUnregisterDialog(d) end
end
--- The C core gives us command line arguments
......
......@@ -54,6 +54,18 @@ function _M:receiveMouseMotion(button, x, y, xrel, yrel)
end
end
--- Delegate an event from an other mouse handler
-- if self.delegate_offset_x and self.delegate_offset_y are set hey will be used to change the actual coordinates
function _M:delegate(button, mx, my, xrel, yrel, bx, by, event)
local ox, oy = (self.delegate_offset_x or 0), (self.delegate_offset_y or 0)
mx = mx - ox
my = my - oy
if event == "button" then self:receiveMouse(button, mx, my, true)
elseif event == "motion" then self:receiveMouseMotion(button, mx, my, xrel, yrel)
end
end
--- Setups as the current game keyhandler
function _M:setCurrent()
core.mouse.set_current_handler(self)
......
......@@ -485,10 +485,16 @@ function _M:display()
-- Icons
self:displayUIIcons()
-- Tooltip is displayed over all else
engine.GameTurnBased.display(self)
-- Tooltip is displayed over all else, even dialogs
self:targetDisplayTooltip(self.w, self.h)
end
engine.GameTurnBased.display(self)
--- Caleld when a dialog is registered to appear on screen
function _M:onRegisterDialog(d)
-- Clean up tooltip
self.tooltip_x, self.tooltip_y = nil, nil
end
function _M:setupCommands()
......@@ -790,6 +796,10 @@ function _M:setupMouse(reset)
self:mouseIcon(bx, by)
if button == "left" then self:clickIcon(bx, by) end
end)
-- Tooltip over the player pane
self.mouse:registerZone(self.player_display.display_x, self.player_display.display_y, self.player_display.w, self.player_display.h, function(button, mx, my, xrel, yrel, bx, by, event)
self.player_display.mouse:delegate(button, mx, my, xrel, yrel, bx, by, event)
end)
if not reset then self.mouse:setCurrent() end
end
......
......@@ -18,8 +18,10 @@
-- darkgod@te4.org
require "engine.class"
local Mouse = require "engine.Mouse"
local TooltipsData = require "mod.class.interface.TooltipsData"
module(..., package.seeall, class.make)
module(..., package.seeall, class.inherit(TooltipsData))
function _M:init(x, y, w, h, bgcolor)
self.display_x = x
......@@ -27,12 +29,15 @@ function _M:init(x, y, w, h, bgcolor)
self.w, self.h = w, h
self.bgcolor = bgcolor
self.font = core.display.newFont("/data/font/VeraMono.ttf", 14)
self.mouse = Mouse.new()
self:resize(x, y, w, h)
end
--- Resize the display area
function _M:resize(x, y, w, h)
self.display_x, self.display_y = x, y
self.mouse.delegate_offset_x = x
self.mouse.delegate_offset_y = y
self.w, self.h = w, h
self.font_h = self.font:lineSkip()
self.font_w = self.font:size(" ")
......@@ -53,105 +58,112 @@ function _M:resize(x, y, w, h)
self.bg_surface:merge(tex_up, 0, 0)
end
function _M:mouseTooltip(text, _, _, _, w, h, x, y)
self.mouse:registerZone(x, y, w, h, function(button) game.tooltip_x, game.tooltip_y = 1, 1; game.tooltip:displayAtMap(nil, nil, game.w, game.h, text) end)
end
-- Displays the stats
function _M:display()
local player = game.player
if not player or not player.changed then return self.surface end
self.mouse:reset()
local s = self.surface
if self.bg_surface then
self.surface:erase(self.bgcolor[1], self.bgcolor[2], self.bgcolor[3])
self.surface:merge(self.bg_surface, 0, 0)
s:erase(self.bgcolor[1], self.bgcolor[2], self.bgcolor[3])
s:merge(self.bg_surface, 0, 0)
else
self.surface:erase(self.bgcolor[1], self.bgcolor[2], self.bgcolor[3])
s:erase(self.bgcolor[1], self.bgcolor[2], self.bgcolor[3])
end
local cur_exp, max_exp = player.exp, player:getExpChart(player.level+1)
local h = 6
local x = 2
self.surface:drawColorStringBlended(self.font, "Level: #00ff00#"..player.level, x, h, 255, 255, 255) h = h + self.font_h
self.surface:drawColorStringBlended(self.font, ("Exp: #00ff00#%2d%%"):format(100 * cur_exp / max_exp), x, h, 255, 255, 255) h = h + self.font_h
self.surface:drawColorStringBlended(self.font, ("Gold: #00ff00#%0.2f"):format(player.money or 0), x, h, 255, 255, 255) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_LEVEL, s:drawColorStringBlended(self.font, "Level: #00ff00#"..player.level, x, h, 255, 255, 255)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_LEVEL, s:drawColorStringBlended(self.font, ("Exp: #00ff00#%2d%%"):format(100 * cur_exp / max_exp), x, h, 255, 255, 255)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_GOLD, s:drawColorStringBlended(self.font, ("Gold: #00ff00#%0.2f"):format(player.money or 0), x, h, 255, 255, 255)) h = h + self.font_h
h = h + self.font_h
if game.level and game.level.turn_counter then
self.surface:drawColorStringBlended(self.font, ("Turns remaining: %d"):format(game.level.turn_counter / 10), x, h, 255, 0, 0) h = h + self.font_h
s:drawColorStringBlended(self.font, ("Turns remaining: %d"):format(game.level.turn_counter / 10), x, h, 255, 0, 0) h = h + self.font_h
h = h + self.font_h
end
if player:getAir() < player.max_air then
self.surface:drawColorStringBlended(self.font, ("Air level: %d/%d"):format(player:getAir(), player.max_air), x, h, 255, 0, 0) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_AIR, s:drawColorStringBlended(self.font, ("Air level: %d/%d"):format(player:getAir(), player.max_air), x, h, 255, 0, 0)) h = h + self.font_h
h = h + self.font_h
end
self.surface:drawColorStringBlended(self.font, ("Str/Dex/Con: #00ff00#%3d/%3d/%3d"):format(player:getStr(), player:getDex(), player:getCon()), x, h, 255, 255, 255) h = h + self.font_h
self.surface:drawColorStringBlended(self.font, ("Mag/Wil/Cun: #00ff00#%3d/%3d/%3d"):format(player:getMag(), player:getWil(), player:getCun()), x, h, 255, 255, 255) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_STRDEXCON, s:drawColorStringBlended(self.font, ("Str/Dex/Con: #00ff00#%3d/%3d/%3d"):format(player:getStr(), player:getDex(), player:getCon()), x, h, 255, 255, 255)) h = h + self.font_h
self:mouseTooltip(self.TOOLTIP_MAGWILCUN, s:drawColorStringBlended(self.font, ("Mag/Wil/Cun: #00ff00#%3d/%3d/%3d"):format(player:getMag(), player:getWil(), player:getCun()), x, h, 255, 255, 255)) h = h + self.font_h
h = h + self.font_h
self.surface:erase(colors.VERY_DARK_RED.r, colors.VERY_DARK_RED.g, colors.VERY_DARK_RED.b, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(colors.DARK_RED.r, colors.DARK_RED.g, colors.DARK_RED.b, 255, self.bars_x, h, self.bars_w * player.life / player.max_life, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#c00000#Life: #ffffff#%d/%d"):format(player.life, player.max_life), x, h, 255, 255, 255) h = h + self.font_h
s:erase(colors.VERY_DARK_RED.r, colors.VERY_DARK_RED.g, colors.VERY_DARK_RED.b, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(colors.DARK_RED.r, colors.DARK_RED.g, colors.DARK_RED.b, 255, self.bars_x, h, self.bars_w * player.life / player.max_life, self.font_h)
self:mouseTooltip(self.TOOLTIP_LIFE, s:drawColorStringBlended(self.font, ("#c00000#Life: #ffffff#%d/%d"):format(player.life, player.max_life), x, h, 255, 255, 255)) h = h + self.font_h
if player.alchemy_golem and not player.alchemy_golem.dead then
self.surface:erase(colors.VERY_DARK_RED.r, colors.VERY_DARK_RED.g, colors.VERY_DARK_RED.b, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(colors.DARK_RED.r, colors.DARK_RED.g, colors.DARK_RED.b, 255, self.bars_x, h, self.bars_w * player.alchemy_golem.life / player.alchemy_golem.max_life, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#c00000#Golem: #ffffff#%d/%d"):format(player.alchemy_golem.life, player.alchemy_golem.max_life), x, h, 255, 255, 255) h = h + self.font_h
s:erase(colors.VERY_DARK_RED.r, colors.VERY_DARK_RED.g, colors.VERY_DARK_RED.b, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(colors.DARK_RED.r, colors.DARK_RED.g, colors.DARK_RED.b, 255, self.bars_x, h, self.bars_w * player.alchemy_golem.life / player.alchemy_golem.max_life, self.font_h)
self:mouseTooltip(self.TOOLTIP_LIFE, s:drawColorStringBlended(self.font, ("#c00000#Golem: #ffffff#%d/%d"):format(player.alchemy_golem.life, player.alchemy_golem.max_life), x, h, 255, 255, 255)) h = h + self.font_h
end
if player:knowTalent(player.T_STAMINA_POOL) then
self.surface:erase(0xff / 6, 0xcc / 6, 0x80 / 6, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(0xff / 3, 0xcc / 3, 0x80 / 3, 255, self.bars_x, h, self.bars_w * player:getStamina() / player.max_stamina, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#ffcc80#Stamina: #ffffff#%d/%d"):format(player:getStamina(), player.max_stamina), x, h, 255, 255, 255) h = h + self.font_h
s:erase(0xff / 6, 0xcc / 6, 0x80 / 6, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(0xff / 3, 0xcc / 3, 0x80 / 3, 255, self.bars_x, h, self.bars_w * player:getStamina() / player.max_stamina, self.font_h)
self:mouseTooltip(self.TOOLTIP_STAMINA, s:drawColorStringBlended(self.font, ("#ffcc80#Stamina: #ffffff#%d/%d"):format(player:getStamina(), player.max_stamina), x, h, 255, 255, 255)) h = h + self.font_h
end
if player:knowTalent(player.T_MANA_POOL) then
self.surface:erase(0x7f / 5, 0xff / 5, 0xd4 / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(0x7f / 2, 0xff / 2, 0xd4 / 2, 255, self.bars_x, h, self.bars_w * player:getMana() / player.max_mana, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#7fffd4#Mana: #ffffff#%d/%d"):format(player:getMana(), player.max_mana), x, h, 255, 255, 255) h = h + self.font_h
s:erase(0x7f / 5, 0xff / 5, 0xd4 / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(0x7f / 2, 0xff / 2, 0xd4 / 2, 255, self.bars_x, h, self.bars_w * player:getMana() / player.max_mana, self.font_h)
self:mouseTooltip(self.TOOLTIP_MANA, s:drawColorStringBlended(self.font, ("#7fffd4#Mana: #ffffff#%d/%d"):format(player:getMana(), player.max_mana), x, h, 255, 255, 255)) h = h + self.font_h
end
if player:knowTalent(player.T_EQUILIBRIUM_POOL) then
self.surface:erase(0x00 / 5, 0xff / 5, 0x74 / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(0x00 / 2, 0xff / 2, 0x74 / 2, 255, self.bars_x, h, self.bars_w * math.min(1, math.log(1 + player:getEquilibrium() / 100)), self.font_h)
self.surface:drawColorStringBlended(self.font, ("#00ff74#Equi: #ffffff#%d"):format(player:getEquilibrium()), x, h, 255, 255, 255) h = h + self.font_h
s:erase(0x00 / 5, 0xff / 5, 0x74 / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(0x00 / 2, 0xff / 2, 0x74 / 2, 255, self.bars_x, h, self.bars_w * math.min(1, math.log(1 + player:getEquilibrium() / 100)), self.font_h)
self:mouseTooltip(self.TOOLTIP_EQUILIBRIUM, s:drawColorStringBlended(self.font, ("#00ff74#Equi: #ffffff#%d"):format(player:getEquilibrium()), x, h, 255, 255, 255)) h = h + self.font_h
end
if player:knowTalent(player.T_POSITIVE_POOL) then
self.surface:erase(colors.GOLD.r / 5, colors.GOLD.g / 5, colors.GOLD.b / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(colors.GOLD.r / 2, colors.GOLD.g / 2, colors.GOLD.b / 2, 255, self.bars_x, h, self.bars_w * player:getPositive() / player.max_positive, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#7fffd4#Positive:#ffffff#%d/%d"):format(player:getPositive(), player.max_positive), x, h, 255, 255, 255) h = h + self.font_h
s:erase(colors.GOLD.r / 5, colors.GOLD.g / 5, colors.GOLD.b / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(colors.GOLD.r / 2, colors.GOLD.g / 2, colors.GOLD.b / 2, 255, self.bars_x, h, self.bars_w * player:getPositive() / player.max_positive, self.font_h)
self:mouseTooltip(self.TOOLTIP_POSITIVE, s:drawColorStringBlended(self.font, ("#7fffd4#Positive:#ffffff#%d/%d"):format(player:getPositive(), player.max_positive), x, h, 255, 255, 255)) h = h + self.font_h
end
if player:knowTalent(player.T_NEGATIVE_POOL) then
self.surface:erase(colors.GREY.r / 5, colors.GREY.g / 5, colors.GREY.b / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(colors.GREY.r / 2, colors.GREY.g / 2, colors.GREY.b / 2, 255, self.bars_x, h, self.bars_w * player:getNegative() / player.max_negative, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#7fffd4#Negative:#ffffff#%d/%d"):format(player:getNegative(), player.max_negative), x, h, 255, 255, 255) h = h + self.font_h
s:erase(colors.GREY.r / 5, colors.GREY.g / 5, colors.GREY.b / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(colors.GREY.r / 2, colors.GREY.g / 2, colors.GREY.b / 2, 255, self.bars_x, h, self.bars_w * player:getNegative() / player.max_negative, self.font_h)
self:mouseTooltip(self.TOOLTIP_NEGATIVE, s:drawColorStringBlended(self.font, ("#7fffd4#Negative:#ffffff#%d/%d"):format(player:getNegative(), player.max_negative), x, h, 255, 255, 255)) h = h + self.font_h
end
if player:knowTalent(player.T_VIM_POOL) then
self.surface:erase(0x90 / 6, 0x40 / 6, 0x10 / 6, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(0x90 / 3, 0x40 / 3, 0x10 / 3, 255, self.bars_x, h, self.bars_w * player:getVim() / player.max_vim, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#904010#Vim: #ffffff#%d/%d"):format(player:getVim(), player.max_vim), x, h, 255, 255, 255) h = h + self.font_h
s:erase(0x90 / 6, 0x40 / 6, 0x10 / 6, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(0x90 / 3, 0x40 / 3, 0x10 / 3, 255, self.bars_x, h, self.bars_w * player:getVim() / player.max_vim, self.font_h)
self:mouseTooltip(self.TOOLTIP_VIM, s:drawColorStringBlended(self.font, ("#904010#Vim: #ffffff#%d/%d"):format(player:getVim(), player.max_vim), x, h, 255, 255, 255)) h = h + self.font_h
end
if player:knowTalent(player.T_HATE_POOL) then
self.surface:erase(colors.GREY.r / 5, colors.GREY.g / 5, colors.GREY.b / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
self.surface:erase(colors.GREY.r / 2, colors.GREY.g / 2, colors.GREY.b / 2, 255, self.bars_x, h, self.bars_w * player:getHate() / 10, self.font_h)
self.surface:drawColorStringBlended(self.font, ("#F53CBE#Hate: #ffffff#%.1f/%d"):format(player:getHate(), 10), x, h, 255, 255, 255) h = h + self.font_h
s:erase(colors.GREY.r / 5, colors.GREY.g / 5, colors.GREY.b / 5, 255, self.bars_x, h, self.bars_w, self.font_h)
s:erase(colors.GREY.r / 2, colors.GREY.g / 2, colors.GREY.b / 2, 255, self.bars_x, h, self.bars_w * player:getHate() / 10, self.font_h)
self:mouseTooltip(self.TOOLTIP_HATE, s:drawColorStringBlended(self.font, ("#F53CBE#Hate: #ffffff#%.1f/%d"):format(player:getHate(), 10), x, h, 255, 255, 255)) h = h + self.font_h
end
if savefile_pipe.saving then h = h + self.font_h self.surface:drawColorStringBlended(self.font, "#YELLOW#Saving...", x, h, 255, 255, 255) h = h + self.font_h end
if savefile_pipe.saving then h = h + self.font_h s:drawColorStringBlended(self.font, "#YELLOW#Saving...", x, h, 255, 255, 255) h = h + self.font_h end
h = h + self.font_h
for tid, act in pairs(player.sustain_talents) do
if act then self.surface:drawColorStringBlended(self.font, ("#LIGHT_GREEN#%s"):format(player:getTalentFromId(tid).name), x, h, 255, 255, 255) h = h + self.font_h end
if act then s:drawColorStringBlended(self.font, ("#LIGHT_GREEN#%s"):format(player:getTalentFromId(tid).name), x, h, 255, 255, 255) h = h + self.font_h end
end
for eff_id, p in pairs(player.tmp) do
local e = player.tempeffect_def[eff_id]
if e.status == "detrimental" then
self.surface:drawColorStringBlended(self.font, ("#LIGHT_RED#%s"):format(e.desc), x, h, 255, 255, 255) h = h + self.font_h
s:drawColorStringBlended(self.font, ("#LIGHT_RED#%s"):format(e.desc), x, h, 255, 255, 255) h = h + self.font_h
else
self.surface:drawColorStringBlended(self.font, ("#LIGHT_GREEN#%s"):format(e.desc), x, h, 255, 255, 255) h = h + self.font_h
s:drawColorStringBlended(self.font, ("#LIGHT_GREEN#%s"):format(e.desc), x, h, 255, 255, 255) h = h + self.font_h
end
end
self.surface:updateTexture(self.texture)
return self.surface
s:updateTexture(self.texture)
return s
end
function _M:toScreen()
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
require "engine.class"
module(..., package.seeall, class.make)
-------------------------------------------------------------
-- Ressources
-------------------------------------------------------------
TOOLTIP_GOLD = [[#GOLD#Gold#LAST#
Money!
With gold you can buy items in the various stores in town.
You can gain money by looting it from your foes, by selling items and by doing some quests.
]]
TOOLTIP_LIFE = [[#GOLD#Life#LAST#
This is your life force, when you take damage this is reduced more and more.
If it reaches below zero you die.
Death is usualy permanent so beware!
It is increased by Constitution.]]
TOOLTIP_AIR = [[#GOLD#Air#LAST#
The breath counter only appears when you are suffocating.
If it reaches zero you will die. Being stuck in a wall, being in deep water, ... all those kind of situations will decrease your air.
When you come back into a breathable atmosphere you will slowly regain your air level.
]]
TOOLTIP_STAMINA = [[#GOLD#Stamina#LAST#
Stamina represents your physical fatigue. Each physical ability used reduces it.
It regenerates slowly over time or when resting.
It is increased by Willpower.]]
TOOLTIP_MANA = [[#GOLD#Mana#LAST#
Mana represents your reserve of magical energies. Each spell cast consumes mana and each sustained spell reduces your maximum mana.
It is increased by Willpower.]]
TOOLTIP_POSITIVE = [[#GOLD#Positive#LAST#
Positive energy represents your reserve of positive "divine" power.
It slowly decreases and is replenished by using some talents.
]]
TOOLTIP_NEGATIVE = [[#GOLD#Negative#LAST#
Negative energy represents your reserve of negative "divine" power.
It slowly decreases and is replenished by using some talents.
]]
TOOLTIP_VIM = [[#GOLD#Vim#LAST#
Vim represents the amount of life energy/souls you have stolen. Each corruption talent requires some.
]]
TOOLTIP_EQUILIBRIUM = [[#GOLD#Equilibrium#LAST#
Equilibrium represents your standing in the grand balance of nature.
The closer it is to 0 the more in-balance you are. Being out of equilibrium will negatively affect your ability to use Wild Gifts.
]]
TOOLTIP_VIM = [[#GOLD#Hate#LAST#
Hate represents your inner rage against all that lives and dares face you.
It slowly decreases and is replenished by killing creatures.
All afflicted talents are based on Hate, the higher hate is the more effective the talents are.
]]
TOOLTIP_LEVEL = [[#GOLD#Level and experience#LAST#
Each time you kill a creature that is over your own level - 5 you gain some experience.
When you reach enough experience you advance to the next level. There is a maximum of 50 levels you can gain.
Each time you level you gain stats and talents points to use to improve your character.
]]
-------------------------------------------------------------
-- Stats
-------------------------------------------------------------
TOOLTIP_STR = [[#GOLD#Strength#LAST#
Strength defines your character's ability to apply physical force. It increases your melee damage, damage done with heavy weapons, your chance to resist physical effects, and carrying capacity.
]]
TOOLTIP_DEX = [[#GOLD#Dexterity#LAST#
Dexterity defines your character's ability to be agile and alert. It increases your chance to hit, your ability to avoid attacks, and your damage with light weapons.
]]
TOOLTIP_CON = [[#GOLD#Constitution#LAST#
Constitution defines your character's ability to withstand and resist damage. It increases your maximum life and physical resistance.
]]
TOOLTIP_MAG = [[#GOLD#Magic#LAST#
Magic defines your character's ability to manipulate the magical energy of the world. It increases your spell power, and the effect of spells and other magic items.
]]
TOOLTIP_WIL = [[#GOLD#Willpower#LAST#
Willpower defines your character's ability to concentrate. It increases your mana and stamina capacity, and your chance to resist mental attacks.
]]
TOOLTIP_CUN = [[#GOLD#Cunning#LAST#
Cunning defines your character's ability to learn, think, and react. It allows you to learn many worldly abilities, and increases your mental resistance, armor penetration, and critical chance.
]]
TOOLTIP_STRDEXCON = "#AQUAMARINE#Physical stats#LAST#\n---\n"..TOOLTIP_STR.."\n---\n"..TOOLTIP_DEX.."\n---\n"..TOOLTIP_CON
TOOLTIP_MAGWILCUN = "#AQUAMARINE#Mental stats#LAST#\n---\n"..TOOLTIP_MAG.."\n---\n"..TOOLTIP_WIL.."\n---\n"..TOOLTIP_CUN
-------------------------------------------------------------
-- Melee
-------------------------------------------------------------
TOOLTIP_COMBAT_ATTACK = [[#GOLD#Attack chance#LAST#
Your attack value represents your chance to hit your opponents, it is mesured directly against the target's defense rating.
It is improved by both Strength and Dexterity.
]]
TOOLTIP_COMBAT_DAMAGE = [[#GOLD#Damage#LAST#
This is the damage you inflict on your foes when you hit them.
This damage can be reduced by the target's armour or by percentile damage resistances.
It is improved by both Strength and Dexterity, some talents can change the stats that affect it.
]]
TOOLTIP_COMBAT_APR = [[#GOLD#Armour Penetration#LAST#
Armour penetration allows you to ignore a part of the target's armour (this only works for armour, not damage resistance).
This can never increase the damage you do beyond reducing armour, so it is only useful against armoured foes.
]]
TOOLTIP_COMBAT_CRIT = [[#GOLD#Critical chance#LAST#
Each time you deal damage you have a chance to make a critical hit that deals 150% of the normal damage.
Some talents allow you to increase this percentage.
It is improved by Cunning.
]]
TOOLTIP_COMBAT_SPEED = [[#GOLD#Attack speed#LAST#
Attack speed represents how fast your attacks are compared to a normal turn.
The lowest it is the fastest your attacks are.
]]
-------------------------------------------------------------
-- Defense
-------------------------------------------------------------
TOOLTIP_FATIGUE = [[#GOLD#Fatigue#LAST#
Fatigue is a percentile value that increases the cost of all your talents and spells.
It represents the fatigue created by wearing heavy equipment.
Not all talents are affected, notably Wild Gifts are not.
]]
TOOLTIP_ARMOR = [[#GOLD#Armour#LAST#
Armour value is a flat damage reduction substracted from every incoming melee and ranged physical attacks.
This is countered by armour penetration and is applied before all kinds of critical damage increase, talent multipliers and damage multiplier, thus making even small amounts have greater effects.
]]
TOOLTIP_DEFENSE = [[#GOLD#Defense#LAST#
Defense represents your chance to avoid being hit at all by a melee attack, it is mesured against the attacker's attack chance.
]]
TOOLTIP_RDEFENSE = [[#GOLD#Ranged Defense#LAST#
Ranged defense represents your chance to avoid being hit at all by a ranged attack, it is mesured against the attacker's attack chance.
]]
TOOLTIP_PHYS_SAVE = [[#GOLD#Physical saving throw#LAST#
This value represents your resistance against physical attacks induced special effects, like bleeding, stuns, knockbacks, ...
It is mesured against your target's attack.
]]
TOOLTIP_SPELL_SAVE = [[#GOLD#Spell saving throw#LAST#
This value represents your resistance against spell attacks induced special effects, like freezes, knockbacks, ...
It is mesured against your target's spellpower.
]]
TOOLTIP_MENTAL_SAVE = [[#GOLD#Mental saving throw#LAST#
This value represents your resistance against mental attacks induced special effects, like confusion, fear, ...
It is mesured against your target's spellpower or mental power.
]]
-------------------------------------------------------------
-- Spells
-------------------------------------------------------------
TOOLTIP_SPELL_POWER = [[#GOLD#Spellpower#LAST#
Your spellpower value represents how
It is improved by both Magic, some talents can change the stats that affect it.
]]
TOOLTIP_SPELL_CRIT = [[#GOLD#Spell critical chance#LAST#
Each time you deal damage with a spell you have a chance to make a critical hit that deals 150% of the normal damage.
Some talents allow you to increase this percentage.
It is improved by Cunning.
]]
TOOLTIP_SPELL_SPEED = [[#GOLD#Spellcasting speed#LAST#
Spellcasting speed represents how fast your spellcasting is compared to a normal turn.
The lowest it is the fastest it is.
]]
-------------------------------------------------------------
-- Damage and resists
-------------------------------------------------------------
TOOLTIP_INC_DAMAGE_ALL = [[#GOLD#Damage increase: all#LAST#
All damage you deal, through any means, is increased by this percentage.
This stacks with individual damage type increases.
]]
TOOLTIP_INC_DAMAGE = [[#GOLD#Damage increase: specific#LAST#
All damage of this type that you deal, through any means, is increased by this percentage.
]]
TOOLTIP_RESIST_ALL = [[#GOLD#Damage resistance: all#LAST#
All damage you receieve, through any means, is decreased by this percentage.
This stacks with individual damage type resistances.
]]
TOOLTIP_RESIST = [[#GOLD#Damage resistance: specific#LAST#
All damage of this type that you receive, through any means, is reduced by this percentage.
]]
TOOLTIP_SPECIFIC_IMMUNE = [[#GOLD#Effect resistance chance#LAST#
This represents your chance to completly avoid the effect in question.
]]
This diff is collapsed.
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