Commit 6fe7cf253ae6d19056204996da8a8e1e33b49b05

Authored by yutio888
1 parent 0f35340e

try fix spatial tether by limit the duration of old tethers

... ... @@ -302,7 +302,11 @@ newTalent{
302 302 local trigger = rng.percent(self.chance * core.fov.distance(self.x, self.y, target.x, target.y))
303 303
304 304 if game.level and game.level:hasEntity(target) and tether and not target.dead then
305   - self.temporary = tether.dur
  305 + if self.x == tether.x and self.y == tether.y then
  306 + self.temporary = tether.dur
  307 + else
  308 + self.temporary = math.min(self.temporary or 0, tether.dur)
  309 + end
306 310 end
307 311
308 312 if game.level and game.level:hasEntity(target) and tether and trigger and not target.dead then
... ... @@ -388,6 +392,7 @@ newTalent{
388 392 local radius = self:getTalentRadius(t)
389 393 return ([[Tether the target to the location for %d turns.
390 394 Each turn the target has a %d%% chance per tile it's travelled away from the tether to be teleported back, inflicting %0.2f physical and %0.2f temporal (warp) damage to all enemies in a radius of %d at both the entrance and exit locations.
  395 + If the target has already been tethered, it will also be tethered to the new location. The old tether still exists and can function normally, but cannot be extended by any means.
391 396 The damage will scale with your Spellpower.]])
392 397 :tformat(duration, chance, damDesc(self, DamageType.PHYSICAL, damage), damDesc(self, DamageType.TEMPORAL, damage), radius)
393 398 end,
... ...