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

feat(balance): strength affects movecost of drawing bows #4145

Merged
merged 6 commits into from
Mar 2, 2024
Merged
Changes from all commits
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
4 changes: 4 additions & 0 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11696,6 +11696,10 @@ int Character::item_reload_cost( const item &it, item &ammo, int qty ) const
/** @EFFECT_STR over 10 reduces reload time of some weapons */
/** maximum reduction down to 25% of reload rate */
mv *= std::max<float>( 10.0f / std::max<float>( 10.0f, get_str() ), 0.25f );
} else if( it.has_flag( flag_STR_DRAW ) && it.get_min_str() > 1 ) {
// Threshold depends on str_req of the weapon instead of a fixed value
// Allow understrength characters to draw slower since base reload rate is about the same for all bows
mv *= std::max<float>( it.get_min_str() / std::max<float>( 1, get_str() ), 0.25f );
}

return std::max( mv, 25 );
Expand Down
Loading