Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Butchering proficiencies #76156

Merged
merged 15 commits into from
Sep 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix syntax error
  • Loading branch information
GuardianDll committed Sep 3, 2024
commit d54768fc2c1c64a10bb55160949904ec7cd4d500
44 changes: 23 additions & 21 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,14 +818,16 @@

if( ( corpse.harvest->has_entry_type( harvest_drop_flesh ) ||
corpse.harvest->has_entry_type( harvest_drop_offal ) ) && ( action == butcher_type::FULL ||
action == butcher_type::QUICK || action == butcher_type::FIELD_DRESS ) ) ) {
action == butcher_type::QUICK || action == butcher_type::FIELD_DRESS ) ) {
time_to_cut *= 1.25 - ( 0.25 * you.get_proficiency_practice( proficiency_prof_butchering_adv ) );
time_to_cut *= 1.75 - ( 0.75 * you.get_proficiency_practice( proficiency_prof_butchering_basic ) );
}

// Skinning decrease the cutting speed only a little, and decreases the output mostly
if( corpse.harvest->has_entry_type( harvest_drop_skin ) && ( action == butcher_type::FULL ||
action == butcher_type::QUICK || action == butcher_type::SKIN ) ) {
time_to_cut *= 1.25 - ( 0.25 * you.get_proficiency_practice( proficiency_prof_skinning_adv ) );
time_to_cut *= 1.25 - ( 0.25 * you.get_proficiency_practice( proficiency_prof_skinning_basic ) );

}

time_to_cut *= ( 1.0f - ( get_player_character().get_num_crafting_helpers( 3 ) / 10.0f ) );
Expand Down Expand Up @@ -1076,7 +1078,7 @@
if( corpse_item->has_flag( flag_SKINNED ) ) {
monster_weight = std::round( 0.85 * monster_weight );
}
const int entry_count = ( action == butcher_type::DISSECT &&

Check failure on line 1081 in src/activity_handlers.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

unused variable 'entry_count' [-Werror,-Wunused-variable]
!mt.dissect.is_empty() ) ? mt.dissect->get_all().size() : mt.harvest->get_all().size();
int monster_weight_remaining = monster_weight;
int practice = 0;
Expand Down Expand Up @@ -1296,29 +1298,29 @@
0 ) + 4 );
}

// handle our prof training
// 40% time to skin the animal, 40% to actually butcher it, 20 for mics activities
// handle our prof training
// 40% time to skin the animal, 40% to actually butcher it, 20 for mics activities

if( mt.harvest->has_entry_type( harvest_drop_flesh ) ||
mt.harvest->has_entry_type( harvest_drop_offal ) ) {
if( you.has_proficiency( proficiency_prof_butchering_basic ) ) {
you.practice_proficiency( proficiency_prof_butchering_adv,
time_duration::from_moves<int>( moves_total / 2.5 ) );
} else {
you.practice_proficiency( proficiency_prof_butchering_basic,
time_duration::from_moves<int>( moves_total / 2.5 ) );
}
if( mt.harvest->has_entry_type( harvest_drop_flesh ) ||
mt.harvest->has_entry_type( harvest_drop_offal ) ) {
if( you.has_proficiency( proficiency_prof_butchering_basic ) ) {
you.practice_proficiency( proficiency_prof_butchering_adv,
time_duration::from_moves<int>( moves_total / 2.5 ) );
} else {
you.practice_proficiency( proficiency_prof_butchering_basic,
time_duration::from_moves<int>( moves_total / 2.5 ) );
}
}

if( mt.harvest->has_entry_type( harvest_drop_skin ) ) {
if( you.has_proficiency( proficiency_prof_skinning_basic ) ) {
you.practice_proficiency( proficiency_prof_skinning_adv,
time_duration::from_moves<int>( moves_total / 2.5 ) );
} else {
you.practice_proficiency( proficiency_prof_skinning_basic,
time_duration::from_moves<int>( moves_total / 2.5 ) );
}
if( mt.harvest->has_entry_type( harvest_drop_skin ) ) {
if( you.has_proficiency( proficiency_prof_skinning_basic ) ) {
you.practice_proficiency( proficiency_prof_skinning_adv,
time_duration::from_moves<int>( moves_total / 2.5 ) );
} else {
you.practice_proficiency( proficiency_prof_skinning_basic,
time_duration::from_moves<int>( moves_total / 2.5 ) );
}
}


// after this point, if there was a liquid handling from the harvest,
Expand Down
Loading