Page 1 of 1

[svn] Lightning breath causes error and repeats - Death

Posted: Thu Apr 18, 2013 8:20 am
by MisiuPysiu
Hey,

I noticed, every time a multi-hued wyrm or a lightning wyrm breaths lightning an error comes up:
Error
Error
tome-1.0.1-1366272852.jpg (196.56 KiB) Viewed 804 times
After this the breath is cast again, causing additional damage and the error message shows up again.
After a few circles of this bug my char is dead:
tome-1.0.1-1366272868.jpg
tome-1.0.1-1366272868.jpg (207.01 KiB) Viewed 804 times
Cheers

Re: [svn] Lightning breath causes error and repeats - Death

Posted: Thu Apr 18, 2013 3:09 pm
by Hachem_Muche
This is caused by a missing default parameter for lightning daze damage type. Fix:

Code: Select all

Index: game/modules/tome/data/damage_types.lua
===================================================================
--- game/modules/tome/data/damage_types.lua	(revision 6619)
+++ game/modules/tome/data/damage_types.lua	(working copy)
@@ -1056,6 +1056,7 @@
 	name = "lightning daze", type = "LIGHTNING_DAZE", text_color = "#ROYAL_BLUE#",
 	projector = function(src, x, y, type, dam)
 		if _G.type(dam) == "number" then dam = {dam=dam, daze=25} end
+		dam.daze = dam.daze or 25
 		local realdam = DamageType:get(DamageType.LIGHTNING).projector(src, x, y, DamageType.LIGHTNING, dam.dam)
 		local target = game.level.map(x, y, Map.ACTOR)
 		if target and dam.daze > 0 and rng.percent(dam.daze) then

Re: [svn] Lightning breath causes error and repeats - Death

Posted: Thu Apr 18, 2013 4:21 pm
by MisiuPysiu
Great!

Works very well now.
Thanks a lot!