diff --git a/src/crafting.cpp b/src/crafting.cpp index 6930ee2c633b..fa38a6700ead 100644 --- a/src/crafting.cpp +++ b/src/crafting.cpp @@ -2277,8 +2277,10 @@ void crafting::complete_disassemble( Character &who, const iuse_location &target if( !dis.learn_by_disassembly.empty() && !who.knows_recipe( &dis ) ) { if( who.can_learn_by_disassembly( dis ) ) { - // TODO: make this depend on intelligence - if( one_in( 4 ) ) { + const SkillLevelMap &char_skills = who.get_all_skills(); + float skill_bonus = ( 1.0f + char_skills.exceeds_recipe_requirements( dis ) ) * std::max( 1.0f, + 0.9f + ( who.int_cur * 0.025f ) ); + if( x_in_y( skill_bonus, 4.0 ) ) { // TODO: change to forward an id or a reference who.learn_recipe( &dis.ident().obj() ); add_msg( m_good, _( "You learned a recipe for %s from disassembling it!" ),