Commit cb0849b0cccb686268bed63fcc9d97e90afc4d05

Authored by DarkGod
2 parents b95aeb1e 53ea5c90

Merge branch 'take-down-respects-pin' into 'master'

Take Down respects pin if the target is more than 1 tile away.

Also removed an extraneous range field from the talent definition.

See merge request !740
... ... @@ -167,7 +167,6 @@ newTalent{
167 167 getDamage = function(self, t)
168 168 return self:combatTalentWeaponDamage(t, .1, 1)
169 169 end,
170   - range = 1,
171 170 target = function(self, t)
172 171 if self:hasEffect(self.EFF_GRAPPLING) then return {type="ball", range=1, radius=5, selffire=false} end
173 172 return {type="hit", range=self:getTalentRange(t)}
... ... @@ -190,7 +189,11 @@ newTalent{
190 189 local tg = self:getTalentTarget(t)
191 190 local x, y, target = self:getTarget(tg)
192 191 if not target or not self:canProject(tg, x, y) then return nil end
193   -
  192 +
  193 + if core.fov.distance(self.x, self.y, x, y) > 1 and self:attr("never_move") then
  194 + game.logPlayer(self, "You cannot move!")
  195 + return nil
  196 + end
194 197 local grappled = false
195 198
196 199 -- do the rush
... ...