[quote=“Kevin Granade, post:4, topic:3446”]Hmm, I think there might be a bug there, in that it’ll keep hitting a body part after it’s destroyed.
To be fair, the player benefits from the same thing, monsters can keep hitting you in a broken arm, which does nothing to you.
Here’s how it picks hit location:
int hit_value = hit_roll() - target_dodge;
hit_value += rng(-10, 10);
if (hit_value >= 30)
bp_hit = bp_eyes;
else if (hit_value >= 20)
bp_hit = bp_head;
else if (hit_value >= 10)
bp_hit = bp_torso;
else if (one_in(4))
bp_hit = bp_legs;
else
bp_hit = bp_arms;
hit_roll() bundles up everything involved with stats, skills, weapon bonuses, etc*
So basically, if you hit, but just barely, it does a 1:3 split between legs and arms, and if you hit well it gets past the limbs and hits the torso, head, and eyes, in that order. The hits are guaranteed to be spread out amoung the limbs unless your hit roll exceeds their dodge by 20, which I suspect is fairly hard to do, and it’s divided between head and torso unless your roll exceeds theirs by 30. It looks like with even half way decent stats/skills and no encumbrance, you have a really good shot at hit_roll() returning really high values.
Also I think I spotted a bug in the internals, there’s a method player::base_to_hit() that I think is getting called wrong consistently, which means it’s not factoring in melee stats properly.
*Side note, this is roughly how hit_roll() works:
numdice = 1 + int(stat / 2) + skillLevel("melee") + weapon->to_hit + combat boost + specific skill/2;
sides = 10 - encumb(bp_torso);
return dice(numdice, sides);
This is… totally insane ;_;
The stat used defaults to dex, but can be replaced if you’re using a certain martial art.
The specific skill used is the highest “eligible” skill amoung unarmed, bash, cut, and stab.
It also factors in drunken boxing etc.[/quote]
Well it told me I kept hitting him in his eyes. Though he had a riot helmet on so maybe it soaked up damage it wasn’t telling me about?