« Return to Thread: Nerfed crossbows?

Nerfed crossbows?

by Silas Dunsmore :: Rate this Message:

Reply to Author | View in Thread

I have noticed that crossbows are severely underpowered compared to
Nethack.  Is this intentional?

A Slash'EM Gnomish Ranger starts with a +1 crossbow and has the natural
Ranger ability to fire one more missile per turn than other classes, yet
he has no chance of firing two bolts in one turn.

To gain even a 25% chance of firing two in one turn, he must be:
        a Ranger, Expert in crossbow, or
        a Ranger, Skilled in crossbow, and using at least a +2 crossbow, or
        a Ranger, Basic in crossbow and using at least a +5 crossbow,
        non-Ranger, Expert in crossbow, and using at least a +2 crossbow, or
        non-Ranger, Skilled in crossbow, and using at least a +5 crossbow.

This is because crossbows are GUNs in Slash'EM, and their rate-of-fire
is -1, which subtracts 2 (not 1) from the multishot calculation, if the
game is compiled with FIREARMS.  No such subtraction is made if FIREARMS
is not used.

The Ranger's flurry technique does not help because crossbows do not use
the P_BOW skill.

Crossbow bolts are already inferior to arrows.  This just doesn't seem
right.

If there is agreement on this, I am willing to make a patch.


        Silas Dunsmore



Here's my analysis:

In objects.c, GUNs have these parameters:
        (name,app,kn,bi,prob,wt,cost,range,rof,hitbon,ammotyp,metal,sub,color)
And crossbows are defined as:
        GUN("crossbow", (char *)0, 0, 1, 45, 50, 40, 12, -1, 0,
        WP_GENERIC, WOOD, P_CROSSBOW, HI_WOOD)
Note the -1 for the rof field.

In dothrow.c, in the throw_obj() routine, there are some multishot
calculations that are relevant for the case in question:

            switch (P_SKILL(weapon_type(obj))) {
            default: break; /* No bonus */
            case P_SKILLED: multishot++; break;
            case P_EXPERT: multishot += 2; break;
            }
and
            /* 1/3 of object enchantment */
            if (launcher && launcher->spe > 1)
                multishot += (long) rounddiv(launcher->spe,3);
and
            switch (Role_switch) {
            case PM_RANGER:
                multishot++;
                break;

The various tests for elven bow, elf/orc race, etc. don't apply.

We will see later that a multishot bonus of 4 must be reached to have a
25% chance of firing just 2 missiles.
Similarly, a multishot bonus of 5 must be reached to have a 20% chance
of firing 3 missiles and another 20% chance of firing 2 missiles.

Let's say that we have a bonus for being Skilled, and a bonus for being
a Ranger, but no bonus from weapon enchantment.  That gives us a
multishot score of 3.

Then we randomize:
            if (multishot > 0)
            multishot = rnd(multishot); /* Some randomness */
            else multishot = 1;
now our hypothetical multishot might be 1, 2, or 3.

Then we hit the FIREARMS-specific code:

#ifdef FIREARMS
            if (launcher && is_launcher(launcher))
            {
                if (objects[(launcher->otyp)].oc_rof)
                    multishot += (objects[(launcher->otyp)].oc_rof - 1);

.oc_rof is -1 for crossbows.  So this subtracts 2 from multishot.  That's
the critical change that makes crossbows so unattractive.

This puts our hypothetical multishot at -1, 0, or 1.

Then there's a bounds check:
        if (multishot < 1) multishot = 1;

So our Skilled (+1) Ranger (+1) with the starting crossbow (no mod) has
no chance of shooting more than one bolt.  You need an intitial multishot
score of 4 to have the 1-in-4 chance of getting a final multishot score
of 2, and thus shoot two bolts.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Slashem-devel mailing list
Slashem-devel@...
https://lists.sourceforge.net/lists/listinfo/slashem-devel

 « Return to Thread: Nerfed crossbows?