[b39-svn-5045] Epidemic - resist field not being passed
Posted: Sun Apr 22, 2012 6:58 pm
I encountered this bug when fighting with a plaugebringer branded weapon. When epidemic is triggered and not resisted by an enemy, a nil value lua error pops up (and pops up each time the epidemic spreads). Apparently, this stems from a resist value never being passed to the epidemic disease effect.
This is where the effect is generated. The epidemic effect references eff.resist on activation/deactivation but resist is not passed as an argument.
By passing resist=disease.params.resist as an extra parameter in the above target:setEffect() call, the errors are fixed and the talent appears to be working as intended.
Code: Select all
in game\modules\tome\data\talents\corruptions\plague.lua:
line 249: target:setEffect(disease.id, 6, {src=self, dam=disease.params.dam, str=disease.params.str, dex=disease.params.dex, con=disease.params.con, heal_factor=disease.params.heal_factor, burst=disease.params.burst, rot_timer=disease.params.rot_timer, apply_power=self:combatSpellpower()})
Code: Select all
in game\modules\tome\data\timed_effects\magical.lua:
line 1492: eff.immid = self:addTemporaryValue("disease_immune", -eff.resist / 100)