Skip to content
Snippets Groups Projects
Commit 02fccb5f authored by DarkGod's avatar DarkGod
Browse files

sun paladin scaling

parent eafe25db
No related branches found
No related tags found
No related merge requests found
...@@ -69,14 +69,15 @@ newTalent{ ...@@ -69,14 +69,15 @@ newTalent{
info = function(self, t) info = function(self, t)
local damage = t.getDamage(self, t) local damage = t.getDamage(self, t)
local shieldflat = t.getShieldFlat(self, t) local shieldflat = t.getShieldFlat(self, t)
return ([[Infuse your weapon with the power of the Sun, adding %0.2f light damage on each melee hit. return ([[Infuse your weapon with the power of the Sun, adding %0.1f light damage on each melee hit.
Additionally, if you have a temporary damage shield active, melee attacks will increase its power by %d. Additionally, if you have a temporary damage shield active, melee attacks will increase its power by %d.
The damage dealt and shield bonus will increase with your Spellpower.]]): The damage dealt and shield bonus will increase with your Spellpower.]]):
format(damDesc(self, DamageType.LIGHT, damage), shieldflat) format(damDesc(self, DamageType.LIGHT, damage), shieldflat)
end, end,
} }
-- Boring scaling, TL4 effect? -- A potentially very powerful ranged attack that gets more effective with range
-- 2nd attack does reduced damage to balance high damage on 1st attack (so that the talent is always useful at low levels and close ranges)
newTalent{ newTalent{
name = "Wave of Power", name = "Wave of Power",
type = {"celestial/combat",2}, type = {"celestial/combat",2},
...@@ -88,7 +89,16 @@ newTalent{ ...@@ -88,7 +89,16 @@ newTalent{
tactical = { ATTACK = 2 }, tactical = { ATTACK = 2 },
requires_target = true, requires_target = true,
range = function(self, t) return 2 + math.max(0, self:combatStatScale("str", 0.8, 8)) end, range = function(self, t) return 2 + math.max(0, self:combatStatScale("str", 0.8, 8)) end,
getDamage = function(self, t) return self:combatTalentWeaponDamage(t, 0.9, 2) end, SecondStrikeChance = function(self, t, range)
return self:combatLimit(self:getTalentLevel(t)*range, 100, 15, 4, 70, 50)
end, -- 15% for TL 1.0 at range 4, 70% for TL 5.0 at range 10
getDamage = function(self, t, second)
if second then
return self:combatTalentWeaponDamage(t, 0.9, 2)*self:combatTalentLimit(t, 1.0, 0.4, 0.65)
else
return self:combatTalentWeaponDamage(t, 0.9, 2)
end
end,
action = function(self, t) action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), talent=t} local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local x, y = self:getTarget(tg) local x, y = self:getTarget(tg)
...@@ -97,21 +107,23 @@ newTalent{ ...@@ -97,21 +107,23 @@ newTalent{
local target = game.level.map(x, y, Map.ACTOR) local target = game.level.map(x, y, Map.ACTOR)
if target then if target then
self:attackTarget(target, nil, t.getDamage(self, t), true) self:attackTarget(target, nil, t.getDamage(self, t), true)
if self:getTalentLevel(t) >= 4 and core.fov.distance(self.x, self.y, target.x, target.y) > 3 then local range = core.fov.distance(self.x, self.y, target.x, target.y)
self:attackTarget(target, nil, t.getDamage(self, t), true) if range > 1 and rng.percent(t.SecondStrikeChance(self, t, range)) then
game.logSeen(self, "#CRIMSON#"..self.name.."strikes twice with Wave of Power!#NORMAL#")
self:attackTarget(target, nil, t.getDamage(self, t, true), true)
end end
else else
return return
end end
return true return true
end, end,
info = function(self, t) info = function(self, t)
local damage = t.getDamage(self, t) local range = self:getTalentRange(t)
return ([[In a pure display of power, you project a melee attack, doing %d%% damage. return ([[In a pure display of power, you project a ranged melee attack, doing %d%% weapon damage.
At talent level 4 you will strike an additional time if the target is over range 3. If the target is outside of melee range, you have a chance to project a second attack against it for %d%% weapon damage.
The second strike chance (which increases with distance) is %0.1f%% at range 2 and %0.1f%% at the maximum range of %d.
The range will increase with your Strength.]]): The range will increase with your Strength.]]):
format(100 * damage) format(t.getDamage(self, t)*100, t.getDamage(self, t, true)*100, t.SecondStrikeChance(self, t, 2), t.SecondStrikeChance(self, t, range), range)
end, end,
} }
...@@ -126,8 +138,13 @@ newTalent{ ...@@ -126,8 +138,13 @@ newTalent{
sustain_positive = 10, sustain_positive = 10,
tactical = { BUFF = 2 }, tactical = { BUFF = 2 },
range = 10, range = 10,
getMartyrDamage = function(self, t) return self:combatTalentScale(t, 5, 25) end, getMartyrDamage = function(self, t) return self:combatTalentLimit(t, 50, 5, 25) end, --Limit < 50%
getLifeDamage = function(self, t) return self:combatTalentScale(t, 0.1, 0.8) end, getLifeDamage = function(self, t) return self:combatTalentLimit(t, 1.0, 0.1, 0.8) end, -- Limit < 100%
getMaxDamage = function(self, t) return self:combatTalentSpellDamage(t, 10, 400) end,
getDamage = function(self, t)
local damage = (self:attr("weapon_of_wrath_life") or t.getLifeDamage(self, t)) * (self.max_life - math.max(0, self.life)) -- avoid problems with die_at
return math.min(t.getMaxDamage(self, t), damage) -- The Martyr effect provides the upside for high HP NPC's
end,
activate = function(self, t) activate = function(self, t)
game:playSoundNear(self, "talents/spell_generic2") game:playSoundNear(self, "talents/spell_generic2")
-- Is this any better than having the callback call getLifeDamage? I figure its better to calculate it once -- Is this any better than having the callback call getLifeDamage? I figure its better to calculate it once
...@@ -145,23 +162,20 @@ newTalent{ ...@@ -145,23 +162,20 @@ newTalent{
callbackOnMeleeAttack = function(self, t, target, hitted, crit, weapon, damtype, mult, dam) callbackOnMeleeAttack = function(self, t, target, hitted, crit, weapon, damtype, mult, dam)
if hitted and self:attr("weapon_of_wrath_martyr") and not self.turn_procs.weapon_of_wrath and not target.dead then if hitted and self:attr("weapon_of_wrath_martyr") and not self.turn_procs.weapon_of_wrath and not target.dead then
target:setEffect(target.EFF_MARTYRDOM, 4, {power = self:attr("weapon_of_wrath_martyr")}) target:setEffect(target.EFF_MARTYRDOM, 4, {power = self:attr("weapon_of_wrath_martyr")})
local damage = t.getDamage(self, t)
local damage = self:attr("weapon_of_wrath_life") * (self.max_life - math.max(0, self.life)) -- avoid problems with die_at
if damage == 0 then return end if damage == 0 then return end
damage = math.min(300, damage) -- No need to try to scale this in a clever way, NPC HP is too variant
local tg = {type="hit", range=10, selffire=true, talent=t} local tg = {type="hit", range=10, selffire=true, talent=t}
self:project(tg, target.x, target.y, DamageType.FIRE, damage) self:project(tg, target.x, target.y, DamageType.FIRE, damage)
self.turn_procs.weapon_of_wrath = true self.turn_procs.weapon_of_wrath = true
end end
end, end,
info = function(self, t) info = function(self, t)
local martyr = t.getMartyrDamage(self, t) local martyr = t.getMartyrDamage(self, t)
local damagepct = t.getLifeDamage(self, t) local damagepct = t.getLifeDamage(self, t)
local damage = damagepct * (self.max_life - math.max(0, self.life)) local damage = t.getDamage(self, t)
return ([[Your weapon attacks burn with righteous fury dealing %d%% of your lost HP (Current: %d) fire damage up to 300 damage and causing your target to take %d%% of the damage they deal.]]): return ([[Your weapon attacks burn with righteous fury, dealing %d%% of your lost HP as additional Fire damage (up to %d, Current: %d).
format(damagepct*100, damage, martyr) Targets struck are also afflicted with a Martyrdom effect that causes them to take %d%% of all damage they deal for 4 turns.]]):
format(damagepct*100, t.getMaxDamage(self, t, 10, 400), damage, martyr)
end, end,
} }
......
...@@ -74,7 +74,7 @@ newTalent{ ...@@ -74,7 +74,7 @@ newTalent{
tactical = { DISABLE=2, HEAL=2 }, tactical = { DISABLE=2, HEAL=2 },
range = 5, range = 5,
requires_target = true, requires_target = true,
getPower = function(self, t) return self:combatTalentScale(t, 10, 50) end, getPower = function(self, t) return self:combatTalentLimit(t, 100, 15, 50) end, --Limit < 100%
on_pre_use = function(self, t, silent) if not self:hasTwoHandedWeapon() then if not silent then game.logPlayer(self, "You require a two handed weapon to use this talent.") end return false end return true end, on_pre_use = function(self, t, silent) if not self:hasTwoHandedWeapon() then if not silent then game.logPlayer(self, "You require a two handed weapon to use this talent.") end return false end return true end,
action = function(self, t) action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)} local tg = {type="hit", range=self:getTalentRange(t)}
...@@ -122,7 +122,7 @@ newTalent{ ...@@ -122,7 +122,7 @@ newTalent{
info = function(self, t) info = function(self, t)
return ([[While wielding a two handed weapon, your critical strike chance is increased by %d%%, and your melee criticals instill you with righteous strength, increasing all physical and light damage you deal by %d%%, stacking up to 3 times. return ([[While wielding a two handed weapon, your critical strike chance is increased by %d%%, and your melee criticals instill you with righteous strength, increasing all physical and light damage you deal by %d%%, stacking up to 3 times.
In addition, your melee critical strikes leave a lasting lightburn on the target, dealing %0.2f light damage over 5 turns and reducing opponents armour by %d. In addition, your melee critical strikes leave a lasting lightburn on the target, dealing %0.2f light damage over 5 turns and reducing opponents armour by %d.
The damage increase with your Spellpower.]]): The damage increases with your Spellpower.]]):
format(t.getCrit(self, t), t.getPower(self, t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getArmor(self, t)) format(t.getCrit(self, t), t.getPower(self, t), damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getArmor(self, t))
end, end,
} }
......
...@@ -32,14 +32,14 @@ newTalent{ ...@@ -32,14 +32,14 @@ newTalent{
require = divi_req1, require = divi_req1,
points = 5, points = 5,
radius = function(self, t) return self:combatTalentScale(t, 3, 7) end, radius = function(self, t) return self:combatTalentScale(t, 3, 7) end,
getResist = function(self, t) return math.min(100, self:combatTalentScale(t, 20, 90)) end, getResist = function(self, t) return self:combatTalentLimit(t, 100, 25, 75) end,
passives = function(self, t, p) passives = function(self, t, p)
self:talentTemporaryValue(p, "radiance_aura", radianceRadius(self)) self:talentTemporaryValue(p, "radiance_aura", radianceRadius(self))
self:talentTemporaryValue(p, "blind_immune", t.getResist(self, t) / 100) self:talentTemporaryValue(p, "blind_immune", t.getResist(self, t) / 100)
end, end,
info = function(self, t) info = function(self, t)
return ([[You are so infused with sunlight that your body glows permanently in radius %d, even in dark places. return ([[You are so infused with sunlight that your body glows permanently in radius %d, even in dark places.
The light protects your eyes, giving %d%% blindness resistance. Your vision adapts to this glow, giving you %d%% blindness resistance.
The light radius overrides your normal light if it is bigger (it does not stack). The light radius overrides your normal light if it is bigger (it does not stack).
]]): ]]):
format(radianceRadius(self), t.getResist(self, t)) format(radianceRadius(self), t.getResist(self, t))
...@@ -74,7 +74,7 @@ newTalent{ ...@@ -74,7 +74,7 @@ newTalent{
end, end,
info = function(self, t) info = function(self, t)
return ([[The light of your Radiance allows you to see that which would normally be unseen. return ([[The light of your Radiance allows you to see that which would normally be unseen.
All actors in your Radiance aura have their invisibility and stealth power reduced by %d. All enemies in your Radiance aura have their invisibility and stealth power reduced by %d.
In addition, all actors affected by illumination are easier to see and therefore hit; their defense is reduced by %d and all evasion bonuses from being unseen are negated. In addition, all actors affected by illumination are easier to see and therefore hit; their defense is reduced by %d and all evasion bonuses from being unseen are negated.
The effects increase with your Spellpower.]]): The effects increase with your Spellpower.]]):
format(t.getPower(self, t), t.getDef(self, t)) format(t.getPower(self, t), t.getDef(self, t))
...@@ -109,9 +109,9 @@ newTalent{ ...@@ -109,9 +109,9 @@ newTalent{
return true return true
end, end,
info = function(self, t) info = function(self, t)
return ([[Your Radiance is so powerful it burns all foes caught in it, doing up to %0.2f light damage (reduced with distance) to all foes caught inside. return ([[Your Radiance is so powerful it burns all foes caught in it, doing up to %0.1f light damage (reduced with distance) to all foes caught inside.
At level 4 the light is so bright it has %d%% chances to daze them for 3 turns. At level 4 the light is so bright it has %d%% chances to daze them for 3 turns.
The damage increase with your Spellpower.]]): The damage increases with your Spellpower.]]):
format(damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getDaze(self, t)) format(damDesc(self, DamageType.LIGHT, t.getDamage(self, t)), t.getDaze(self, t))
end, end,
} }
...@@ -160,7 +160,7 @@ newTalent{ ...@@ -160,7 +160,7 @@ newTalent{
end) end)
-- EFF_RADIANCE_DIM does nothing by itself its just used by radianceRadius -- EFF_RADIANCE_DIM does nothing by itself its just used by radianceRadius
self:setEffect(self.EFF_RADIANCE_DIM, 8, {}) self:setEffect(self.EFF_RADIANCE_DIM, 5, {})
return true return true
end, end,
......
...@@ -62,8 +62,8 @@ newTalent{ ...@@ -62,8 +62,8 @@ newTalent{
end, end,
info = function(self, t) info = function(self, t)
local damage = t.getDamage(self, t) local damage = t.getDamage(self, t)
return ([[Calls the a beam of light from the Sun, doing %0.2f damage to the target. return ([[Calls forth a beam of light from the Sun, doing %0.1f Light damage to the target.
At level 4 the beam will be so intense it blinds all foes in radius 2 for %d turns. At level 4 the beam will be so intense it will also blind the target and everyone in a radius 2 around it for %d turns.
The damage dealt will increase with your Spellpower.]]): The damage dealt will increase with your Spellpower.]]):
format(damDesc(self, DamageType.LIGHT, damage), t.getDuration(self, t)) format(damDesc(self, DamageType.LIGHT, damage), t.getDuration(self, t))
end, end,
...@@ -86,9 +86,9 @@ newTalent{ ...@@ -86,9 +86,9 @@ newTalent{
no_npc_use = true, no_npc_use = true,
requires_target = true, requires_target = true,
range = 10, range = 10,
getCap = function(self, t) return math.max(50, 100 - self:getTalentLevelRaw(t) * 10) end, getCap = function(self, t) return self:combatTalentLimit(t, 30, 90, 70) end,
getHaste = function(self, t) return math.min(0.5, self:combatTalentSpellDamage(t, 0.1, 0.4)) end, getHaste = function(self, t) return math.min(0.5, self:combatTalentSpellDamage(t, 0.1, 0.4)) end,
getCD = function(self, t) return math.min(0.5, self:combatTalentSpellDamage(t, 5, 450) / 1000) end, getCD = function(self, t) return self:combatLimit(self:combatTalentSpellDamage(t, 5, 450), 0.5, .03, 32, .35, 350) end, -- Limit < 50% cooldown reduction
action = function(self, t) action = function(self, t)
self:setEffect(self.EFF_SUNCLOAK, 6, {cap=t.getCap(self, t), haste=t.getHaste(self, t), cd=t.getCD(self, t)}) self:setEffect(self.EFF_SUNCLOAK, 6, {cap=t.getCap(self, t), haste=t.getHaste(self, t), cd=t.getCD(self, t)})
game:playSoundNear(self, "talents/flame") game:playSoundNear(self, "talents/flame")
...@@ -96,7 +96,7 @@ newTalent{ ...@@ -96,7 +96,7 @@ newTalent{
end, end,
info = function(self, t) info = function(self, t)
return ([[You wrap yourself in a cloak of sunlight that empowers your magic and protects you for 6 turns. return ([[You wrap yourself in a cloak of sunlight that empowers your magic and protects you for 6 turns.
While the cloak is active your spell casting speed is increased by %d%%, your spell cooldowns are reduced by %d%%, and you cannot take more than %d%% of your maximum life from a single blow. While the cloak is active, your spell casting speed is increased by %d%%, your spell cooldowns are reduced by %d%%, and you cannot take more than %d%% of your maximum life from a single blow.
The effects will increase with your Spellpower.]]): The effects will increase with your Spellpower.]]):
format(t.getHaste(self, t)*100, t.getCD(self, t)*100, t.getCap(self, t)) format(t.getHaste(self, t)*100, t.getCD(self, t)*100, t.getCap(self, t))
end, end,
...@@ -110,7 +110,7 @@ newTalent{ ...@@ -110,7 +110,7 @@ newTalent{
mode = "passive", mode = "passive",
points = 5, points = 5,
getCrit = function(self, t) return self:combatTalentScale(t, 2, 10, 0.75) end, getCrit = function(self, t) return self:combatTalentScale(t, 2, 10, 0.75) end,
getProcChance = function(self, t) return self:combatTalentScale(t, 40, 100) end, getProcChance = function(self, t) return self:combatTalentLimit(t, 100, 30, 75) end,
passives = function(self, t, p) passives = function(self, t, p)
self:talentTemporaryValue(p, "combat_spellcrit", t.getCrit(self, t)) self:talentTemporaryValue(p, "combat_spellcrit", t.getCrit(self, t))
self:talentTemporaryValue(p, "combat_physcrit", t.getCrit(self, t)) self:talentTemporaryValue(p, "combat_physcrit", t.getCrit(self, t))
...@@ -118,7 +118,7 @@ newTalent{ ...@@ -118,7 +118,7 @@ newTalent{
callbackOnCrit = function(self, t, kind, dam, chance) callbackOnCrit = function(self, t, kind, dam, chance)
if kind ~= "spell" and kind ~= "physical" then return end if kind ~= "spell" and kind ~= "physical" then return end
if not rng.percent(t.getProcChance(self, t)) then return end if not rng.percent(t.getProcChance(self, t)) then return end
if self.turn_procs.sun_vengeance then return end if self.turn_procs.sun_vengeance then return end --Note: this will trigger a lot since it get's multiple chances a turn
self.turn_procs.sun_vengeance = true self.turn_procs.sun_vengeance = true
if self:isTalentCoolingDown(self.T_SUN_BEAM) then if self:isTalentCoolingDown(self.T_SUN_BEAM) then
...@@ -133,7 +133,7 @@ newTalent{ ...@@ -133,7 +133,7 @@ newTalent{
local chance = t.getProcChance(self, t) local chance = t.getProcChance(self, t)
return ([[Infuse yourself with the raging fury of the Sun, increasing your physical and spell critical chance by %d%%. return ([[Infuse yourself with the raging fury of the Sun, increasing your physical and spell critical chance by %d%%.
Each time you crit with a physical attack or a spell you have %d%% chance to gain Sun's Vengeance for 2 turns. Each time you crit with a physical attack or a spell you have %d%% chance to gain Sun's Vengeance for 2 turns.
While affected by Sun's Vengeance your Sun Beam will take no turn to use and deal 25%% more damage. While affected by Sun's Vengeance, your Sun Beam will take no time to use and will deal 25%% more damage.
If Sun Beam was on cooldown, the remaining turns are reduced by one instead. If Sun Beam was on cooldown, the remaining turns are reduced by one instead.
This effect can only happen once per turn.]]): This effect can only happen once per turn.]]):
format(crit, chance) format(crit, chance)
...@@ -175,8 +175,8 @@ newTalent{ ...@@ -175,8 +175,8 @@ newTalent{
info = function(self, t) info = function(self, t)
local radius = self:getTalentRadius(t) local radius = self:getTalentRadius(t)
local damage = t.getDamage(self, t) local damage = t.getDamage(self, t)
return ([[A path of sunlight appears in front of you for 5 turns. All foes standing inside take %0.2f light damage per turn. return ([[A path of sunlight appears in front of you for 5 turns. All foes standing inside take %0.1f Light damage per turn.
While standing in the path your movements cost no turns. While standing in the path, your movement takes no time.
The damage done will increase with your Spellpower.]]):format(damDesc(self, DamageType.LIGHT, damage / 5), radius) The damage done will increase with your Spellpower.]]):format(damDesc(self, DamageType.LIGHT, damage / 5), radius)
end, end,
} }
...@@ -551,7 +551,6 @@ newTalent{ ...@@ -551,7 +551,6 @@ newTalent{
} }
return p return p
end, end,
getBlockedTypes = function(self, t) getBlockedTypes = function(self, t)
local bt = {[DamageType.PHYSICAL]=true} local bt = {[DamageType.PHYSICAL]=true}
...@@ -582,17 +581,17 @@ newTalent{ ...@@ -582,17 +581,17 @@ newTalent{
e_string = table.concat(list, ", ") e_string = table.concat(list, ", ")
end end
return bt, e_string return bt, e_string
end, end,
getPower = function(self, t) return 120+self:getCun()+self:getDex() end,
action = function(self, t) action = function(self, t)
local properties = t.getProperties(self, t) local properties = t.getProperties(self, t)
local bt, bt_string = t.getBlockedTypes(self, t) local bt, bt_string = t.getBlockedTypes(self, t)
self:setEffect(self.EFF_BLOCKING, 1 + (self:knowTalent(self.T_ETERNAL_GUARD) and 1 or 0), {power = 120+self:getCun()+self:getDex(), d_types=bt, properties=properties}) self:setEffect(self.EFF_BLOCKING, 1 + (self:knowTalent(self.T_ETERNAL_GUARD) and 1 or 0), {power = t.getPower(self, t), d_types=bt, properties=properties})
return true return true
end, end,
info = function(self, t) info = function(self, t)
return ([[Raise your dagger into blocking position for one turn, reducing the damage of all physical attacks by %d. If you block all of an attack's damage, the attacker will be vulnerable to a deadly counterstrike (a normal attack will instead deal 200%% damage) for one turn and be left disarmed for 3 turns. return ([[Raise your dagger into blocking position for one turn, reducing the damage of all physical melee attacks against you by %d. If you block all of an attack's damage, the attacker will be vulnerable to a deadly counterstrike (a normal attack will instead deal 200%% damage) for one turn and be left disarmed for 3 turns.
The blocking value will increase with your Dexterity and Cunning.]]):format(120 + self:getCun() + self:getDex()) The blocking value will increase with your Dexterity and Cunning.]]):format(t.getPower(self, t))
end, end,
} }
...@@ -606,7 +605,7 @@ newTalent{ ...@@ -606,7 +605,7 @@ newTalent{
if not self:isTalentCoolingDown(t) then if not self:isTalentCoolingDown(t) then
self:startTalentCooldown(t) self:startTalentCooldown(t)
cb.value=0 cb.value=0
game.logPlayer(self, "Your shield protects you from the blow!") game.logSeen(self, "#CRIMSON#%s's shield deflects the blow!", self.name)
return true return true
else else
return false return false
......
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