diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index a131eca5151824baac0f409166985521ecfe7998..d7271dff0e21cf69ff1ee75f14217da823b71c09 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -962,7 +962,7 @@ newDamageType{ local realdam = DamageType:get(DamageType.NATURE).projector(src, x, y, DamageType.NATURE, dam / 6) local target = game.level.map(x, y, Map.ACTOR) if target and target:canBe("poison") then - target:setEffect(target.EFF_POISONED, 5, {src=src, power=dam / 6, apply_power=src:combatAttack()}) + target:setEffect(target.EFF_POISONED, 5, {src=src, power=dam / 6, apply_power=src.combatAttack and src:combatAttack() or 0}) end return realdam end, diff --git a/game/modules/tome/data/gfx/particles/beckoned_move.lua b/game/modules/tome/data/gfx/particles/beckoned_move.lua index 3a7234c00f847f9853914a0c8e71848d8fc0677b..a5757b65816b381db836555fe77232b4c08012f8 100644 --- a/game/modules/tome/data/gfx/particles/beckoned_move.lua +++ b/game/modules/tome/data/gfx/particles/beckoned_move.lua @@ -43,8 +43,8 @@ local strandIndex = 1 return { generator = function() local size = 4 local colorChoice = rng.percent(50) - - local strand = strands[strandIndex] + + local strand = strands[strandIndex+1] strandIndex = (strandIndex + 1) % strandCount return { @@ -67,4 +67,4 @@ function(self) end nb = nb + 1 end, -strandCount * 30 \ No newline at end of file +strandCount * 30 diff --git a/game/modules/tome/data/talents/cursed/endless-hunt.lua b/game/modules/tome/data/talents/cursed/endless-hunt.lua index 376360ebf38237ff0433d063c947a1eb5a681b20..d67883b343128e77fd7539a62b198f04a0dfb351 100644 --- a/game/modules/tome/data/talents/cursed/endless-hunt.lua +++ b/game/modules/tome/data/talents/cursed/endless-hunt.lua @@ -56,19 +56,19 @@ newTalent{ game.logPlayer(self, "You are having trouble focusing on your prey!") return false end - + local duration = t.getDuration(self, t) self:setEffect(self.EFF_STALKER, duration, { target=target, bonus = 1 }) target:setEffect(self.EFF_STALKED, duration, { source=self }) - + game.level.map:particleEmitter(target.x, target.y, 1, "stalked_start") - + return true end, on_targetDied = function(self, t, target) self:removeEffect(self.EFF_STALKER) target:removeEffect(self.EFF_STALKED) - + -- prevent stalk targeting this turn local stalk = self:isTalentActive(self.T_STALK) if stalk then @@ -118,13 +118,13 @@ newTalent{ local x, y, target = self:getTarget(tg) if not x or not y or not target then return nil end if core.fov.distance(self.x, self.y, x, y) > range then return nil end - + local duration = t.getDuration(self, t) local chance = t.getChance(self, t) local spellpowerChange = t.getSpellpowerChange(self, t) local mindpowerChange = t.getMindpowerChange(self, t) target:setEffect(target.EFF_BECKONED, duration, { source=self, range=range, chance=chance, spellpowerChange=spellpowerChange, mindpowerChange=mindpowerChange }) - + return true end, info = function(self, t) @@ -170,9 +170,9 @@ newTalent{ local effStalker = self:hasEffect(self.EFF_STALKER) local target = effStalker.target if not target or target.dead then return nil end - + target:setEffect(target.EFF_HARASSED, duration, { source=self, damageChange=targetDamageChange }) - + for i = 1, 2 do if not target.dead and self:attackTarget(target, nil, damageMultipler, true) then -- remove effects @@ -181,14 +181,14 @@ newTalent{ local t = target:getTalentFromId(tid) if not target.talents_cd[tid] and t.mode == "activated" and not t.innate then tids[#tids+1] = t end end - + local t = rng.tableRemove(tids) if not t then break end target.talents_cd[t.id] = rng.range(3, 5) game.logSeen(target, "%s's %s is disrupted!", target.name:capitalize(), t.name) end end - + return true end, info = function(self, t) @@ -229,14 +229,14 @@ newTalent{ local tCleave = self:getTalentFromId(self.T_CLEAVE) self.talents_cd[self.T_CLEAVE] = tCleave.cooldown end - + if self:isTalentActive(self.T_REPEL) then self:useTalent(self.T_REPEL) elseif self:knowTalent(self.T_REPEL) then local tRepel = self:getTalentFromId(self.T_REPEL) self.talents_cd[self.T_REPEL] = tRepel.cooldown end - + local movementSpeedChange = t.getMovementSpeedChange(self, t) return { moveId = self:addTemporaryValue("movement_speed", movementSpeedChange), @@ -246,7 +246,7 @@ newTalent{ deactivate = function(self, t, p) if p.moveId then self:removeTemporaryValue("movement_speed", p.moveId) end if p.luckId then self:removeTemporaryValue("inc_stats", p.luckId) end - + return true end, info = function(self, t) diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua index d335c8bee250b4b1f59b2e0f7e211deb9cb8a6dc..f12a03bb229cfd4acfb22a600fad14ed8757a918 100644 --- a/game/modules/tome/data/timed_effects/mental.lua +++ b/game/modules/tome/data/timed_effects/mental.lua @@ -423,21 +423,6 @@ newEffect{ local source = eff.source local moveX, moveY = source.x, source.y -- move in general direction by default if not self:hasLOS(source.x, source.y) then - -- move using dmap if available - --local c = source:distanceMap(self.x, self.y) - --if c then - -- local dir = 5 - -- for i = 1, 9 do - -- local sx, sy = util.coordAddDir(self.x, self.y, i) - -- local cd = source:distanceMap(sx, sy) - -- if cd and cd > c and self:canMove(sx, sy) then c = cd; dir = i end - -- end - -- if i ~= 5 then - -- moveX, moveY = util.coordAddDir(self.x, self.y, dir) - -- end - --end - - -- move a-star (far more useful than dmap) local a = Astar.new(game.level.map, self) local path = a:calc(self.x, self.y, source.x, source.y) if path then @@ -448,7 +433,10 @@ newEffect{ if moveX and moveY then local old_move_others, old_x, old_y = self.move_others, self.x, self.y self.move_others = true - self:moveDirection(moveX, moveY, true) + local old = rawget(self, "aiCanPass") + self.aiCanPass = mod.class.NPC.aiCanPass + mod.class.NPC.moveDirection(self, moveX, moveY, true) + self.aiCanPass = old self.move_others = old_move_others if old_x ~= self.x or old_y ~= self.y then if not self.did_energy then