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

moooarr

git-svn-id: http://svn.net-core.org/repos/t-engine4@2425 51575b47-30f0-44d4-a5cc-537603b46e54
parent a19d2962
No related branches found
No related tags found
No related merge requests found
Showing
with 67 additions and 16 deletions
......@@ -83,7 +83,7 @@ newAI("use_tactical", function(self)
end
-- Need closing-in
if avail.closein and target_dist then
if avail.closein and target_dist and target_dist > 2 and self.ai_tactic.closein then
want.closein = 1 + target_dist / 2
end
......
......@@ -65,7 +65,7 @@ local function makeGolem()
hotkey_page = 1,
move_others = true,
ai = "summoned", ai_real = "dumb_tactical_simple", ai_state = { talent_in=1, tactic_follow_leader = true, ai_move="move_astar" },
ai = "summoned", ai_real = "tactical", ai_state = { talent_in=1, tactic_follow_leader = true, ai_move="move_astar" },
energy = { mod=1 },
stats = { str=14, dex=12, mag=12, con=12 },
......
......@@ -26,6 +26,7 @@ newTalent{
random_ego = "attack",
cooldown = 10,
stamina = 30,
tactical = { ATTACKAREA = 3 },
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)
local weapon = self:hasTwoHandedWeapon()
......@@ -57,6 +58,7 @@ newTalent{
mode = "sustained",
cooldown = 30,
sustain_stamina = 40,
tactical = { BUFF = 2 },
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,
activate = function(self, t)
local weapon = self:hasTwoHandedWeapon()
......@@ -104,9 +106,7 @@ newTalent{
random_ego = "attack",
stamina = 30,
cooldown = 18,
tactical = {
ATTACKAREA = 10,
},
tactical = { ATTACKAREA = 1, DISABLE = 3 },
range = 1,
requires_target = true,
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,
......@@ -143,6 +143,7 @@ newTalent{
cooldown = 30,
stamina = 30,
requires_target = true,
tactical = { ATTACK = 1 },
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)
local weapon = self:hasTwoHandedWeapon()
......@@ -200,6 +201,7 @@ newTalent{
random_ego = "attack",
cooldown = 6,
stamina = 8,
tactical = { ATTACK = 2, DISABLE = 2 },
requires_target = true,
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)
......@@ -243,6 +245,7 @@ newTalent{
cooldown = 6,
stamina = 12,
requires_target = true,
tactical = { ATTACK = 2, DISABLE = 2 },
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)
local weapon = self:hasTwoHandedWeapon()
......@@ -287,6 +290,7 @@ newTalent{
random_ego = "attack",
cooldown = 6,
stamina = 12,
tactical = { ATTACK = 2, DISABLE = 2 },
requires_target = true,
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)
......@@ -332,6 +336,7 @@ newTalent{
mode = "sustained",
cooldown = 15,
sustain_stamina = 100,
tactical = { BUFF = 1 },
do_turn = function(self, t)
if self.blood_frenzy > 0 then
self.blood_frenzy = self.blood_frenzy - 2
......
......@@ -27,6 +27,7 @@ newTalent{
range = 10,
message = "@Source@ shoots!",
requires_target = true,
tactical = { ATTACK = 1 },
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,
action = function(self, t)
local targets = self:archeryAcquireTargets()
......@@ -50,6 +51,7 @@ newTalent{
require = techs_dex_req1,
range = 10,
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,
action = function(self, t)
local targets = self:archeryAcquireTargets()
......@@ -70,6 +72,7 @@ newTalent{
require = techs_dex_req2,
cooldown = 30,
sustain_stamina = 50,
tactical = { BUFF = 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,
activate = function(self, t)
local weapon = self:hasArcheryWeapon()
......@@ -113,6 +116,7 @@ newTalent{
require = techs_dex_req3,
cooldown = 30,
sustain_stamina = 50,
tactical = { BUFF = 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,
activate = function(self, t)
local weapon = self:hasArcheryWeapon()
......@@ -152,6 +156,7 @@ newTalent{
require = techs_dex_req4,
range = 10,
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,
action = function(self, t)
local targets = self:archeryAcquireTargets()
......@@ -174,6 +179,7 @@ newTalent{
cooldown = 15,
stamina = 15,
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,
requires_target = true,
archery_onreach = function(self, t, x, y)
......@@ -214,6 +220,7 @@ newTalent{
stamina = 15,
require = techs_dex_req2,
range = 10,
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,
archery_onhit = function(self, t, target, x, y)
......@@ -244,6 +251,7 @@ newTalent{
stamina = 15,
require = techs_dex_req3,
range = 10,
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,
archery_onhit = function(self, t, target, x, y)
......@@ -277,6 +285,7 @@ newTalent{
stamina = 15,
require = techs_dex_req4,
range = 10,
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,
archery_onhit = function(self, t, target, x, y)
......
......@@ -90,6 +90,7 @@ newTalent{
points = 5,
cooldown = 45,
stamina = 120,
tactical = { DEFEND = 5, CLOSEIN = 2 },
action = function(self, t)
self:setEffect(self.EFF_UNSTOPPABLE, 2 + self:getTalentLevelRaw(t), {hp_per_kill=math.floor(self:getTalentLevel(t) * 3.5)})
return true
......
......@@ -37,6 +37,7 @@ newTalent{
stamina = 15,
require = techs_dex_req2,
range = 10,
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,
action = function(self, t)
......@@ -61,6 +62,7 @@ newTalent{
stamina = 15,
require = techs_dex_req3,
range = 10,
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,
action = function(self, t)
......@@ -87,6 +89,7 @@ newTalent{
require = techs_dex_req4,
range = 10,
direct_hit = true,
tactical = { ATTACKAREA = 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,
action = function(self, t)
......
......@@ -28,6 +28,7 @@ newTalent{
require = techs_strdex_req1,
cooldown = 30,
sustain_stamina = 30,
tactical = { BUFF = 1 },
activate = function(self, t)
return {
speed = self:addTemporaryValue("combat_physspeed", self:combatSpeed() - 1 / (1 + 0.08 * 1.3)),
......@@ -57,9 +58,7 @@ newTalent{
random_ego = "attack",
stamina = 45,
cooldown = function(self, t) return math.floor(40 - self:getTalentLevel(t) * 4) end,
tactical = {
ATTACK = 4,
},
tactical = { ATTACK = 1, CLOSEIN = 3 },
requires_target = true,
range = function(self, t) return math.floor(5 + self:getTalentLevelRaw(t)) end,
action = function(self, t)
......@@ -108,6 +107,8 @@ newTalent{
cooldown = 55,
stamina = 25,
require = techs_strdex_req3,
no_energy = true,
tactical = { ATTACK = 4 },
action = function(self, t)
self:setEffect(self.EFF_ATTACK, 1 + self:getTalentLevel(t), {power=100})
return true
......@@ -126,6 +127,7 @@ newTalent{
stamina = 25,
no_energy = true,
require = techs_strdex_req4,
tactical = { BUFF = 2, CLOSEIN = 2, ESCAPE = 2 },
action = function(self, t)
self:setEffect(self.EFF_SPEED, 5, {power=1 - (1 / (1 + self:getTalentLevel(t) * 0.06))})
return true
......
......@@ -47,6 +47,7 @@ newTalent{
require = techs_dex_req3,
cooldown = 30,
sustain_stamina = 50,
tactical = { BUFF = 2 },
on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require a two weapons to use this talent.") end return false end return true end,
activate = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
......@@ -77,6 +78,7 @@ newTalent{
cooldown = 30,
sustain_stamina = 50,
require = techs_dex_req4,
tactical = { BUFF = 2 },
on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require a two weapons to use this talent.") end return false end return true end,
activate = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
......@@ -114,6 +116,7 @@ newTalent{
stamina = 15,
require = techs_dex_req1,
requires_target = true,
tactical = { ATTACK = 2, DISABLE = 2 },
on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require a two weapons to use this talent.") end return false end return true end,
action = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
......@@ -162,6 +165,7 @@ newTalent{
stamina = 15,
require = techs_dex_req2,
requires_target = true,
tactical = { ATTACK = 4 },
on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require a two weapons to use this talent.") end return false end return true end,
action = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
......@@ -194,6 +198,7 @@ newTalent{
stamina = 30,
require = techs_dex_req3,
requires_target = true,
tactical = { ATTACKAREA = 2 },
on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require a two weapons to use this talent.") end return false end return true end,
action = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
......@@ -245,6 +250,7 @@ newTalent{
cooldown = 8,
stamina = 30,
require = techs_dex_req4,
tactical = { ATTACKAREA = 2 },
on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require a two weapons to use this talent.") end return false end return true end,
action = function(self, t)
local weapon, offweapon = self:hasDualWeapon()
......
......@@ -27,6 +27,7 @@ newTalent{
cooldown = 12,
stamina = 20,
range = 7,
tactical = { ESCAPE = 2 },
requires_target = true,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
......@@ -48,6 +49,7 @@ newTalent{
points = 5,
random_ego = "utility",
cooldown = 20,
no_npc_use = true,
action = function(self, t)
local rad = 5 + self:getCun(10) * self:getTalentLevel(t)
self:setEffect(self.EFF_SENSE, 3 + self:getTalentLevel(t), {
......@@ -70,6 +72,7 @@ newTalent{
random_ego = "defensive",
cooldown = 15,
stamina = 30,
tactical = { ESCAPE = 1, DISABLE = 3 },
requires_target = true,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
......@@ -106,6 +109,7 @@ newTalent{
cooldown = 30,
range = 10,
sustain_stamina = 120,
tactical = { BUFF = 2 },
activate = function(self, t)
return {
slow_projectiles = self:addTemporaryValue("slow_projectiles", 15 + self:getDex(10) * self:getTalentLevel(t)),
......
......@@ -26,6 +26,7 @@ newTalent{
sustain_stamina = 20,
no_energy = true,
cooldown = 5,
tactical = { BUFF = 2 },
do_trigger = function(self, t, target)
if rng.percent(20 + self:getTalentLevel(t) * (1 + self:getDex(9, true))) then
local spells = {}
......@@ -98,6 +99,7 @@ newTalent{
sustain_stamina = 40,
require = techs_req3,
range = 10,
tactical = { BUFF = 2 },
activate = function(self, t)
local power = self:getTalentLevel(t) / 14
return {
......
......@@ -38,6 +38,7 @@ newTalent{
require = techs_dex_req2,
range = 10,
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,
archery_onhit = function(self, t, target, x, y)
if target:checkHit(self:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 10) and target:canBe("blind") then
......@@ -72,6 +73,7 @@ newTalent{
require = techs_dex_req3,
range = 10,
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,
archery_onhit = function(self, t, target, x, y)
if target:checkHit(self:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then
......@@ -105,6 +107,7 @@ newTalent{
require = techs_dex_req4,
range = 10,
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,
action = function(self, t)
if not self:hasArcheryWeapon("sling") then game.logPlayer(self, "You must wield a sling!") return nil end
......
......@@ -26,6 +26,7 @@ newTalent{
random_ego = "attack",
cooldown = 40,
stamina = 60,
tactical = { DEFEND = 2 },
action = function(self, t)
self:setEffect(self.EFF_EARTHEN_BARRIER, 20, {power=self:getTalentLevelRaw(t) * 5})
return true
......@@ -44,6 +45,7 @@ newTalent{
mode = "sustained",
cooldown = 60,
sustain_stamina = 80,
tactical = { BUFF = 2 },
activate = function(self, t)
return {
onslaught = self:addTemporaryValue("onslaught", math.floor(self:getTalentLevel(t))),
......@@ -71,8 +73,10 @@ newTalent{
random_ego = "attack",
cooldown = 10,
stamina = 30,
tactical = { CLOSEIN = 2 },
range = function(self, t) return 2 + self:getTalentLevel(t) end,
action = function(self, t)
local tg = {type="ball", range=0, friendlyfire=false, radius=2 + self:getTalentLevel(t), talent=t}
local tg = {type="ball", range=0, friendlyfire=false, radius=self:getTalentRange(t), talent=t}
self:project(tg, self.x, self.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
......@@ -97,12 +101,12 @@ newTalent{
mode = "sustained",
cooldown = 30,
sustain_stamina = 40,
tactical = { buff = 2 },
activate = function(self, t)
return {
dam = self:addTemporaryValue("shattering_impact", self:combatTalentWeaponDamage(t, 0.2, 0.6)),
}
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("shattering_impact", p.dam)
return true
......
......@@ -28,6 +28,7 @@ newTalent{
stamina = 20,
range = 4,
requires_target = true,
tactical = { ATTACKAREA = 2 },
action = function(self, t)
local tg = {type="cone", range=0, radius=3 + self:getTalentLevelRaw(t), friendlyfire=false}
local x, y = self:getTarget(tg)
......@@ -47,7 +48,8 @@ newTalent{
require = techs_req_high2,
points = 5,
random_ego = "utility",
cooldown = 150,
cooldown = 100,
tactical = { STAMINA = 2 },
action = function(self, t)
self:incStamina(20 + self:getTalentLevel(t) * 12)
return true
......@@ -66,6 +68,7 @@ newTalent{
random_ego = "defensive",
cooldown = 30,
stamina = 40,
tactical = { DEFEND = 2, BUFF = 1 },
action = function(self, t)
self:setEffect(self.EFF_BATTLE_SHOUT, 5 + self:getTalentLevelRaw(t) * 2, {power=10+self:getTalentLevelRaw(t)})
return true
......@@ -85,6 +88,7 @@ newTalent{
stamina = 40,
range = 4,
requires_target = true,
tactical = { DISABLE = 2 },
action = function(self, t)
local tg = {type="cone", range=0, radius=3 + self:getTalentLevelRaw(t), friendlyfire=false}
local x, y = self:getTarget(tg)
......
......@@ -30,6 +30,7 @@ newTalent{
cooldown = 6,
stamina = 8,
requires_target = true,
tactical = { ATTACK = 1, DISABLE = 3 },
on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
action = function(self, t)
local shield = self:hasShield()
......@@ -85,6 +86,7 @@ newTalent{
cooldown = 8,
stamina = 22,
requires_target = true,
tactical = { ATTACK = 2, ESCAPE = 1, DISABLE = 1 },
on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
action = function(self, t)
local shield = self:hasShield()
......@@ -132,6 +134,7 @@ newTalent{
cooldown = 6,
stamina = 16,
requires_target = true,
tactical = { ATTACK = 4 },
on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
action = function(self, t)
local shield = self:hasShield()
......@@ -176,6 +179,7 @@ newTalent{
random_ego = "attack",
cooldown = 10,
stamina = 30,
tactical = { ESCAPE = 2, DEFEND = 0.5 },
on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
action = function(self, t)
local shield = self:hasShield()
......@@ -211,6 +215,7 @@ newTalent{
points = 5,
cooldown = 30,
sustain_stamina = 50,
tactical = { DEFEND = 2 },
on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
activate = function(self, t)
local shield = self:hasShield()
......@@ -278,6 +283,7 @@ newTalent{
points = 5,
cooldown = 60,
sustain_stamina = 90,
tactical = { DEFEND = 3 },
on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
activate = function(self, t)
local shield = self:hasShield()
......
......@@ -57,10 +57,12 @@ newEntity{ define_as = "SHADE",
[Talents.T_MANATHRUST]=4, [Talents.T_FREEZE]=4, [Talents.T_TIDAL_WAVE]=2,
[Talents.T_WEAPONS_MASTERY]=3,
},
inc_damage = {all=-30},
resolvers.inscriptions(1, {"shielding rune", "phase door rune", "regeneration infusion", "heroism infusion"}),
inc_damage = {all=-20},
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { talent_in=4, ai_move="move_astar" },
ai = "tactical", ai_state = { talent_in=3, ai_move="move_astar", },
ai_tactic = resolvers.tactic"",
on_die = function(self, who)
game.state:activateBackupGuardian("KOR_FURY", 5, 35, ".. yes I tell you! The old ruins of Kor'Pul are still haunted!")
......
......@@ -384,9 +384,9 @@ function resolvers.tactic(name)
return {__resolver="tactic", name}
end
function resolvers.calc.tactic(t, e)
if t[1] == "melee" then return {attack=2, attackarea=2, disable=2, escape=0, closein=2}
elseif t[1] == "ranged" then return {disable=1.5, escape=3, closein=0, defend=2, heal=2}
elseif t[1] == "tank" then return {disable=3, escape=0, closein=2, defend=2, protect=2, heal=3}
if t[1] == "melee" then return {attack=2, attackarea=2, disable=2, escape=0, closein=2, go_melee=1}
elseif t[1] == "ranged" then return {disable=1.5, escape=3, closein=0, defend=2, heal=2, safe_range = 4}
elseif t[1] == "tank" then return {disable=3, escape=0, closein=2, defend=2, protect=2, heal=3, go_melee=1}
end
return {}
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