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

Spell Shaping talent as third talent of Meta school: allows for a chance to ignore friendlyfire

git-svn-id: http://svn.net-core.org/repos/t-engine4@398 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9660f054
No related branches found
No related tags found
No related merge requests found
......@@ -533,7 +533,7 @@ function _M:breakStealth()
if self:isTalentActive(self.T_STEALTH) then
local chance = 0
if self:knowTalent(self.T_UNSEEN_ACTIONS) then
chance = 10 + self:getTalentLevel(self.T_UNSEEN_ACTIONS) * 9
chance = 10 + self:getTalentLevel(self.T_UNSEEN_ACTIONS) * 9 + (self:getLck() - 50) * 0.2
end
-- Do not break stealth
......
......@@ -270,7 +270,7 @@ function _M:combatDefense()
if self:hasDualWeapon() and self:knowTalent(self.T_DUAL_WEAPON_DEFENSE) then
add = add + 4 + (self:getTalentLevel(self.T_DUAL_WEAPON_DEFENSE) * self:getDex()) / 12
end
return self.combat_def + (self:getDex() - 10) * 0.35 + add
return self.combat_def + (self:getDex() - 10) * 0.35 + add + (self:getLck() - 50) * 0.4
end
--- Gets the armor
......@@ -288,19 +288,19 @@ end
--- Gets the attack
function _M:combatAttack(weapon)
weapon = weapon or self.combat
return self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 5 + (weapon.atk or 0) + (self:getStr(50) - 5) + (self:getDex(50) - 5)
return self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 5 + (weapon.atk or 0) + (self:getStr(50) - 5) + (self:getDex(50) - 5) + (self:getLck() - 50) * 0.4
end
--- Gets the attack using only strength
function _M:combatAttackStr(weapon)
weapon = weapon or self.combat
return self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 5 + (weapon.atk or 0) + (self:getStr(100) - 10)
return self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 5 + (weapon.atk or 0) + (self:getStr(100) - 10) + (self:getLck() - 50) * 0.4
end
--- Gets the attack using only dexterity
function _M:combatAttackDex(weapon)
weapon = weapon or self.combat
return self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 5 + (weapon.atk or 0) + (self:getDex(100) - 10)
return self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 5 + (weapon.atk or 0) + (self:getDex(100) - 10) + (self:getLck() - 50) * 0.4
end
--- Gets the armor penetration
......@@ -322,7 +322,7 @@ function _M:combatCrit(weapon)
if weapon.talented and weapon.talented == "knife" and self:knowTalent(Talents.T_LETHALITY) then
addcrit = 1 + self:getTalentLevel(Talents.T_LETHALITY) * 1.3
end
return self.combat_physcrit + (self:getCun() - 10) * 0.3 + (weapon.physcrit or 1) + addcrit
return self.combat_physcrit + (self:getCun() - 10) * 0.3 + (self:getLck() - 50) * 0.30 + (weapon.physcrit or 1) + addcrit
end
--- Gets the damage range
......@@ -357,7 +357,7 @@ end
--- Gets spellcrit
function _M:combatSpellCrit()
return self.combat_spellcrit + (self:getCun() - 10) * 0.3 + 1
return self.combat_spellcrit + (self:getCun() - 10) * 0.3 + (self:getLck() - 50) * 0.30 + 1
end
--- Gets spellspeed
......@@ -395,19 +395,24 @@ function _M:spellCrit(dam)
return dam, crit
end
--- Do we get hit by our own AOE ?
function _M:spellFriendlyFire()
return rng.chance(self:getTalentLevelRaw(self.T_SPELL_SHAPING) * 20 + (self:getLck() - 50) * 0.2)
end
--- Computes physical resistance
function _M:combatPhysicalResist()
return self.combat_physresist + (self:getCon() + self:getStr()) * 0.25
return self.combat_physresist + (self:getCon() + self:getStr() + (self:getLck() - 50) * 0.5) * 0.25
end
--- Computes spell resistance
function _M:combatSpellResist()
return self.combat_spellresist + (self:getMag() + self:getWil()) * 0.25
return self.combat_spellresist + (self:getMag() + self:getWil() + (self:getLck() - 50) * 0.5) * 0.25
end
--- Computes mental resistance
function _M:combatMentalResist()
return self.combat_mentalresist + (self:getCun() + self:getWil()) * 0.25
return self.combat_mentalresist + (self:getCun() + self:getWil() + (self:getLck() - 50) * 0.5) * 0.25
end
......
......@@ -53,9 +53,7 @@ newEntity{
level_range = {1, 50},
rarity = 3,
cost = 4,
wielder = {
combat={atk = resolvers.mbonus(20, 2)},
},
combat={atk = resolvers.mbonus(20, 2)},
}
newEntity{
......@@ -63,9 +61,7 @@ newEntity{
level_range = {1, 50},
rarity = 3,
cost = 6,
wielder = {
combat={apr = resolvers.mbonus(15, 1)},
},
combat={apr = resolvers.mbonus(15, 1)},
}
newEntity{
......
......@@ -48,7 +48,8 @@ newTalent{
DamageType.NATURE, dam,
radius,
5, nil,
engine.Entity.new{alpha=100, display='', color_br=30, color_bg=180, color_bb=60}
engine.Entity.new{alpha=100, display='', color_br=30, color_bg=180, color_bb=60},
nil, self:spellFriendlyFire()
)
return true
end,
......
......@@ -59,7 +59,7 @@ newTalent{
},
range = 15,
action = function(self, t)
local tg = {type="ball", range=self:getTalentRange(t), radius=1 + self:getTalentLevelRaw(t), talent=t}
local tg = {type="ball", range=self:getTalentRange(t), radius=1 + self:getTalentLevelRaw(t), friendlyfire=self:spellFriendlyFire(), talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.FIRE, self:spellCrit(28 + self:combatSpellpower(0.4) * self:getTalentLevel(t)), {type="flame"})
......@@ -96,7 +96,8 @@ newTalent{
DamageType.NETHERFLAME, dam,
radius,
5, nil,
engine.Entity.new{alpha=100, display='', color_br=180, color_bg=30, color_bb=60}
engine.Entity.new{alpha=100, display='', color_br=180, color_bg=30, color_bb=60},
nil, self:spellFriendlyFire()
)
game.level.map:particleEmitter(x, y, radius, "static_fire", nil, nil, {radius=radius})
return true
......
......@@ -71,10 +71,22 @@ newTalent{
}
newTalent{
name = "Quicken Spells",
name = "Spell Shaping",
type = {"spell/meta",3},
require = spells_req3,
points = 5,
mode = "passive",
info = function(self, t)
return ([[You learn to shape your area spells, allowing you to carve a hole in them to not get hit with a chance of %d%%.]]):
format(self:getTalentLevelRaw(t) * 20)
end,
}
newTalent{
name = "Quicken Spells",
type = {"spell/meta",4},
require = spells_req4,
points = 5,
mode = "sustained",
sustain_mana = 150,
cooldown = 30,
......
No preview for this file type
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