Leprosy57: Hello everyone...is there any specification about how AC - Speed - to Hit modifier works in these engines? I know that Speed gives a bonus in AC but how is the attack roll being calculated specifically?
dreammaster: At least for World of Xeen, you can see the relevant game logic for calculating the "to hit" value against AC in my ScummVM reimplementation here:
https://github.com/scummvm/scummvm/blob/346d09f69b259f270eef65b6da306b96eb6ed765/engines/xeen/combat.cpp#L933 There's also some relevant getArmorClass in character.cpp that calculates what the armor class is.
Even if you're not familiar with C++, the logic should hopefully be clear enough if you trace into the relevant methods to see how each value is calculated.
So, according to the ScummVM implementation, it appears that, at least when a monster is the one attacking:
* If the target is sleeping, the attack automatically hits. (ScummVM only checks for sleeping; can paralyzed characters dodge attacks?)
* There does appear to be a guaranteed chance of hitting or missing (I believe
* If h is the monster's hit chance, the game (or at least the ScummVM implementation of it) seems to add a number between h/4 and (h + h/4), rather than just h; hence, there is more random variation if it is an enemy doing the attack.
* Defending boosts your AC by 5 + half the character's level; hence, if enemies like to attack a certain character, having that character defend might not be a good idea (assuming the attack is physical).
Note that it's possible that the ScummVM implementation might not be entirely accurate to the original, as it is a separate implementation of the original mechanics. (I have not tried to actually test the accuracy; maybe I might test this out once this project reaches a state where it's ready for bug reports.)
Anyway, one question; did you actually reverse engineer the original code to figure this out? If not, how dod you fighre this out?