diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 2d94e6acdb96cb1b2b29c4c2b50e570f9d7943d1..a469821c0155754026f11d868aead457f912735c 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -558,7 +558,7 @@ function _M:onTakeHit(value, src) local dam = self.disruption_shield_absorb -- Deactivate without loosing energy - self:forceUseTalent(t.T_DISRUPTION_SHIELD, {ignore_energy=true}) + self:forceUseTalent(self.T_DISRUPTION_SHIELD, {ignore_energy=true}) -- Explode! game.logSeen(self, "%s disruption shield collapses and then explodes in a powerful manastorm!", self.name:capitalize()) diff --git a/game/modules/tome/data/talents/spells/conveyance.lua b/game/modules/tome/data/talents/spells/conveyance.lua index 8ede26e350d75a5f972a66793a4088d1f30d1181..18ae5411b4b474144c3e6569a6844a840e94c890 100644 --- a/game/modules/tome/data/talents/spells/conveyance.lua +++ b/game/modules/tome/data/talents/spells/conveyance.lua @@ -31,7 +31,7 @@ newTalent{ requires_target = function(self, t) return self:getTalentLevel(t) >= 4 end, action = function(self, t) local target = self - if self:getTalentLevel(t) >= 5 then + if self:getTalentLevel(t) >= 4 then local tg = {default_target=self, type="hit", nowarning=true, range=10, first_target="friend"} local tx, ty = self:getTarget(tg) if tx then @@ -53,22 +53,27 @@ newTalent{ if target ~= self and target:reactionToward(self) < 0 then target:setTarget(self) end local x, y = self.x, self.y - if self:getTalentLevel(t) >= 4 then - local tg = {type="ball", nolock=true, pass_terrain=true, nowarning=true, range=10 + self:combatSpellpower(0.1), radius=7 - self:getTalentLevel(t), requires_knowledge=false} + local rad = 10 + self:combatSpellpower(0.1) + if self:getTalentLevel(t) >= 5 then + local tg = {type="ball", nolock=true, pass_terrain=true, nowarning=true, range=10 + self:combatSpellpower(0.1), radius=7 - self:getTalentLevelRaw(t), requires_knowledge=false} x, y = self:getTarget(tg) if not x then return nil end -- Target code doesnot restrict the target coordinates to the range, it lets the poject function do it -- but we cant ... local _ _, x, y = self:canProject(tg, x, y) - game.level.map:particleEmitter(target.x, target.y, 1, "teleport") - target:teleportRandom(x, y, 7 - self:getTalentLevel(t)) - game.level.map:particleEmitter(target.x, target.y, 1, "teleport") - else - game.level.map:particleEmitter(target.x, target.y, 1, "teleport") - target:teleportRandom(x, y, 10 + self:combatSpellpower(0.1)) - game.level.map:particleEmitter(target.x, target.y, 1, "teleport") + rad = 7 - self:getTalentLevelRaw(t) + + -- Check LOS + if not self:hasLOS(x, y) and rng.percent(35) then + game.logPlayer(self, "The spell fizzles!") + return true + end end + game.level.map:particleEmitter(target.x, target.y, 1, "teleport") + target:teleportRandom(x, y, rad) + game.level.map:particleEmitter(target.x, target.y, 1, "teleport") + if target ~= self then target:setEffect(target.EFF_CONTINUUM_DESTABILIZATION, 100, {power=self:combatSpellpower(0.3)}) end @@ -78,9 +83,9 @@ newTalent{ end, info = function(self, t) return ([[Teleports you randomly with a small range (%d). - At level 4 it allows you to choose the target area (radius %d). - At level 5 it allows you to specify which creature to teleport. - The range will increase with the Magic stat]]):format(10 + self:combatSpellpower(0.1), 7 - self:getTalentLevel(t)) + At level 4 it allows you to specify which creature to teleport. + At level 5 it allows you to choose the target area (radius %d). If the target area is not in line of sight there is a chance the spell will fizzle. + The range will increase with the Magic stat]]):format(10 + self:combatSpellpower(0.1), 7 - self:getTalentLevelRaw(t)) end, }