Closed mrcook closed 7 years ago
This naming/assignment has been in place since Umoria v4.8.5
(https://github.com/dungeons-of-moria/umoria/blob/v4.8.5/misc2.c#L984-L985), so it's possible that the field naming/comment is what's wrong, but display/computations are correct.
Example output from the game is:
+ To Hit : 4
+ To Damage : 3
+ To AC : 13
Total AC : 28
After a little more digging this does look like it's the comments that are wrong, as the field names have been in place since the original Pascal version: https://github.com/dungeons-of-moria/vms-moria/blob/master/source/include/misc.inc#L2384-L2385
To save future confusion I'll go ahead and update the comments on the struct.
When displaying the character's stats, the
To AC
andTotal AC
are using each others values (https://github.com/dungeons-of-moria/umoria/blob/master/src/misc3.cpp#L944-L945):The comments on the struct fields are:
The assumption here is that
ToTAC
meansTotal AC
.The same happens when writing the character sheet to a file: https://github.com/dungeons-of-moria/umoria/blob/master/src/files.cpp#L202-L205. At this point I'm not sure if other calculations made with these are actually correct.
This mixup exists in the original
Umoria 5.6
source code (https://github.com/HunterZ/umoria/blob/master/source/misc3.c#L1021-L1022) so it looks to be a long standing error.