C:B:num:wgt:mul?

Anything that has spoilers in it should go in here

Moderator: Moderator

Post Reply
Message
Author
Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

C:B:num:wgt:mul?

#1 Post by Lord Estraven »

The major classes in p_info.txt all have lines that look like this:

C:B:num:wgt:mul

e.g. for Mages

C:B:4:40:2

What is this? Some source code diving indicates it has to do with the number of blows a character gets with weapons of a certain weight, but I'm not sure exactly what the effect is (or if the code isn't dead). Anyone know more about this?

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: C:B:num:wgt:mul?

#2 Post by AnonymousHero »

AFICT the values end up being used here:

Code: Select all

/* Returns the blow information based on class */
void analyze_blow(int *num, int *wgt, int *mul)
{
        *num = cp_ptr->blow_num;
        *wgt = cp_ptr->blow_wgt;
        *mul = cp_ptr->blow_mul;

        /* Count bonus abilities */
        (*num) += get_extra_blows_ability();
}
If I understand the code in xtra1.c correctly,
  • "num" is the maximum number of (base) blows. (Before bonuses.)
  • "wgt" is used as a limiting factor for STR requirements per weight.
  • "mul" is used for scaling.
and these are used (indirectly, scaled) for indexing into the blows_table to calculate determine the final number of blows.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: C:B:num:wgt:mul?

#3 Post by Lord Estraven »

Thanks! And ick, I thought T2 was mostly free of such things. No wonder Mages are incurably bad at melee.

Post Reply