static int calc_bash_skill( const mtype &t ) { int ret = t.melee_dice * t.melee_sides; // IOW, the critter's max bashing damage if( t.has_flag( MF_BORES ) ) { ret *= 15; // This is for stuff that goes through solid rock: minerbots, dark wyrms, etc } else if( t.has_flag( MF_DESTROYS ) ) { ret *= 2.5; } else if( !t.has_flag( MF_BASHES ) ) { ret = 0; } return ret; }
void MonsterGenerator::finalize_pathfinding_settings( mtype &mon ) { if( mon.path_settings.max_length < 0 ) { mon.path_settings.max_length = mon.path_settings.max_dist * 5; } if( mon.path_settings.bash_strength < 0 ) { mon.path_settings.bash_strength = mon.bash_skill; } if( mon.has_flag( MF_CLIMBS ) ) { mon.path_settings.climb_cost = 3; } }