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

all atatck speed changes from talents are %

archery first 4 talents line implemented


git-svn-id: http://svn.net-core.org/repos/t-engine4@357 51575b47-30f0-44d4-a5cc-537603b46e54
parent 5d0c44ca
No related branches found
No related tags found
No related merge requests found
......@@ -323,6 +323,9 @@ function _M:learnTalent(t_id, force)
if t.type[1]:find("^spell/") and not self:knowTalent(self.T_MANA_POOL) then self:learnTalent(self.T_MANA_POOL) end
if t.type[1]:find("^gift/") and not self:knowTalent(self.T_EQUILIBRIUM_POOL) then self:learnTalent(self.T_EQUILIBRIUM_POOL) end
if t.type[1]:find("^technique/") and not self:knowTalent(self.T_STAMINA_POOL) then self:learnTalent(self.T_STAMINA_POOL) end
-- If we learn an archery talent, also learn to shoot
if t.type[1]:find("^technique/archery") and not self:knowTalent(self.T_SHOOT) then self:learnTalent(self.T_SHOOT) end
return true
end
......
......@@ -6,9 +6,9 @@ return {
life = { 3, 6 },
size = { 1, 3 }, sizev = {0, 0}, sizea = {0, 0},
r = {180, 220}, rv = {0, 10}, ra = {0, 0},
g = {0, 0}, gv = {0, 0}, ga = {0, 0},
b = {200, 255}, bv = {0, 10}, ba = {0, 0},
r = {200, 230}, rv = {0, 10}, ra = {0, 0},
g = {130, 160}, gv = {0, 0}, ga = {0, 0},
b = {50, 70}, bv = {0, 10}, ba = {0, 0},
a = {255, 255}, av = {0, 0}, aa = {0, 0},
}, function(self)
......
-- Default archery attack
newTalent{
name = "Shoot",
type = {"technique/archery-training", 1},
type = {"technique/archery-base", 1},
no_energy = true,
hide = true,
points = 1,
range = 20,
message = "@Source@ shoots!",
action = function(self, t)
self:archeryShoot()
return true
......@@ -41,23 +42,35 @@ newTalent{
cooldown = 30,
sustain_stamina = 50,
activate = function(self, t)
local weapon, offweapon = self:hasArcheryWeapon()
local weapon = self:hasArcheryWeapon()
if not weapon then
game.logPlayer(self, "You cannot use Aim without a bow or sling!")
return nil
end
return {
apr = self:addTemporaryValue("combat_apr", 4 + (self:getTalentLevel(t) * self:getDex()) / 20),
move = self:addTemporaryValue("never_move", 1),
speed = self:addTemporaryValue("combat_physspeed", self:combatSpeed(weapon.combat) * (self:getTalentLevelRaw(t) * 0.1)),
crit = self:addTemporaryValue("combat_physcrit", 7 + self:getTalentLevel(t) * self:getDex(10)),
atk = self:addTemporaryValue("combat_dam", 4 + self:getTalentLevel(t) * self:getDex(10)),
dam = self:addTemporaryValue("combat_atk", 4 + self:getTalentLevel(t) * self:getDex(10)),
apr = self:addTemporaryValue("combat_apr", 3 + self:getTalentLevel(t) * self:getDex(10)),
}
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("never_move", p.move)
self:removeTemporaryValue("combat_physspeed", p.speed)
self:removeTemporaryValue("combat_physcrit", p.crit)
self:removeTemporaryValue("combat_apr", p.apr)
self:removeTemporaryValue("combat_atk", p.atk)
self:removeTemporaryValue("combat_dam", p.dam)
return true
end,
info = function(self, t)
return ([[You enter a calm, focused, stance, increasing your damage(+%d), attack(+%d), armor peneration(+%d) and critical chance(+%d%%) but reducing your firing speed by %0.2f.]]):
format(4 + (self:getTalentLevel(t) * self:getDex()) / 20)
return ([[You enter a calm, focused, stance, increasing your damage(+%d), attack(+%d), armor peneration(+%d) and critical chance(+%d%%) but reducing your firing speed by %d%% and making your unable to move.]]):
format(4 + self:getTalentLevel(t) * self:getDex(10), 4 + self:getTalentLevel(t) * self:getDex(10),
3 + self:getTalentLevel(t) * self:getDex(10), 7 + self:getTalentLevel(t) * self:getDex(10),
self:getTalentLevelRaw(t) * 10)
end,
}
......@@ -70,22 +83,29 @@ newTalent{
cooldown = 30,
sustain_stamina = 50,
activate = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
local weapon = self:hasArcheryWeapon()
if not weapon then
game.logPlayer(self, "You cannot use Precision without dual wielding!")
game.logPlayer(self, "You cannot use Aim without a bow or sling!")
return nil
end
return {
apr = self:addTemporaryValue("combat_apr", 4 + (self:getTalentLevel(t) * self:getDex()) / 20),
speed = self:addTemporaryValue("combat_physspeed", -self:combatSpeed(weapon.combat) * (self:getTalentLevelRaw(t) * 0.14)),
atk = self:addTemporaryValue("combat_dam", -8 - self:getTalentLevelRaw(t) * 2.4),
dam = self:addTemporaryValue("combat_atk", -8 - self:getTalentLevelRaw(t) * 2.4),
crit = self:addTemporaryValue("combat_physcrit", -8 - self:getTalentLevelRaw(t) * 2.4),
}
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("combat_physspeed", p.speed)
self:removeTemporaryValue("combat_physcrit", p.crit)
self:removeTemporaryValue("combat_apr", p.apr)
self:removeTemporaryValue("combat_atk", p.atk)
return true
end,
info = function(self, t)
return ([[You have learned to hit the right spot, increasing your armor penetration by %d.]]):format(4 + (self:getTalentLevel(t) * self:getDex()) / 20)
return ([[You switch to a fluid and fast battle stance, increasing your firing speed by %d%% at the cost of your accuracy(%d), damage(%d) and critical chance(%d).]]):
format(self:getTalentLevelRaw(t) * 14, -8 - self:getTalentLevelRaw(t) * 2.4, -8 - self:getTalentLevelRaw(t) * 2.4, -8 - self:getTalentLevelRaw(t) * 2.4)
end,
}
......@@ -93,39 +113,16 @@ newTalent{
name = "Critical Shot",
type = {"technique/archery-training", 4},
points = 5,
cooldown = 30,
sustain_stamina = 50,
cooldown = 20,
stamina = 35,
require = techs_dex_req4,
action = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
if not weapon then
game.logPlayer(self, "You cannot use Dual Strike without dual wielding!")
return nil
end
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
-- First attack with offhand
local speed, hit = self:attackTargetWith(target, offweapon.combat, nil, 1.2 + self:getTalentLevel(t) / 10)
-- Second attack with mainhand
if hit then
if target:checkHit(self:combatAttackDex(weapon.combat), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("stun") then
target:setEffect(target.EFF_STUNNED, 2 + self:getTalentLevel(t), {})
else
game.logSeen(target, "%s resists the stunning strike!", target.name:capitalize())
end
-- Attack after the stun, to benefit from backstabs
self:attackTargetWith(target, weapon.combat, nil, 1.2 + self:getTalentLevel(t) / 10)
end
self.combat_physcrit = self.combat_physcrit + 1000
self:archeryShoot(nil, 1.2 + self:getTalentLevel(t) / 4)
self.combat_physcrit = self.combat_physcrit - 1000
return true
end,
info = function(self, t)
return ([[Increases attack speed by %0.2f, but drains stamina quickly.]]):format(-0.1 - self:getTalentLevel(t) / 14)
return ([[You concentrate on your aim to produce a guaranted critical hit (with a base damage of %d%%).]]):format((1.2 + self:getTalentLevel(t) / 4) * 100)
end,
}
......@@ -11,7 +11,7 @@ newTalent{
sustain_stamina = 30,
activate = function(self, t)
return {
speed = self:addTemporaryValue("combat_physspeed", 0.1 + self:getTalentLevel(t) / 20),
speed = self:addTemporaryValue("combat_physspeed", self:combatSpeed(weapon.combat) * (self:getTalentLevel(t) * 0.08)),
atk = self:addTemporaryValue("combat_atk", 4 + (self:getTalentLevel(t) * self:getDex()) / 15),
crit = self:addTemporaryValue("combat_physcrit", 4 + (self:getTalentLevel(t) * self:getDex()) / 25),
}
......@@ -23,8 +23,8 @@ newTalent{
return true
end,
info = function(self, t)
return ([[You focus your strikes, reducing your attack speed by %0.2f and increasing your attack by %d and critical chance by %d%%.]]):
format(0.1 + self:getTalentLevel(t) / 20, 4 + (self:getTalentLevel(t) * self:getDex()) / 15, 4 + (self:getTalentLevel(t) * self:getDex()) / 25)
return ([[You focus your strikes, reducing your attack speed by %d%% and increasing your attack by %d and critical chance by %d%%.]]):
format(self:combatSpeed(weapon.combat) * (self:getTalentLevel(t) * 8), 4 + (self:getTalentLevel(t) * self:getDex()) / 15, 4 + (self:getTalentLevel(t) * self:getDex()) / 25)
end,
}
......
......@@ -64,7 +64,7 @@ newTalent{
end
return {
combat_physspeed = self:addTemporaryValue("combat_physspeed", -0.1 - self:getTalentLevel(t) / 14),
combat_physspeed = self:addTemporaryValue("combat_physspeed", -self:combatSpeed(weapon.combat) * (self:getTalentLevel(t) * 0.14)),
stamina_regen = self:addTemporaryValue("stamina_regen", -6),
}
end,
......@@ -74,7 +74,7 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Increases attack speed by %0.2f, but drains stamina quickly.]]):format(-0.1 - self:getTalentLevel(t) / 14)
return ([[Increases attack speed by %d%%, but drains stamina quickly.]]):format(self:combatSpeed(weapon.combat) * (self:getTalentLevel(t) * 14))
end,
}
......
......@@ -5,6 +5,7 @@ newTalentType{ type="technique/shield-offense", name = "weapon and shields", des
newTalentType{ type="technique/shield-defense", name = "weapon and shields", description = "Specialized weapon and shield techniques." }
newTalentType{ type="technique/dualweapon-training", name = "dual wielding", description = "Specialized dual wielding techniques." }
newTalentType{ type="technique/dualweapon-attack", name = "dual wielding", description = "Specialized dual wielding techniques." }
newTalentType{ type="technique/archery-base", name = "archery - base", description = "Ability to shoot, you should never this this." }
newTalentType{ type="technique/archery-bow", name = "archery - bows", description = "Specialized bow techniques." }
newTalentType{ type="technique/archery-sling", name = "archery - slings", description = "Specialized sling techniques." }
newTalentType{ type="technique/archery-training", name = "archery - common", description = "Generic archery techniques." }
......
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