2011-03-05, 01:01 AM
Isn't this nice? Triple Throw's got its own little section of code:
v114 is whether the attack is Triple Throw or not. First one's a Night Lord's triple throw, second is a Night Walker's.
A lot of this code is using 'goto's...
Okay, this first bit is where the "valuePAD" variable's multiplied with... something. I'm still working on var names. "weaponMultiplier" may be a misnomer - it's actually more like the current damage output. Sort of.
Anyway, where do LABEL_185 and 186 come from?
If the attack is not Triple Throw, go to 186 (don't include this valuePAD)
If the attack is Triple Throw, do a bunch of other stuff, end up with a value for v119 (what is it, the special TT multiplier?)
I am starting to get a handle on how this horrible code is put together, though. I think Lucky 7 has its own special code, too. It's just all scrambled together weird.
Interesting Discovery
Lucky 7 and TT have the same code snippet, except one key difference:
Lucky 7 uses a 5.5 multiplier - TT uses a 6.0 multiplier. Still trying to work out what this actually means, but maybe TT by its nature will do ~9% extra damage.
Code:
v114 = skillID == 4121007 || skillID == 14111005;A lot of this code is using 'goto's...
Code:
LABEL_185:
weaponMultiplier = v119 * (double)valuePAD * 0.01;
LABEL_186:
[...]Anyway, where do LABEL_185 and 186 come from?
Code:
if ( !v114 )
goto LABEL_186;
HIDWORD(randomSeed) = _ZtlSecureFuse((const __int32 *const )(a3 + 72), *(_DWORD *)(a3 + 80));
a12 = _ZtlSecureFuse((const __int32 *const )(a3 + 72), *(_DWORD *)(a3 + 80));
v121 = (double)a12 * 1.4;
v122 = v264 % 7;
*(double *)v260 = v121;
randomSeed = (double)SHIDWORD(randomSeed);
++v264;
v120 = v244[v122];
if ( v121 > randomSeed )
{
zswap(v260, (int)&randomSeed);
v121 = *(double *)v260;
goto LABEL_183;
}
if ( v121 != randomSeed )
{
LABEL_183:
HIDWORD(v123) = 0;
LODWORD(v123) = v120 % (unsigned int)((char *)&loc_98967F + 1);
v121 = v121 + (randomSeed - v121) * (double)v123 * 0.000000100000010000001;
}
v119 = v121 * 6.0;
goto LABEL_185;If the attack is Triple Throw, do a bunch of other stuff, end up with a value for v119 (what is it, the special TT multiplier?)
I am starting to get a handle on how this horrible code is put together, though. I think Lucky 7 has its own special code, too. It's just all scrambled together weird.
Interesting Discovery
Lucky 7 and TT have the same code snippet, except one key difference:
Lucky 7 uses a 5.5 multiplier - TT uses a 6.0 multiplier. Still trying to work out what this actually means, but maybe TT by its nature will do ~9% extra damage.

