[b39-svn-5045] Corruption weapon ego -- Curse of Death
Posted: Sun Apr 22, 2012 6:41 pm
The weapon ego corruption gives a chance to curse the target on strike. However, one of the curses, Curse of Death, currently causes lua errors (calculation from nil value eff.dam) upon application and inspection.
This line passes power as an argument to the effect. The problem is that in the effect code for Curse of Death, a dam field is referenced while power is not.
Replacing eff.dam with eff.power fixes the lua errors, but I'm not sure if the intention is to have dam calculated from power.
Code: Select all
in game\modules\tome\data\general\objects\egos\weapon.lua:
line 407: elseif eff == "death" then target:setEffect(target.EFF_CURSE_DEATH, 2, {src=who, power=20})
Code: Select all
in game\modules\tome\data\timed_effects\magical.lua:
line 540: long_desc = function(self, eff) return ("The target is cursed, taking %0.2f darkness damage per turn and preventing natural life regeneration."):format(eff.dam) end,
.
.
.
line 549: DamageType:get(DamageType.DARKNESS).projector(eff.src, self.x, self.y, DamageType.DARKNESS, eff.dam)