Checking ranged.cpp…first sign of gameplay effects is it shows up in the caluclations for switching targets in the aim menu. Not sure if that implies recoil affects switch targets, or the opposite.
Then an effect where spending time aiming will reduce recoil, then…ah.
if( u.recoil <= aim_threshold ||
u.recoil - u.weapon.sight_dispersion( -1 ) == 0) {
// If we made it under the aim threshold, go ahead and fire.
// Also fire if we're at our best aim level already.
werase( w_target );
wrefresh( w_target );
delwin( w_target );
w_target = nullptr;
return ret;
Likely more affects, still trying to find everything.
EDIT: Additional things in player.cpp:
// This is absolute accuracy for the player.
// TODO: push the calculations duplicated from Creature::deal_projectile_attack() and
// Creature::projectile_attack() into shared methods.
// Dodge is intentionally not accounted for.
const double aim_level =
recoil + driving_recoil + get_weapon_dispersion( weapon, false );
// This is a relative measure of how steady the player's aim is,
// 0 it is the best the player can do.
const double steady_score = recoil - weapon->sight_dispersion( -1 );
// Calculates MOC of aim improvement per 10 moves, based on
// skills, stats, and quality of the gun sight being used.
// Using this weird setup because # of MOC per move is too fast, (slowest is one MOC/move)
// and number of moves per MOC is too slow. (fastest is one MOC/move)
// A worst case of 1 MOC per 10 moves is acceptable, and it scales up
// indefinitely, though the smallest unit of aim time is 10 moves.
int player::aim_per_time( item *gun ) const
{
// Account for Dexterity, weapon skill, weapon mods and flags,
int speed_penalty = 0;
// Ranges from 0 - 600.
// 0 - 10 after adjustment.
speed_penalty += skill_dispersion( gun, false ) / 60;
// Ranges from 0 - 12 after adjustment.
speed_penalty += ranged_dex_mod() / 15;
// Ranges from 0 - 10
speed_penalty += gun->aim_speed( recoil );
// TODO: should any conditions, mutations, etc affect this?
// Probably CBMs too.
int improvement_amount = std::max( 1, 32 - speed_penalty );
// Improvement rate is capped by the max aim level of the gun sight being used.
return std::min( improvement_amount, recoil - gun->sight_dispersion( recoil ) );