Skip to content

Commit

Permalink
Merge pull request #118 from CleverRaven/master
Browse files Browse the repository at this point in the history
Merge pull request CleverRaven#39029 from kevingranade/npc-crit-bugfix
  • Loading branch information
fengjixuchui authored Mar 26, 2020
2 parents da247d0 + d959c76 commit b4f91c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,13 +628,13 @@ void Creature::deal_projectile_attack( Creature *source, dealt_projectile_attack
game_message_type gmtSCTcolor = m_neutral;
if( magic ) {
damage_mult *= rng_float( 0.9, 1.1 );
} else if( goodhit < accuracy_headshot && max_damage > 0.4 * get_hp_max() ) {
} else if( goodhit < accuracy_headshot && max_damage > 0.4 * get_hp_max( hp_head ) ) {
message = _( "Headshot!" );
gmtSCTcolor = m_headshot;
damage_mult *= rng_float( 1.95, 2.05 );
bp_hit = bp_head; // headshot hits the head, of course

} else if( goodhit < accuracy_critical && max_damage > 0.4 * get_hp_max() ) {
} else if( goodhit < accuracy_critical && max_damage > 0.4 * get_hp_max( hp_torso ) ) {
message = _( "Critical!" );
gmtSCTcolor = m_critical;
damage_mult *= rng_float( 1.5, 2.0 );
Expand Down

0 comments on commit b4f91c7

Please sign in to comment.