Skip to content

Commit

Permalink
Make AC and melee/ranged damage rolls less random.
Browse files Browse the repository at this point in the history
Melee combat in crawl is too random and it sucks.
  • Loading branch information
neilmoore committed Sep 5, 2015
1 parent 372c713 commit 8bf63ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions crawl-ref/source/actor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ int actor::apply_ac(int damage, int max_damage, ac_type ac_rule,
return max(damage - saved, 0);

case AC_NORMAL:
saved = random2(1 + ac);
saved = (1 + ac) / 2;
break;
case AC_HALF:
saved = random2(1 + ac) / 2;
saved = (1 + ac) / 4;
ac /= 2;
gdr /= 2;
break;
case AC_TRIPLE:
saved = random2(1 + ac) + random2(1 + ac) + random2(1 + ac);
saved = 3 * (1 + ac) / 2;
ac *= 3;
// apply GDR only twice rather than thrice, that's probably still waaay
// too good. 50% gives 75% rather than 100%, too.
Expand Down
12 changes: 6 additions & 6 deletions crawl-ref/source/attack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ int attack::calc_damage()
if (using_weapon() || wpn_skill == SK_THROWING)
{
damage_max = weapon_damage();
damage += random2(damage_max);
damage += damage_max/2;

int wpn_damage_plus = 0;
if (weapon) // can be 0 for throwing projectiles
Expand All @@ -1391,15 +1391,15 @@ int attack::calc_damage()
wpn_damage_plus += attacker->scan_artefacts(ARTP_SLAYING);

if (wpn_damage_plus >= 0)
damage += random2(wpn_damage_plus);
damage += wpn_damage_plus/2;
else
damage -= random2(1 - wpn_damage_plus);
damage -= (1 - wpn_damage_plus)/2;

damage -= 1 + random2(3);
damage -= 2;
}

damage_max += attk_damage;
damage += 1 + random2(attk_damage);
damage += 1 + attk_damage/2;

damage = apply_damage_modifiers(damage, damage_max);

Expand All @@ -1415,7 +1415,7 @@ int attack::calc_damage()

potential_damage = player_stat_modify_damage(potential_damage);

damage = random2(potential_damage+1);
damage = (potential_damage+1)/2;

damage = player_apply_weapon_skill(damage);
damage = player_apply_fighting_skill(damage, false);
Expand Down

0 comments on commit 8bf63ef

Please sign in to comment.