Code: Select all
if #diseases > 0 then
self:project({type="ball", radius=1 + math.floor(self:getTalentLevelRaw(t) / 2), range=self:getTalentRange(t)}, x, y, function(px, py)
local target = game.level.map(px, py, engine.Map.ACTOR)
if not target or target == source or target == self or (self:reactionToward(target) >= 0) then return end
local disease = rng.table(diseases)
target:setEffect(disease.id, 6, {src=self, dam=disease.params.dam, str=disease.params.str, dex=disease.params.dex, con=disease.params.con})
game.level.map:particleEmitter(px, py, 1, "slime")
end)
end