From ce268881664768cd07926e42842a17f6f18fd6dc Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sat, 9 Oct 2010 11:09:07 +0000 Subject: [PATCH] finish Trapping git-svn-id: http://svn.net-core.org/repos/t-engine4@1488 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Trap.lua | 2 +- game/modules/tome/data/talents/cunning/traps.lua | 9 +++++---- game/modules/tome/data/talents/gifts/summon-utility.lua | 3 --- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/game/modules/tome/class/Trap.lua b/game/modules/tome/class/Trap.lua index aa4a60ac09..f5cc58088f 100644 --- a/game/modules/tome/class/Trap.lua +++ b/game/modules/tome/class/Trap.lua @@ -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 diff --git a/game/modules/tome/data/talents/cunning/traps.lua b/game/modules/tome/data/talents/cunning/traps.lua index 0edc8912cf..139e19d548 100644 --- a/game/modules/tome/data/talents/cunning/traps.lua +++ b/game/modules/tome/data/talents/cunning/traps.lua @@ -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) diff --git a/game/modules/tome/data/talents/gifts/summon-utility.lua b/game/modules/tome/data/talents/gifts/summon-utility.lua index 631bed3d42..5febbfdef3 100644 --- a/game/modules/tome/data/talents/gifts/summon-utility.lua +++ b/game/modules/tome/data/talents/gifts/summon-utility.lua @@ -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) -- GitLab