I was working on the drop rate simulation model for d2 lately but then something interesting draw my attention. By the pure accident I found out that not all random is equally random, in some particular cases it might be heavily biased towards some specific predetermined initial Seed. I'm going to describe those cases and what causes them.
Imagine being able to farm Laz or Astro trophies consistently. No, I'm not insane, in theory you can exploit both of these bosses, manipulate their behavior and even the drop rates. I highly doubt it would be possible to achieve that without the usage of unauthorized 3rd party tools (bots), you need to be very precise which is not the case for a human being. And yet you can estimate their actions or possible loot at any given moment or I guess it's better to say that you can produce a narrow set of all possible outcomes. I believe that getting the trophy every 10 runs is highly possible, which is insanely good result!
Now back to the origin of that unexpected precedent. It's not a Sigma exclusive bug, it's one of the many Blizzard bugs that left unnoticed. This weird interaction is caused by the skills that Astro and Laz are using, and what skill unites them? It's their totems, both of these skills sharing the same SrvDoFunc (skill) = 43 and this function is apparently bugged. So every time when this SrvDoFunc function is called by the game there is a call inside of it to its subroutine:
Code: Select all
SrvDoFunc = 43 Sub (D2Game + 0x93990):
int __stdcall Sub(D2Game* pGame, D2Unit* pUnit, D2Unit* pSrcUnit, int MissileId, int Param, int Range, int SkillId, int SkillLvl)
This subfunction is dangerous because it reset unit Seed for the first one D2Unit and it set its high word to 0x29A (default initial value) and its low word to the current PosX of the target. The issue is that both of these units (pUnit and pSrcUnit) are exactly the same when this function is called by respective SrvDoFunc. So every time when Astro or Laz are summoning the totems it reset their Seed value depending on their target location (world x coordinate). Now if you don't understand what's the matter with that Seed then you should know that not only AI behavior depending on this value, drop rates affected by it as well and pretty much every random operation on this unit relying on it. Your world location is a well known value on the client side, that is you can calculate the exact Seed value each time when Astro or Laz decided to use their totem skill. After that you can apply MWC generator function to this value N times (this value can be estimated as well to some extent) and that's pretty much it, you have a small sequence of possible values. By using this information you can estimate their next AI action or what would they drop if you kill them during the next several frames.
It's highly unusual to see something like that, typically game set initial Seed value when the unit is being created and after that this value can only move forward by applying MWC generator transformation to it and never reset. There is an exception though which leads me to the next point and that's why I'm convinced this is a bug and not a feature. Among the other unit types there is a missile type, it's not unusual for missiles to use their target coordinates as an initial Seed value, lifespan for missiles is short and quality of randomness doesn't matter that much for them. Here is the few examples to prove my point: SrvHitFunc (missile) = 38, 40, 45, 58; SrvDoFunc (missile) = 8, 10, 17, 25, 28, 34. Now to the interesting part, coincidentally SrvHitFunc = 40 is calling exactly the same subroutine that I already described, this time though pUnit and pSrcUnit are not the same, in fact pUnit is a missile! I believe that Blizzard decided to reuse an existing code from SrvHitFunc (missile) = 40 and apply it to SrvDoFunc (skill) = 43, it's perfectly fine in the former case and unacceptable in the latter.
In conclusion I have to say that I hope this bug will get fixed. Even though it's hard to exploit on its full potential, I don't think there is a place in the game for something like that. As a side note, fixing this bug might improve the AI for these bosses, no more stupid endless totem spam from the offsceen?