Skip to content
Snippets Groups Projects
Commit ad2984c2 authored by dg's avatar dg
Browse files

Blodo Spray correctly handles its disease chance

git-svn-id: http://svn.net-core.org/repos/t-engine4@3349 51575b47-30f0-44d4-a5cc-537603b46e54
parent c1f4a873
No related branches found
No related tags found
No related merge requests found
......@@ -1033,7 +1033,7 @@ newDamageType{
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
if target and target:canBe("disease") and rng.percent(dam.disease_chance or 20) 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment