Commit ad2984c2c9b45bbf165df50f0bbe8b33e15559c1
1 parent
c1f4a873
Blodo Spray correctly handles its disease chance
git-svn-id: http://svn.net-core.org/repos/t-engine4@3349 51575b47-30f0-44d4-a5cc-537603b46e54
Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -1033,7 +1033,7 @@ newDamageType{ |
1033 | 1033 | if _G.type(dam) == "number" then dam = {dam=dam} end |
1034 | 1034 | DamageType:get(DamageType.BLIGHT).projector(src, x, y, DamageType.BLIGHT, dam.dam) |
1035 | 1035 | local target = game.level.map(x, y, Map.ACTOR) |
1036 | - if target and target:canBe("disease") then | |
1036 | + if target and target:canBe("disease") and rng.percent(dam.disease_chance or 20) then | |
1037 | 1037 | local eff = rng.table{{target.EFF_ROTTING_DISEASE, "con"}, {target.EFF_DECREPITUDE_DISEASE, "dex"}, {target.EFF_WEAKNESS_DISEASE, "str"}} |
1038 | 1038 | 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) }) |
1039 | 1039 | end | ... | ... |
-
Please register or login to post a comment