[b25] Blood Spray always causes disease

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
jotwebe
Uruivellas
Posts: 725
Joined: Fri Apr 15, 2011 6:58 am
Location: GMT+1

[b25] Blood Spray always causes disease

#1 Post by jotwebe »

According to it's spell description, Blood Spray (Corruption/Blood 1) causes diseases with a certain chance. In the talent code, a disease chance is set up.

spells/blood.lua line 37-47

Code: Select all

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
		self:project(tg, x, y, DamageType.CORRUPTED_BLOOD, {
			dam = self:spellCrit(self:combatTalentSpellDamage(t, 10, 190)),
			disease_chance = 20 + self:getTalentLevel(t) * 10,
			disease_dam = self:spellCrit(self:combatTalentSpellDamage(t, 10, 220)) / 6,
			disease_power = self:combatTalentSpellDamage(t, 10, 20),
			dur = 6,
		})
But checking in the damage types:

lines 1006-1018:

Code: Select all

-- Corrupted blood, blight damage + potential diseases
newDamageType{
	name = "corrupted blood", type = "CORRUPTED_BLOOD",
	projector = function(src, x, y, type, dam)
		if _G.type(dam) == "number" then dam = {dam=dam} end
		DamageType:get(DamageType.BLIGHT).projector(src, x, y, DamageType.BLIGHT, dam.dam)
		local target = game.level.map(x, y, Map.ACTOR)
		if target and target:canBe("disease") then
			local eff = rng.table{{target.EFF_ROTTING_DISEASE, "con"}, {target.EFF_DECREPITUDE_DISEASE, "dex"}, {target.EFF_WEAKNESS_DISEASE, "str"}}
			target:setEffect(eff[1], dam.dur or 5, { src = src, [eff[2]] = dam.disease_power or 5, dam = dam.disease_dam or (dam.dam / 5) })
		end
	end,
}
it only checks for disease resistance (line 1013: "if target and target:canBe("disease") then"). That's where a the disease chance ought to be checked, I think, but how to do exactly that I'll leave to someone who knows lua. :wink:
Ghoul never existed, this never happened!

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b25] Blood Spray always causes disease

#2 Post by darkgod »

fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply