What is MAG_BONUS?
The MAG_BONUS spell routine compares a randomized number 0-100 against any character's prime statistic, normalized to a range of 0 - 100, and returns a true or false. This value is used for calculating mob saving throws, offensive spell bonuses and other awesomeness in the MAGIC.C suite of combat tools.
From UTILS.H
#define MAG_BONUS(ch) ( number(0,101)<int_app[GET_INT((ch))].pbonus?1:0 )
From STRUCTS.H
struct int_app_type
{
byte learn; /* what % a player learns per practice */
byte beguilement; /* p resist various spells. 50% at 18 */
byte pbonus; /* prob bonus for various spells 82% at 18 */
};
From CONSTANTS.C
/* [int] apply (all) */
struct int_app_type int_app[26] = {
{3, 0, 0},
{5, 5, 5}, /* 1 */
{7, 10,10},
{8, 12,15},
{9, 15,20},
{10,17,25}, /* 5 */
{11,20,30},
{12,22,35},
{13,25,40},
{15,27,45},
{17,30,50}, /* 10 */
{19,32,55},
{22,35,60},
{25,37,65},
{30,40,70},
{35,42,75}, /* 15 */
{40,45,77},
{45,47,80},
{50,50,82}, /* 18 */
{53,52,95},
{55,55,95}, /* 20 */
{56,57,95},
{60,60,95},
{70,62,95},
{80,65,95},
{99,99,99} /* 25 prob % learning a spell, resistance, casting*/
};
