-
Notifications
You must be signed in to change notification settings - Fork 290
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
Allow using stronger bows at penalty #1501
Conversation
I do think this makes bows much more viable in general. I used to start with bows and move to a repeating crossbow as soon as I could because the big problem with bows was if you take a few hits suddenly you can't fire your bow at all. But any crossbow besides a repeater reloads and fires so slowly you can rarely get more than a single shot before you have to drop it and go melee. You might want to consider including the self bow because I've had the issue as low as that if I've been caught in a bad spot or just hit by a wasp a couple times. |
Self bows in BN currently have no strength requirement, unlike in DDA. |
I hadn't noticed that. Maybe I'm misremembering and it was a short bow then. Anyway, thanks for this fix because as I said the old way made bows kind of risky to use. |
Co-authored-by: Olanti <olanti-p@yandex.ru>
Had a big comment typed out, then my power died... The current penalties are a bit too linear. I'd rather see something more quantified, with bow requirements being more strict.
I mostly want to avoid cases where a "stronger" bow, above your str, is still better than properly sized one. I like the line in requirements. I think you can add colors either by using tags or |
Hmm, worth a try tomorrow perhaps. Though "can't try" does mean we'd be putting back in a hard limit, just a much more generous one, which I guess is okay. |
How should these penalties scale? i.e. when do they actually start to kick in, and how extreme should they get? If I'm reading it right, your idea would be something like:
|
I'd say no scaling, just breakpoints. |
Ah, hmm. So basically if I'm reading the earlier post right:
I think I get the rough idea, though the breakpoint between 75% and 76% strength will carry a lot of debuffs with it. Will tinker with it when I get the chance today, likely will be out and about. |
src/item.cpp
Outdated
req.push_back( string_format( "%s %d", _( "strength" ), get_min_str() ) ); | ||
avatar &viewer = get_avatar(); | ||
int weapon_str = get_min_str(); | ||
if( has_flag( flag_STR_DRAW ) && viewer.has_trait( trait_PROF_CHURL ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arcane bonus, badly documented.
Display shows new values, but game still uses the old ones. |
Oh hecc, I thought I fixed all those, I'll tinker with that in a bit. Regarding the Churl mechanic, should I just remove it, or write a mention into the description of the Churl trait? |
For now, remove. |
That works then. |
So I'm looking at this, and I don't see any case of this?
Am I missing something, or is a case where I should rename the functions to be less confusing? |
@@ -3326,7 +3327,7 @@ bool Character::meets_skill_requirements( const construction &con ) const | |||
|
|||
bool Character::meets_stat_requirements( const item &it ) const | |||
{ | |||
return get_str() >= it.get_min_str() && | |||
return ( it.has_flag( flag_STR_DRAW ) || get_str() >= it.get_min_str() ) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a check for 0.5 of min.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It checks for this at a different part of the firing process, to allow for it to print a different failure message.
_( "strength" ), get_min_str() ) ); | ||
} else { | ||
req.push_back( string_format( "%s %d <color_yellow>(Damage 0.9x)</color>", _( "strength" ), | ||
get_min_str() ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This 0.9 is too "graded". The strength requirements are supposed to be the minimum, anything below is already low, not "almost optimal".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be a better multiplier to use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Treat full minimum requirements as "barely enough". Below that, 0.75 multipliers are good - 0.75 means it's still usable, but with a noticeable dip in power. Good enough to finish a fight, but you shouldn't be using the bow if your base strength is below minimum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. Should all three stat penalties kick in and be 0.75x when below 100% strength, or should they still kick in one per stage (damage, damage+range, damage+range+dispersion) as they do now?
I tested something I expected not to work: stat loss causing inability to use the weapon at range. |
That was already a feature of the existing stat requirements if I recall. The stat penalties for "strength below requirement but still 50% or more" should also update correctly as your stats change since they're checked at the moment of firing, but I don't recall if I double-checked that. |
Summary
SUMMARY: Balance "Make bow strength requirement a soft limit, allowing you to fire stronger bows at penalty"
Purpose of change
A while ago I wanted to set it up so that the strength requirement of bows is a soft one instead of a hard one, with penalties that scale based on how much strength you're missing relative to the weapon's requirement.
Describe the solution
Character::meets_stat_requirements
waives strength requirement if ye oldenSTR_DRAW
flag is present. Instead, a separate check inranged::gunmode_checks_common
prevents firing if you have less than half the strength needed.item::gun_info
showing damage multiplier andplayer::fire_gun
actually implementing it on firing. The first tier of insufficient strength reduces damage and range by 25%. Below 75% strength it jumps up to a 50% penalty, also adding a dispersion penalty.item::gun_range
so that the old unusedSTR_DRAW
flag actually works.player::get_weapon_dispersion
adds a dispersion penalty that kicks in at the second tier of penalty,STR_DRAW
back to flag JSON, with it explaining that you can fire the weapon at penalty.STR_DRAW
flag to all bows.STR_DRAW
flag.Describe alternatives you've considered
Testing
Additional context
Archery damage/range/dispersion penalties, ordinary character: