Page 1 of 1

[1.0.1] Distortion Bolt is not working

Posted: Fri Apr 26, 2013 2:01 pm
by jenx
I have run dozens of solipsists over the last few weeks, mostly using Distortion. For a long while I suspected distortion bold wasn't working properly, but I never paid much attention.

Now that I have paid attention, it is clearly not working in many cases, but I can't figure out the context. Basically, I aim distortion bolt at a room full of creatures with maelstrom, and I always make sure distortion bolt hits a critter with distortion. But the radius explosion only occurs about 1 in every 3-4 times.

This is a serious bug. I"ll try and find out exactly the conditions, but someone might be able to code dive and figure it out. It would be good to have this ready for 1.0.2.

Re: [1.0.1] Distortion Bolt is not working

Posted: Sat Apr 27, 2013 12:17 am
by jenx
Still testing... On autocast the problem is much worse. Could this be then a coroutine problem?

Re: [1.0.1] Distortion Bolt is not working

Posted: Thu May 16, 2013 10:52 am
by jenx
Update: this is still not working in 1.0.3. Many times, distortion bolt on a distorted character fails to do radial damage.

The code seems rather simple:

Code: Select all

newTalent{
	name = "Distortion Bolt",
	type = {"psionic/distortion", 1},
	points = 5, 
	require = psi_wil_req1,
	cooldown = 3,
	psi = 5,
	tactical = { ATTACKAREA = { PHYSICAL = 2} },
	range = 10,
	radius = function(self, t) return 1 + math.floor(self:getTalentLevel(t)/3) end,
	requires_target = true,
	getDamage = function(self, t) return self:combatTalentMindDamage(t, 10, 150) end,
	target = function(self, t)
		local friendlyfire = true
		if self:getTalentLevel(self.T_DISTORTION_BOLT) >= 5 then
			friendlyfire = false
		end
		return {type="ball", radius=self:getTalentRadius(t), friendlyfire=friendlyfire, range=self:getTalentRange(t), talent=t, display={trail="distortion_trail"}}
	end,
	action = function(self, t)
		local tg = self:getTalentTarget(t)
		local x, y = self:getTarget(tg)
		if not x or not y then return nil end
		local damage = self:mindCrit(t.getDamage(self, t))
		tg.type = "bolt" -- switch our targeting to a bolt for the initial projectile
		self:projectile(tg, x, y, DamageType.DISTORTION, {dam=damage,  penetrate=true, explosion=damage*1.5, friendlyfire=tg.friendlyfire, radius=self:getTalentRadius(t)})
		game:playSoundNear(self, "talents/distortion")
		return true
	end,
	info = function(self, t)
		local damage = t.getDamage(self, t)
		local radius = self:getTalentRadius(t)
		return ([[Fire a bolt of distortion that ignores resistance and inflicts %0.2f physical damage.  This damage will distort affected targets, rendering them vulnerable to distortion effects for two turns.
		If the bolt comes in contact with a target that's already distorted, a detonation will occur, inflicting 150%% of the base damage in a radius of %d.
		At talent level 5, you learn to shape your distortion effects, preventing them from hitting you or your allies.
		The damage will scale with your Mindpower.]]):format(damDesc(self, DamageType.PHYSICAL, damage), radius)
	end,
So I am wondering if sometimes x or y is not returned? I've looked into the targetting code, but I can't make any sense of it:

Code: Select all

--- Player requests a target
-- This method should be called by your Player:getTarget() method, it will handle everything
-- @param typ the targeting parameters
function _M:targetGetForPlayer(typ)
	if self.target.forced then return unpack(self.target.forced) end
	if coroutine.running() and typ then
		local msg
		self.target_no_star_scan = nil
		if type(typ) == "string" then msg, typ = typ, nil
		elseif type(typ) == "table" then
			if typ.default_target then
				self.target.target.entity = typ.default_target
				self.target_no_star_scan = true
			end
			msg = typ.msg
		end
		self:targetMode("exclusive", msg, coroutine.running(), typ)
		if typ.immediate_keys then self.target_style = "immediate" end
		if typ.nolock then self.target_style = "free" end
		if typ.nowarning then self.target_warning = false end
		return coroutine.yield()
	end
	return self.target.target.x, self.target.target.y, self.target.target.entity
end

Re: [1.0.1] Distortion Bolt is not working

Posted: Thu May 16, 2013 11:33 am
by Peppersauce
Are you sure? Are you maybe targeting stuff that can avoid it, like... snakes? That's the only instance I can think of that causes Distortion Bolts not to deal aoe damage for me... or maybe I don't notice when it doesn't work since everything dies anyway :lol:
Also... take into account that distortion bolt isn't an instant, so maybe the distortion debuff expires before the bolt gets to the target?

Re: [1.0.1] Distortion Bolt is not working

Posted: Thu May 16, 2013 6:20 pm
by jenx
Peppersauce wrote:Are you sure? Are you maybe targeting stuff that can avoid it, like... snakes? That's the only instance I can think of that causes Distortion Bolts not to deal aoe damage for me... or maybe I don't notice when it doesn't work since everything dies anyway :lol:
Also... take into account that distortion bolt isn't an instant, so maybe the distortion debuff expires before the bolt gets to the target?
Yes, I'm 95% sure. I've played hundreds of solipsists, almost all using distortion. I can have 15 critters, all sitting still, in the middle of maelstrom, and distortion bolt won't trigger radial damage. I've paid careful attention, but I can't see any pattern, which is frustrating. So I'm wondering if anyone else finds this?

Re: [1.0.1] Distortion Bolt is not working

Posted: Thu May 16, 2013 7:18 pm
by Kaja Rainbow
Hmm. Are you taking into accord that Distortion Bolt is a projectile spell (i.e. it won't hit an enemy if another enemy's in the way)? I mean, you're probably aware of that, just making sure.

Re: [1.0.1] Distortion Bolt is not working

Posted: Fri May 17, 2013 5:01 am
by jenx
Kaja Rainbow wrote:Hmm. Are you taking into accord that Distortion Bolt is a projectile spell (i.e. it won't hit an enemy if another enemy's in the way)? I mean, you're probably aware of that, just making sure.
That might explain it. I'll check.

Re: [1.0.1] Distortion Bolt is not working

Posted: Sat May 18, 2013 12:34 am
by Amphouse
Sometimes my thoughtforms get in the way, preventing the explosion since they are immune. Is that what's happening? Try without thoughtforms.

Re: [1.0.1] Distortion Bolt is not working

Posted: Sat May 18, 2013 11:06 am
by Infinitum
It'd help if distortion bolt had a more conspicious graphical effect to show where the bolt currently is. Also since enemies tend to move around and it doesn't asplode on the target square should it miss like other ball spells, having it travel at instant speed wouldn't be unreasonable.

Re: [1.0.1] Distortion Bolt is not working

Posted: Sun May 19, 2013 3:12 am
by jenx
Infinitum wrote:It'd help if distortion bolt had a more conspicious graphical effect to show where the bolt currently is. Also since enemies tend to move around and it doesn't asplode on the target square should it miss like other ball spells, having it travel at instant speed wouldn't be unreasonable.
yes, good idea. and that it won't hit at all if there is something elso in your los. basically, you lose a turn if you drop it on an npc who is not "first" in los.

Re: [1.0.1] Distortion Bolt is not working

Posted: Mon May 20, 2013 7:38 am
by jenx
jenx wrote:
Kaja Rainbow wrote:Hmm. Are you taking into accord that Distortion Bolt is a projectile spell (i.e. it won't hit an enemy if another enemy's in the way)? I mean, you're probably aware of that, just making sure.
That might explain it. I'll check.
Ok, lots of new checking, and it is still not working. I've hit distorted npcs, with a clear shot, and 1-2 npcs within the radius, and they receive no damage whatsoever.

So, DG, I think this has bug for sure, but I have no idea how to find it.

Re: [1.0.1] Distortion Bolt is not working

Posted: Mon May 20, 2013 2:55 pm
by edge2054
It's a bolt, it has travel time.

The issue is amplified more by how fast Solipsists go. Take the following example.

Troll has a distortion effect with 1 turn displayed left but really it's more like 2/10th of a turn left. You go because you're fast and get more than one action a turn. The bolt leaves your hand and moves two tiles in 1/10th of a turn. The global game turn ticks over, timed effects countdown, the bolt moves two more tiles, the troll gets hit, no distortion effect goes off.

I'm fairly sure it's not a bug.

That said the travel time could be made instant. I don't think that small buff/quality of life improvement will unbalance the tree in comparison to other Solipsist options.

Re: [1.0.1] Distortion Bolt is not working

Posted: Tue May 21, 2013 9:24 am
by jenx
Instant would be good, and not allowing the talent to strike a npc behind another one.