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

finish Trapping

git-svn-id: http://svn.net-core.org/repos/t-engine4@1488 51575b47-30f0-44d4-a5cc-537603b46e54
parent 82e482df
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ function _M:canDisarm(x, y, who)
-- do we know how to disarm?
if who:knowTalent(who.T_TRAP_DISARM) or who:attr("can_disarm") then
local power = who:getTalentLevel(who.T_TRAP_DISARM) * who:getCun(25) + (who:attr("disarm_bonus") or 0)
if who:checkHit(power, self.disarm_power) then
if who:checkHit(power, self.disarm_power) and (not self.faction or who:reactionToward(self) < 0) then
return true
end
end
......
......@@ -19,7 +19,7 @@
local Map = require "engine.Map"
local trap_range = function(self, t) return 1 + math.floor(self:getTalentLevel(self.T_TRAP_LAUNCHER) * 2.2) end
local trap_range = function(self, t) return 0 + math.floor(self:getTalentLevel(self.T_TRAP_LAUNCHER) * 2.2) end
----------------------------------------------------------------
-- Trapping
......@@ -80,6 +80,7 @@ newTalent{
stamina = 15,
no_break_stealth = true,
require = cuns_req2,
range = function(self, t) return math.ceil(self:getTalentLevel(t) * 1.5 + 5) end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -105,7 +106,7 @@ newTalent{
ai = "summoned", ai_real = "dumb_talented", ai_state = { talent_in=1, },
level_range = {1, 1}, exp_worth = 0,
max_life = 1,
max_life = self.level * 2,
life_rating = 0,
never_move = 1,
......@@ -114,13 +115,13 @@ newTalent{
-- Hard to kill with spells
resists = {[DamageType.PHYSICAL] = -90, all = 90},
talent_cd_reduction={[Talents.T_TAUNT]=4, },
talent_cd_reduction={[Talents.T_TAUNT]=2, },
resolvers.talents{
[self.T_TAUNT]=self:getTalentLevelRaw(t),
},
summoner = self, summoner_gain_exp=true,
summon_time = 7,
summon_time = 5,
}
m:resolve() m:resolve(nil, true)
......
......@@ -41,10 +41,7 @@ newTalent{
local tg = {type="ball", range=0, radius=self:getTalentRange(t), friendlyfire=false, talent=t}
self:project(tg, self.x, self.y, function(tx, ty)
local a = game.level.map(tx, ty, Map.ACTOR)
print("try taunt", a and a.name, a and self:reactionToward(a))
game.level.map:particleEmitter(tx, ty, 1, "summon")
if a and self:reactionToward(a) < 0 then
print("taunt", a.name)
a:setTarget(self)
end
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