Page 1 of 1

[b39-svn-5045] Corruption weapon ego -- Curse of Death

Posted: Sun Apr 22, 2012 6:41 pm
by johnnyzero
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.

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})
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.

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)
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.

Re: [b39-svn-5045] Corruption weapon ego -- Curse of Death

Posted: Sun Apr 22, 2012 9:22 pm
by edge2054
Thanks, patch sent to Darkgod.