A bump to a very old post, I know, but I've been away for a long time due to many reasons and figured I'd update folks with the minhit not working that I found.
It's because AvoidDamage in attack.cpp doesn't recognize it as minhit - it still reduces the damage done when factoring in AC, even for the minhit.
To give an example:
NPC has minhit of 200, maxhit of 500
NPC hits for minhit and it's then sent to Mob::AvoidDamage() as the damage amount - which has AC factored in to lower that damage even more.
What I did to fix this was add another field to Mob::AvoidDamage() and called it minhit. This then pulled the minimum damage an npc can hit for and factored it into AvoidDamage. I then put a check in Mob::AvoidDamage in attack.cpp to ensure that if after the AC mods were factored in, the damage was lower than minhit, it used minhit as the damage value.
|