Blast not hitting monsters outside LoS

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
ratbuddy
Higher
Posts: 56
Joined: Wed Dec 18, 2013 7:34 pm

Blast not hitting monsters outside LoS

#1 Post by ratbuddy »

Per subject. Blast only hits stuff you have line of sight on, even if it's in the radius of effect.

Davion Fuxa
Sher'Tul
Posts: 1293
Joined: Wed May 22, 2013 2:39 am
Location: Halifax, Nova Scotia, Canada
Contact:

Re: Blast not hitting monsters outside LoS

#2 Post by Davion Fuxa »

AoE abilities that you cast at the edge of your LoS should still hit enemies. Are you sure you aren't making a mistake in regards to enemies that are immune to damage outside your LoS (IE, Enemies inside Vaults are immune to damage UNTIL you have LoS on them).
Its amazing what the mind can come up with, but it shows talent to make something of it. - Davion Fuxa
Inscription Guide - Version 1.7.4 Steam Guide
Let's Learn Tales of Maj'Eyal YouTube Playlist
Edited Escapades of Fay Willows Google Doc

ratbuddy
Higher
Posts: 56
Joined: Wed Dec 18, 2013 7:34 pm

Re: Blast not hitting monsters outside LoS

#3 Post by ratbuddy »

Davion Fuxa wrote:AoE abilities that you cast at the edge of your LoS should still hit enemies. Are you sure you aren't making a mistake in regards to enemies that are immune to damage outside your LoS (IE, Enemies inside Vaults are immune to damage UNTIL you have LoS on them).
I am quite sure I know how to shoot around corners with AoE. It's not working properly :)

edit: I should clarify, it still hits things even if I can't see them, but only if there would be sight if I wasn't blind or had larger light/vision radius. It's not hitting anything around corners. That's what I mean by line of sight.

ratbuddy
Higher
Posts: 56
Joined: Wed Dec 18, 2013 7:34 pm

Re: Blast not hitting monsters outside LoS

#4 Post by ratbuddy »

Code: Select all

newTalent{ 
	name = "Blast",
	type = {"cursed/force-of-will", 3},
	require = cursed_wil_req3,
	points = 5,
	random_ego = "attack",
	cooldown = 14,
	tactical = { ATTACKAREA = { PHYSICAL = 2 }, DISABLE = { stun = 1 } },
	requires_target = true,
	hate = 12,
	range = 4,
	radius = function(self, t) return math.floor(self:combatTalentScale(t, 2.3, 3.7)) end,
	getDamage = function(self, t)
		return self:combatTalentMindDamage(t, 0, 300)
	end,
	getKnockback = function(self, t)
		return 2
	end,
	target = function(self, t)
		return {type="ball", nolock=true, pass_terrain=false, friendly_fire=false, nowarning=true, range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t}
	end,
	getDazeDuration = function(self, t)
		return 3
	end,
	critpower = function(self, t) return self:combatTalentScale(t, 4, 15) end,
	action = function(self, t) --NOTE TO DG, SINCE I CAN'T UNDERSTAND A WORD OF BENLI'S CODE: EDIT SO THAT KNOCKBACK OCCURS AFTER DAMAGE, AND SEPARATELY, TO PREVENT ENEMIES BEING SHOVED INTO A NEW SPACE AND HIT AGAIN.
		local range = self:getTalentRange(t)
		local radius = self:getTalentRadius(t)
		local damage = t.getDamage(self, t)
		local knockback = t.getKnockback(self, t)

		local tg = self:getTalentTarget(t)
		local blastX, blastY = self:getTarget(tg)
		if not blastX or not blastY or core.fov.distance(self.x, self.y, blastX, blastY) > range then return nil end

		local grids = self:project(tg, blastX, blastY,
			function(x, y, target, self)
				-- your will ignores friendly targets (except for knockback hits)
				local target = game.level.map(x, y, Map.ACTOR)
				if target and self:reactionToward(target) < 0 then
					local distance = core.fov.distance(blastX, blastY, x, y)
					local power = (1 - (distance / radius))
					local localDamage = damage * power
					local dazeDuration = t.getDazeDuration(self, t)

					forceHit(self, t, target, blastX, blastY, damage, math.max(0, knockback - distance), 7, power, 10)
					if target:canBe("stun") then
						target:setEffect(target.EFF_DAZED, dazeDuration, {src=self})
					end
				end
			end,
			nil, nil)

		local _ _, _, _, x, y = self:canProject(tg, blastX, blastY)
		game.level.map:particleEmitter(x, y, tg.radius, "force_blast", {radius=tg.radius})
		game:playSoundNear(self, "talents/fireflash")

		return true
	end,
	passives = function(self, t, p)
		self:talentTemporaryValue(p, "combat_critical_power", t.critpower(self, t))
	end,
	info = function(self, t)
		local radius = self:getTalentRadius(t)
		local damage = t.getDamage(self, t)
		local knockback = t.getKnockback(self, t)
		local dazeDuration = t.getDazeDuration(self, t)
		return ([[You rage coalesces at a single point, and then explodes outward, blasting enemies within a radius of %d in all directions. The blast causes %d damage and %d knockback at the center, that decreases with distance. Anyone caught in the explosion will also be dazed for 3 turns.
		In addition, your ability to channel force with this talent increases all critical damage by %d%% (currently: %d%%)
		Damage increases with your Mindpower.]]):format(radius, damDesc(self, DamageType.PHYSICAL, damage), knockback, t.critpower(self, t), self.combat_critical_power or 0)
	end,
}
That's blast, just to save folks a bit of time who might care to try to fix the bug :)

ratbuddy
Higher
Posts: 56
Joined: Wed Dec 18, 2013 7:34 pm

Re: Blast not hitting monsters outside LoS

#5 Post by ratbuddy »

Seb submitted a fix for this, can lock it up :)

Post Reply