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

Improve the effect of stats on physical/magical/mental saves (and denote them...

Improve the effect of stats on physical/magical/mental saves (and denote them correctly on tooltips)
Constitution bonus to life reduced a bit but it now also provides global damage reduction%


git-svn-id: http://svn.net-core.org/repos/t-engine4@2394 51575b47-30f0-44d4-a5cc-537603b46e54
parent 25ec9747
No related branches found
No related tags found
No related merge requests found
......@@ -1206,7 +1206,6 @@ function _M:levelup()
local amount = math.min(self.hate_rating, self.absolute_max_hate - self.max_hate)
self:incMaxHate(amount)
end
self:updateLife()
-- Heal up on new level
self:resetToFull()
......@@ -1257,7 +1256,8 @@ end
--- Notifies a change of stat value
function _M:onStatChange(stat, v)
if stat == self.STAT_CON then
self.max_life = self.max_life + 5 * v
self.max_life = self.max_life + 4 * v
self:updateConDamageReduction()
elseif stat == self.STAT_WIL then
self:incMaxMana(5 * v)
self:incMaxStamina(2 * v)
......@@ -1265,17 +1265,16 @@ function _M:onStatChange(stat, v)
elseif stat == self.STAT_STR then
self:checkEncumbrance()
end
self:updateLife()
end
function _M:updateLife()
-- if self.temp_life_perc then
-- self.max_life = self.max_life - self.temp_life_perc
-- end
-- local inc = self.max_life * 0.25
-- self.temp_life_perc = inc
-- self.max_life = self.max_life + inc
function _M:updateConDamageReduction()
self.resists.all = self.resists.all or 0
if self.temp_con_perc then
self.resists.all = self.resists.all - self.temp_con_perc
end
local inc = self:getCon() / 7
self.temp_con_perc = inc
self.resists.all = self.resists.all + inc
end
--- Called when a temporary value changes (added or deleted)
......
......@@ -649,17 +649,17 @@ end
--- Computes physical resistance
function _M:combatPhysicalResist()
return self.combat_physresist + (self:getCon() + self:getStr() + (self:getLck() - 50) * 0.5) * 0.25
return self.combat_physresist + (self:getCon() + self:getStr() + (self:getLck() - 50) * 0.5) * 0.35
end
--- Computes spell resistance
function _M:combatSpellResist()
return self.combat_spellresist + (self:getMag() + self:getWil() + (self:getLck() - 50) * 0.5) * 0.25
return self.combat_spellresist + (self:getMag() + self:getWil() + (self:getLck() - 50) * 0.5) * 0.35
end
--- Computes mental resistance
function _M:combatMentalResist()
return self.combat_mentalresist + (self:getCun() + self:getWil() + (self:getLck() - 50) * 0.5) * 0.25
return self.combat_mentalresist + (self:getCun() + self:getWil() + (self:getLck() - 50) * 0.5) * 0.35
end
--- Computes movement speed
......
......@@ -109,22 +109,22 @@ Those inscriptions give the bearer always accessible powers. Usually most people
-- 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 hit, your chance to resist physical effects, and carrying capacity.
Strength defines your character's ability to apply physical force. It increases your melee damage, damage done with heavy weapons, your chance to hit, your chance to save against 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.
Constitution defines your character's ability to withstand and resist damage. It increases your maximum life, your chance to save against physical effects and your global damage reduction.
]]
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.
Magic defines your character's ability to manipulate the magical energy of the world. It increases your spell power, your chance to save against magical effects, 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.
Willpower defines your character's ability to concentrate. It increases your mana and stamina capacity, and your chance to your chance to save against magical and mental effects.
]]
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 and critical chance.
Cunning defines your character's ability to learn, think, and react. It allows you to learn many worldly abilities, and increases your chance to save against mental effects 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
......
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