Page 1 of 1

Vulnd Calculation Bug in DNA Lab

Posted: Thu Jun 24, 2004 3:34 pm
by Banedon
First off the DNA lab is a great tool. I love using it to predict the final outcome of a creature. I noticed that the resist calculation is counting a vulnd as a 0 instead of the negative modifier of -99. I.e. If you are trying to ascertain the heat resist of this combo:

Slot 1: Seething Bol Crusher (Vulnd to heat)
Slot 2: Mutant Rancor (100% resist heat)
Slot 3: Seething Bol Crusher (Vulnd to heat)
Slot 4: Seething Bol Crusher (Vulnd to heat)
Slot 5: Mutant Rancor (100% resist heat)

The calculation should be (-99 * .4) + (100 * .25) + (-99 * .05) + (-99 * .05) + (100 * .25) = .05. However, the formula is using 0 instead of -99 so the calculation is: (0 * .4) + (100 * .25) + (0 * .05) + (0 * .05) + (100 * .25) = 50.

Thanks,


Banedon

Posted: Thu Jun 24, 2004 7:04 pm
by Juntao
Okay, thanks for the input! I think I have corrected the issue. Please let me know if you find otherwise!

Posted: Thu Jun 24, 2004 8:14 pm
by Banedon
Thanks for the quick reply and fix. The calculation for vulnd now works correctly. However, the kinetic formula is incorrect due to an extra semicolon placed in the middle of the calculation. The extra semicolon is after the first kinetic calculation which I bolded below.


tmp = document.forms.Kinetic[SLOT[0]].value*0.4 *(document.hidden.kinetic.value%5==0||document.forms.cki[SLOT[0]].checked||document.forms.Kinetic[SLOT[0]].value == -99?1:0)[b:0eeac40e8a];[/b:0eeac40e8a]
+ document.forms.Kinetic[SLOT[1]].value*0.25*(document.hidden.kinetic.value%5==0||document.forms.cki[SLOT[1]].checked||document.forms.Kinetic[SLOT[1]].value==-99?1:0)
+ document.forms.Kinetic[SLOT[2]].value*0.05*(document.hidden.kinetic.value%5==0||document.forms.cki[SLOT[2]].checked||document.forms.Kinetic[SLOT[2]].value==-99?1:0)
+ document.forms.Kinetic[SLOT[3]].value*0.05*(document.hidden.kinetic.value%5==0||document.forms.cki[SLOT[3]].checked||document.forms.Kinetic[SLOT[3]].value==-99?1:0)
+ document.forms.Kinetic[SLOT[4]].value*0.25*(document.hidden.kinetic.value%5==0||document.forms.cki[SLOT[4]].checked||document.forms.Kinetic[SLOT[4]].value==-99?1:0);


Thanks,


Banedon

Posted: Thu Jun 24, 2004 10:00 pm
by Juntao
Thanks for the finding my bug =)