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

Archery talents now give a correct range

git-svn-id: http://svn.net-core.org/repos/t-engine4@2472 51575b47-30f0-44d4-a5cc-537603b46e54
parent 02d0da1a
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ newTalent{
no_energy = "fake",
hide = true,
points = 1,
range = 10,
range = archery_range,
message = "@Source@ shoots!",
requires_target = true,
tactical = { ATTACK = 1 },
......@@ -49,7 +49,7 @@ newTalent{
cooldown = 3,
stamina = 8,
require = techs_dex_req1,
range = 10,
range = archery_range,
requires_target = true,
tactical = { ATTACK = 2 },
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end,
......@@ -154,7 +154,7 @@ newTalent{
cooldown = 14,
stamina = 35,
require = techs_dex_req4,
range = 10,
range = archery_range,
requires_target = true,
tactical = { ATTACK = 3 },
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end,
......@@ -178,6 +178,7 @@ newTalent{
points = 5,
cooldown = 15,
stamina = 15,
range = archery_range,
require = techs_dex_req1,
tactical = { ATTACKAREA = 2, DISABLE = 2 },
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end,
......@@ -219,7 +220,7 @@ newTalent{
cooldown = 10,
stamina = 15,
require = techs_dex_req2,
range = 10,
range = archery_range,
tactical = { ATTACK = 1, DISABLE = 1 },
requires_target = true,
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end,
......@@ -250,7 +251,7 @@ newTalent{
cooldown = 10,
stamina = 15,
require = techs_dex_req3,
range = 10,
range = archery_range,
tactical = { ATTACK = 1, DISABLE = 2 },
requires_target = true,
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end,
......@@ -284,7 +285,7 @@ newTalent{
cooldown = 14,
stamina = 15,
require = techs_dex_req4,
range = 10,
range = archery_range,
tactical = { ATTACKAREA = 2, DISABLE = 3 },
requires_target = true,
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end,
......
......@@ -36,7 +36,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req2,
range = 10,
range = archery_range,
tactical = { ATTACK = 2 },
requires_target = true,
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("bow") then if not silent then game.logPlayer(self, "You require a bow for this talent.") end return false end return true end,
......@@ -61,7 +61,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req3,
range = 10,
range = archery_range,
tactical = { ATTACKAREA = 1 },
requires_target = true,
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("bow") then if not silent then game.logPlayer(self, "You require a bow for this talent.") end return false end return true end,
......@@ -87,7 +87,7 @@ newTalent{
cooldown = 12,
stamina = 35,
require = techs_dex_req4,
range = 10,
range = archery_range,
direct_hit = true,
tactical = { ATTACKAREA = 2 },
requires_target = true,
......
......@@ -36,7 +36,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req2,
range = 10,
range = archery_range,
requires_target = true,
tactical = { ATTACK = 2, DISABLE = 2 },
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("sling") then if not silent then game.logPlayer(self, "You require a sling for this talent.") end return false end return true end,
......@@ -71,7 +71,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req3,
range = 10,
range = archery_range,
requires_target = true,
tactical = { ATTACK = 2, DISABLE = 2, ESCAPE = 1 },
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("sling") then if not silent then game.logPlayer(self, "You require a sling for this talent.") end return false end return true end,
......@@ -105,7 +105,7 @@ newTalent{
cooldown = 12,
stamina = 35,
require = techs_dex_req4,
range = 10,
range = archery_range,
requires_target = true,
tactical = { ATTACK = 3 },
on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon("sling") then if not silent then game.logPlayer(self, "You require a sling for this talent.") end return false end return true end,
......
......@@ -125,6 +125,14 @@ techs_strdex_req5 = function(self, t) local stat = self:getStr() >= self:getDex(
level = function(level) return 16 + (level-1) end,
} end
-- Archery range talents
archery_range = function(self, t)
local weapon = self:hasArcheryWeapon()
if not weapon or not weapon.combat then return 1 end
return weapon.combat.range or 6
end
load("/data/talents/techniques/2hweapon.lua")
load("/data/talents/techniques/dualweapon.lua")
load("/data/talents/techniques/weaponshield.lua")
......
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