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

Talent descriptions will now display the damage done after the percentile damage bonuses

git-svn-id: http://svn.net-core.org/repos/t-engine4@1329 51575b47-30f0-44d4-a5cc-537603b46e54
parent 5839a25c
No related branches found
No related tags found
No related merge requests found
Showing
with 59 additions and 43 deletions
......@@ -38,6 +38,22 @@ newTalent = function(t)
return oldNewTalent(t)
end
damDesc = function(self, type, dam)
-- Difficulty settings
if game.difficulty == game.DIFFICULTY_NIGHTMARE then
if self:resolveSource().player then dam = dam * 0.7 end
elseif game.difficulty == game.DIFFICULTY_INSANE then
if self:resolveSource().player then dam = dam * 0.5 end
end
-- Increases damage
if self.inc_damage then
local inc = (self.inc_damage.all or 0) + (self.inc_damage[type] or 0)
dam = dam + (dam * inc / 100)
end
return dam
end
load("/data/talents/misc/misc.lua")
load("/data/talents/techniques/techniques.lua")
load("/data/talents/cunning/cunning.lua")
......
......@@ -39,7 +39,7 @@ newTalent{
end,
info = function(self, t)
return ([[Conjures up spear of bones doing %0.2f physical damage to all targets in line.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 20, 200))
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.PHYSICAL, self:combatTalentSpellDamage(t, 20, 200)))
end,
}
......@@ -82,7 +82,7 @@ newTalent{
return ([[Grab a target and teleport it to your side, pinning it there with a bone rising from the ground for %d turns.
The bone will also deal %0.2f physical damage.
The damage will increase with your Magic stat.]]):
format(math.floor(3 + self:getTalentLevel(t)), self:combatTalentSpellDamage(t, 5, 140))
format(math.floor(3 + self:getTalentLevel(t)), damDesc(self, DamageType.PHYSICAL, self:combatTalentSpellDamage(t, 5, 140)))
end,
}
......@@ -103,7 +103,7 @@ newTalent{
end,
info = function(self, t)
return ([[Fire bone spears in all directions, hitting all your foes for %0.2f physical damage.
The damage will increase with your Magic stat.]]):format(self:combatTalentSpellDamage(t, 8, 180))
The damage will increase with your Magic stat.]]):format(damDesc(self, DamageType.PHYSICAL, self:combatTalentSpellDamage(t, 8, 180)))
end,
}
......
......@@ -103,7 +103,7 @@ newTalent{
end,
info = function(self, t)
return ([[Curses your target, stopping any natural healing and dealing %0.2f darkness damage each turn.
The resistances will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 70))
The resistances will decrease with Magic stat.]]):format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 10, 70)))
end,
}
......
......@@ -73,7 +73,7 @@ newTalent{
end,
info = function(self, t)
return ([[Hexes your target. Each time it uses a resource (stamina, mana, vim, ...) it takes %0.2f fire damage.
The damage will increase with Magic stat.]]):format(self:combatTalentSpellDamage(t, 4, 90))
The damage will increase with Magic stat.]]):format(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 4, 90)))
end,
}
......
......@@ -53,7 +53,7 @@ newTalent{
info = function(self, t)
return ([[Fires a bolt of pure filth, diseasing your target with a random disease doing %0.2f blight damage per turns for 6 turns and reducing one of its physical stats (strength, constitution, dexterity) by %d.
The effect will increase with your Magic stat.]]):
format(self:combatTalentSpellDamage(t, 5, 45), self:combatTalentSpellDamage(t, 5, 25))
format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 5, 45)), self:combatTalentSpellDamage(t, 5, 25))
end,
}
......@@ -112,7 +112,7 @@ newTalent{
return ([[Make your target's diseases burst, doing %0.2f blight damage for each disease it is infected with.
This will also spread the diseases to any nearby foes in a radius of 1.
The damage will increase with your Magic stat.]]):
format(self:combatTalentSpellDamage(t, 15, 85))
format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 85)))
end,
}
......@@ -221,6 +221,6 @@ newTalent{
info = function(self, t)
return ([[Infects the target with a very contagious disease doing %0.2f damage per turn for 6 turns.
If any blight damage from non-diseases hits the target, the epidemic will activate and spread diseases to nearby targets.]]):
format(self:combatTalentSpellDamage(t, 15, 50))
format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 50)))
end,
}
......@@ -86,6 +86,6 @@ newTalent{
return ([[Your blood turns into an acidic mixture. When you get hit the attacker is splashed with acid.
This deals %0.2f acid damage each turn for 5 turns and reduces the attacker attack by %d.
At level 3 it will also reduce armour by %d.]]):
format(self:combatTalentSpellDamage(t, 5, 30), self:combatTalentSpellDamage(t, 15, 35), self:combatTalentSpellDamage(t, 15, 40))
format(damDesc(self, DamageType.ACID, self:combatTalentSpellDamage(t, 5, 30)), self:combatTalentSpellDamage(t, 15, 35), self:combatTalentSpellDamage(t, 15, 40))
end,
}
......@@ -76,9 +76,9 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Fires a bolt of blight, doing %0.2f damage and replenishing 20%% of it as vim energy.
return ([[Fires a bolt of blight, doing %0.2f blight damage and replenishing 20%% of it as vim energy.
The effect will increase with your Magic stat.]]):
format(self:combatTalentSpellDamage(t, 15, 200))
format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 200)))
end,
}
......
......@@ -88,7 +88,7 @@ newTalent{
info = function(self, t)
return ([[Concentrate on the corruption you bring, enhancing each of your melee strikes with %0.2f blight damage.
The damage will increase with your Magic stat.]]):
format(self:combatTalentSpellDamage(t, 15, 40))
format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 40)))
end,
}
......@@ -127,7 +127,7 @@ newTalent{
info = function(self, t)
return ([[Strike with each of your weapons, doing %d%% acid weapon damage. If at least one of the strikes hits an acid splash is generated doing %0.2f acid damage.
The splash damage will increase with your Magic stat.]]):
format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.6), self:combatTalentSpellDamage(t, 10, 130))
format(100 * self:combatTalentWeaponDamage(t, 0.8, 1.6), damDesc(self, DamageType.ACID, self:combatTalentSpellDamage(t, 10, 130)))
end,
}
......
......@@ -32,8 +32,8 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Channel raw magical energy into your melee attacks, each doing %d damage and costing %.2f mana.]]):
format(3 + self:getTalentLevel(t) * 2, 1 + self:getTalentLevelRaw(t) / 1.5)
return ([[Channel raw magical energy into your melee attacks, each doing %d darkness damage and costing %.2f mana.]]):
format(damDesc(self, DamageType.DARKNESS, 3 + self:getTalentLevel(t) * 2), 1 + self:getTalentLevelRaw(t) / 1.5)
end,
}
......
......@@ -215,7 +215,7 @@ newTalent{
require = cursed_wil_req3,
points = 5,
info = function(self, t)
local baseDamage = 30 + self:getWil() * 0.4 * self:getTalentLevel(t)
local baseDamage = damDesc(self, DamageType.BLIGHT, 30 + self:getWil() * 0.4 * self:getTalentLevel(t))
local attackStrength = 0.3 + self:getTalentLevel(t) * 0.12
local effectiveness = getWillFailureEffectiveness(self, 30, 95, attackStrength)
return ([[Your rage builds within you for 20 turns, then unleashes itself for %d to %d hate-based blight damage on the first one to enter your gloom. (%d effectiveness)]]):format(baseDamage * .5, baseDamage * 1.5, effectiveness)
......
......@@ -65,7 +65,7 @@ newTalent{
return ([[Chant the glory of the sun, granting you %d physical and spell save.
In addition it surrounds you with a shield of light, damaging anything that attacks you for %0.2f light damage.
You may only have one Chant active at once.
The resistance and damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 5, 70), self:combatTalentSpellDamage(t, 5, 25))
The resistance and damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 5, 70), damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 5, 25)))
end,
}
......@@ -103,7 +103,7 @@ newTalent{
return ([[Chant the glory of the sun, granting you %d%% physical damage resistance.
In addition it surrounds you with a shield of light, damaging anything that attacks you for %0.2f light damage.
You may only have one Chant active at once.
The resistance and damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 5, 35), self:combatTalentSpellDamage(t, 5, 25))
The resistance and damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 5, 35), damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 5, 25)))
end,
}
......@@ -146,7 +146,7 @@ newTalent{
return ([[Chant the glory of the sun, granting you %d%% elemental resistances.
In addition it surrounds you with a shield of light, damaging anything that attacks you for %0.2f light damage.
You may only have one Chant active at once.
The resistance and damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 5, 35), self:combatTalentSpellDamage(t, 5, 25))
The resistance and damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 5, 35), damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 5, 25)))
end,
}
......@@ -184,6 +184,6 @@ newTalent{
return ([[Chant the glory of the sun, granting you %d%% more light damage.
In addition it surrounds you with a shield of light, damaging anything that attacks you for %0.2f light damage.
You may only have one Chant active at once.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 10, 50), self:combatTalentSpellDamage(t, 5, 25))
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 10, 50), damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 5, 25)))
end,
}
......@@ -41,7 +41,7 @@ newTalent{
info = function(self, t)
return ([[Infuse your weapon of the power of the Sun, doing %0.2f light damage with each hit.
Each hit will drain 3 positive energy. The spell ends when energy reaches 0.
The damage will increase with the Magic stat]]):format(7 + self:combatSpellpower(0.092) * self:getTalentLevel(t))
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.LIGHT, 7 + self:combatSpellpower(0.092) * self:getTalentLevel(t)))
end,
}
......
......@@ -134,7 +134,7 @@ newTalent{
info = function(self, t)
return ([[You bind light in a glyph on the floor. The first target passing by will be hit by a blast of light doing %0.2f damage.
The glyph lasts for %d turns.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 20, 150), 2 + self:getTalentLevel(t))
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 20, 150)), 2 + self:getTalentLevel(t))
end,
}
......
......@@ -63,7 +63,7 @@ newTalent{
return ([[Chant the glory of the moon, granting you %d%% more darkness damage.
In addition it surrounds you with a shield of shadows, damaging anything that attacks you for %0.2f darkness damage.
You may only have one Hymn active at once.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 10, 50), self:combatTalentSpellDamage(t, 5, 25))
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 10, 50), damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 5, 25)))
end,
}
......@@ -100,7 +100,7 @@ newTalent{
return ([[Chant the glory of the moon, granting you infravision up to %d grids.
In addition it surrounds you with a shield of darkness, damaging anything that attacks you for %0.2f darkness damage.
You may only have one Hymn active at once.
The resistance and damage will increase with the Magic stat]]):format(math.floor(5 + self:getTalentLevel(t)), self:combatTalentSpellDamage(t, 5, 25))
The resistance and damage will increase with the Magic stat]]):format(math.floor(5 + self:getTalentLevel(t)), damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 5, 25)))
end,
}
......@@ -141,7 +141,7 @@ newTalent{
return ([[Chant the glory of the moon, granting you %d%% stun, blindness and confusion resistances.
In addition it surrounds you with a shield of darkness, damaging anything that attacks you for %0.2f light damage.
You may only have one Hymn active at once.
The damage will increase with the Magic stat]]):format(100 * (0.2 + self:getTalentLevel(t) / 10), self:combatTalentSpellDamage(t, 5, 25))
The damage will increase with the Magic stat]]):format(100 * (0.2 + self:getTalentLevel(t) / 10), damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 5, 25)))
end,
}
......@@ -204,6 +204,6 @@ newTalent{
return ([[Conjures a shroud of dancing shadows with a radius of 5 that follows you as long as this spell is active.
Each turn a random shadow beam will hit up to %d of your foes for 1 to %0.2f damage.
This powerful spell will continuously drain negative energy while active.
The damage will increase with the Magic stat]]):format(self:getTalentLevel(t), self:combatTalentSpellDamage(t, 7, 80))
The damage will increase with the Magic stat]]):format(self:getTalentLevel(t), damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 7, 80)))
end,
}
......@@ -44,7 +44,7 @@ newTalent{
end,
info = function(self, t)
return ([[Calls the power of the Moon into a beam of shadows doing %0.2f damage.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 14, 230))
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 14, 230)))
end,
}
......@@ -90,8 +90,8 @@ newTalent{
return ([[Invokes a blast of shadows dealing %0.2f darkness damage and leaving a field that does %0.2f darkness damage per turn for %d turns.
The damage will increase with the Magic stat]]):
format(
self:combatTalentSpellDamage(t, 5, 120),
self:combatTalentSpellDamage(t, 4, 50),
damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 5, 120)),
damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 4, 50)),
self:getTalentLevel(t) + 2
)
end,
......@@ -125,8 +125,8 @@ newTalent{
It also regenerates both your negative and positive energies.
The damage will increase with the Magic stat]]):
format(
self:combatTalentSpellDamage(t, 10, 100),
self:combatTalentSpellDamage(t, 10, 100),
damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 10, 100)),
damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 10, 100)),
self:getTalentRange(t)
)
end,
......@@ -159,6 +159,6 @@ newTalent{
end,
info = function(self, t)
return ([[A star falls onto the target, stunning all and doing %0.2f darkness damage.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 28, 170))
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 28, 170)))
end,
}
......@@ -54,7 +54,7 @@ newTalent{
end,
info = function(self, t)
return ([[Calls the power of the Sun into a searing lance doing %0.2f damage and leaving a spot on the ground for 4 turns doing %0.2f damage.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 6, 160), self:combatTalentSpellDamage(t, 6, 80))
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 6, 160)), self:combatTalentSpellDamage(t, 6, 80))
end,
}
......@@ -88,7 +88,7 @@ newTalent{
At level 3 it will start dealing %0.2f light damage.
The damage will increase with the Magic stat]]):
format(
self:combatTalentSpellDamage(t, 4, 80)
damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 4, 80))
)
end,
}
......@@ -121,7 +121,7 @@ newTalent{
info = function(self, t)
return ([[Fire a beam of Sun flames at your foes, burning all those in line for %0.2f fire damage.
The damage will increase with the Magic stat]]):
format(self:combatTalentSpellDamage(t, 10, 200))
format(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 10, 200)))
end,
}
......@@ -149,6 +149,6 @@ newTalent{
end,
info = function(self, t)
return ([[Conjures a furious burst of Sunlight, dealing %0.2f light damage to all those around you in a radius of 4.
The damage will increase with the Magic stat]]):format(self:combatTalentSpellDamage(t, 10, 160))
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.LIGHT, self:combatTalentSpellDamage(t, 10, 160)))
end,
}
......@@ -69,7 +69,7 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Your skin forms icy scales, damaging all that hit you for %d cold damage and increasing your armor by %d.]]):format(5 * self:getTalentLevel(t), 4 * self:getTalentLevel(t))
return ([[Your skin forms icy scales, damaging all that hit you for %d cold damage and increasing your armor by %d.]]):format(damDesc(self, DamageType.C, 5 * self:getTalentLevel(t)), 4 * self:getTalentLevel(t))
end,
}
......@@ -147,6 +147,6 @@ newTalent{
end,
info = function(self, t)
return ([[You breathe ice in a frontal cone. Any target caught in the area will take %0.2f cold damage and can be frozen for a few turns.
The damage will increase with the Strength stat]]):format(30 + self:getStr(50) * self:getTalentLevel(t), 2+self:getTalentLevelRaw(t))
The damage will increase with the Strength stat]]):format(damDesc(self, DamageType.COLD, 30 + self:getStr(50) * self:getTalentLevel(t)), 2+self:getTalentLevelRaw(t))
end,
}
......@@ -103,7 +103,7 @@ newTalent{
end,
info = function(self, t)
return ([[Spit a cloud of flames doing %0.2f fire damage in a radius of 2 each turn for %d turns.
The damage will increase with the Willpower stat]]):format(10 + self:getWil() * 0.2 * self:getTalentLevel(t), 2 + self:getTalentLevelRaw(t))
The damage will increase with the Willpower stat]]):format(damDesc(self, DamageType.FIRE, 10 + self:getWil() * 0.2 * self:getTalentLevel(t)), 2 + self:getTalentLevelRaw(t))
end,
}
......@@ -132,6 +132,6 @@ newTalent{
end,
info = function(self, t)
return ([[You breathe fire in a frontal cone. Any target caught in the area will take %0.2f fire damage over 3 turns.
The damage will increase with the Strength stat]]):format(30 + self:getStr(65) * self:getTalentLevel(t))
The damage will increase with the Strength stat]]):format(damDesc(self, DamageType.FIRE, 30 + self:getStr(65) * self:getTalentLevel(t)))
end,
}
......@@ -122,6 +122,6 @@ newTalent{
end,
info = function(self, t)
return ([[You breathe sand in a frontal cone. Any target caught in the area will take %0.2f physical damage and be blinded for %d turns.
The damage will increase with the Strength stat]]):format(10 + self:getStr() * 0.3 * self:getTalentLevel(t), 2+self:getTalentLevelRaw(t))
The damage will increase with the Strength stat]]):format(damDesc(self, DamageType.PHYSICAL, 10 + self:getStr() * 0.3 * self:getTalentLevel(t)), 2+self:getTalentLevelRaw(t))
end,
}
......@@ -72,7 +72,7 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Your skin drips with acid, damaging all that hit you for %d acid damage.]]):format(10 + 5 * self:getTalentLevel(t))
return ([[Your skin drips with acid, damaging all that hit you for %d acid damage.]]):format(damDesc(self, DamageType.ACID, 10 + 5 * self:getTalentLevel(t)))
end,
}
......@@ -100,7 +100,7 @@ newTalent{
end,
info = function(self, t)
return ([[Spit slime at your target doing %0.2f nature damage and slowing it down for 3 turns.
The damage will increase with the Dexterity stat]]):format(20 + (self:getDex() * self:getTalentLevel(t)) * 0.3)
The damage will increase with the Dexterity stat]]):format(damDesc(self, DamageType.NATURE, 20 + (self:getDex() * self:getTalentLevel(t)) * 0.3))
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