Yes, the attack bonus should be computed based on the character's class, their strength bonus, and a size modifier.
I'm fairly new to coding C (i've done some java programming) and really just trying some stuff out to get a hold of how everything works.
Another question:
Here is the strength table from the const.c file
const struct str_app_type str_app [26] =
{
{ -5, -4, 0, 0 }, /* 0 */
{ -5, -4, 3, 1 }, /* 1 */
{ -3, -2, 3, 2 },
{ -3, -1, 10, 3 }, /* 3 */
{ -2, -1, 25, 4 },
{ -2, -1, 55, 5 }, /* 5 */
{ -1, 0, 80, 6 },
{ -1, 0, 90, 7 },
{ 0, 0, 100, 8 },
{ 0, 0, 100, 9 },
{ 0, 0, 115, 10 }, /* 10 */
{ 0, 0, 115, 11 },
{ 0, 0, 140, 12 },
{ 0, 0, 140, 13 }, /* 13 */
{ 0, 1, 170, 14 },
{ 1, 1, 170, 15 }, /* 15 */
{ 1, 2, 195, 16 },
{ 2, 3, 220, 22 },
{ 2, 4, 250, 25 }, /* 18 */
{ 3, 5, 400, 30 },
{ 3, 6, 500, 35 }, /* 20 */
{ 4, 7, 600, 40 },
{ 5, 7, 700, 45 },
{ 6, 8, 800, 50 },
{ 8, 10, 900, 55 },
{ 10, 12, 999, 60 } /* 25 */
};
Ok. I assume that this is a table of the different things your strength score modifies: (tohit, carry capacity, etc)
How would I go about adding and extra field to this struct? Does anyone know what each field represents? I believe the third field is the carrying capacity.
Can someone break this line of code down for me:
const struct str_app_type str_app [26] =
Greg |