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

Scalpels can be multishot despite to-hit penalty when thrown. #1073

Open
Umbire opened this issue Jul 4, 2023 · 3 comments
Open

Scalpels can be multishot despite to-hit penalty when thrown. #1073

Umbire opened this issue Jul 4, 2023 · 3 comments

Comments

@Umbire
Copy link
Contributor

Umbire commented Jul 4, 2023

While refining articles on the wiki, I discovered a couple of interesting bits in the code for throwing weapons:

NetHack/src/dothrow.c

Lines 115 to 118 in f3a923d

/* some roles don't get a volley bonus until becoming expert */
weakmultishot = (Role_if(PM_WIZARD) || Role_if(PM_PRIEST)
|| (Role_if(PM_HEALER) && skill != P_KNIFE)
|| (Role_if(PM_TOURIST) && skill != -P_DART)

NetHack/src/dothrow.c

Lines 1061 to 1071 in f3a923d

boolean
throwing_weapon(obj)
struct obj *obj;
{
return (boolean) (is_missile(obj) || is_spear(obj)
/* daggers and knife (excludes scalpel) */
|| (is_blade(obj) && !is_sword(obj)
&& (objects[obj->otyp].oc_dir & PIERCE))
/* special cases [might want to add AXE] */
|| obj->otyp == WAR_HAMMER || obj->otyp == AKLYS);
}

This seems to indicate that scalpels can be multishot, despite not being designed for throwing and incurring a -2 penalty to-hit when thrown. I feel like the fix for this is relatively simple - but not enough that I'm willing to try throwing together my own just yet, at least until I feel like I have the proper experience and tools - so I'll leave that to the usual folks.

@pat-rankin
Copy link

3.7 allows all types of knives to stack and all stackable weapons have become eligible for multi-shot/multi-throw. In earlier versions scalpels, worm teeth, and crysknives didn't stack but now they do. And I think knives in general may have been excluded from multi-shot eligibility; if so, not anymore.

Scalpels and worm teeth don't pass the throwing_weapon() test (because they aren't flagged as dealing pierce damage) so won't be eligible for auto-quiver. That isn't used to decide whether multi-shot is feasible or how many missiles might be thrown per volley.

That comment about weakmultishot doesn't match what I remember. Wizards and the others mentioned were changed to not get an extra volley boost at skilled level, only one for basic level and another for expert level. I don't know whether my recollection is faulty or the comment is inaccurate or there was a subsequent change that removed the boost at basic level.

Some other multi-shot changes off the top of my head:

Rangers' extra volley boost independent of skill level for all thrown weapons now explicitly excludes daggers. Monks still aren't eligible for whatever skill shuriken use but do get a volley boost when throwing them, so will throw 1 or 2 at a time rather than just 1.

Stabbing spears and javelins used to have separate skills but didn't get used. They now share spear skill so it isn't as expensive to advance both of them, and stabbing spears stack so are eligible for multi-shot (but stacks of them are a lot heavier than stacks of javelins). They still don't get used.

The Longbow of Diana wielded by a ranger gets a volley boost for any type of arrow. Elves using elven bow to shoot elven arrows and orcs using orcish bow to shoot orcish arrows lose their racial bonus when switching to it but don't lose overall volley count anymore. Other characters get a bonus rather than just replace the racial one. (In the code, 'is_quest_artifact()' used to test for any quest artifact. Now 'any_quest_artifact()' does that and 'is_quest_artifact()' only tests for the quest artifact of the hero's own role. Relevant here because there's no explicit check for the Longbow of Diana, just for wielding own role's missile launching quest artifact.)

@Umbire
Copy link
Contributor Author

Umbire commented Jul 15, 2023

...okay, but the central issue I was hoping to focus on on scalpels still having the to-hit penalty despite being stackable and multishot-eligible like other knives (which I don't think were ever excluded but that's largely beside the point anyway). My personal inclination was to adjust things so that scalpels had the same to-hit bonus as other objects designed to be thrown, going on the basis that being made stackable and capable of being multishot is (presumably) intentional.

@copperwater
Copy link
Contributor

Keeping a to-hit penalty for scalpels might make sense - after all they are not designed for use as a melee or throwing weapon, and multishot is fairly irrelevant since you'll only get a stack of them if you wish for them or find multiple healer bones.

There are a few ideas bouncing around for giving scalpels some unique small buff to compensate for the fact they're not a very good weapon, which I'd prefer over making them more identical to the regular knife.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants