[svn] Hornet Stingers artifact and poison damage
Posted: Sun Sep 16, 2012 9:47 am
When an elite grave wight attacked me using Hornet Stingers artifact arrows, errors popped up every time an arrow hit. A little investigating revealed that it's the Crippling Poison damage type that it adds to its victims. Unlike Insidious Poison, neither Crippling nor Spydric Poisons apply default values when they're used as damage types. This patch changes that:
I just copied the check from Insidious Poison and changed the default durations. Spydric Poison gets 3 since that's what the Mandible of Ungolmor (the only place it's used?) has. Crippling Poison gets 4 since that seems reasonable for a poison that interferes with talent use.
Code: Select all
--- data/damage_types.lua.old 2012-09-16 02:05:15.578125000 -0700
+++ data/damage_types.lua 2012-09-16 02:30:25.109375000 -0700
@@ -1168,6 +1168,7 @@
newDamageType{
name = "spydric poison", type = "SPYDRIC_POISON",
projector = function(src, x, y, type, dam)
+ if _G.type(dam) == "number" then dam = {dam=dam, dur=3} end
DamageType:get(DamageType.NATURE).projector(src, x, y, DamageType.NATURE, dam.dam / dam.dur)
local target = game.level.map(x, y, Map.ACTOR)
if target and target:canBe("poison") then
@@ -1180,6 +1181,7 @@
newDamageType{
name = "crippling poison", type = "CRIPPLING_POISON", text_color = "#LIGHT_GREEN#",
projector = function(src, x, y, type, dam)
+ if _G.type(dam) == "number" then dam = {dam=dam, dur=4} end
DamageType:get(DamageType.NATURE).projector(src, x, y, DamageType.NATURE, dam.dam / dam.dur)
local target = game.level.map(x, y, Map.ACTOR)
if target and target:canBe("poison") then