|
For enchantment chances:
const struct enchantment_type enchantment_table[] =
{
{ APPLY_STR, 40, 0, 4 },
{ APPLY_CON, 40, 0, 4 },
{ APPLY_VIT, 40, 0, 4 },
{ APPLY_AGI, 40, 0, 4 },
{ APPLY_DEX, 40, 0, 4 },
{ APPLY_INT, 0, 40, 4 },
{ APPLY_WIS, 0, 40, 4 },
{ APPLY_DIS, 0, 40, 4 },
{ APPLY_CHA, 0, 40, 4 },
{ APPLY_LUC, 0, 40, 4 },
{ APPLY_HIT, 100, 100, 10 },
{ APPLY_MANA, 0, 100, 10 },
{ APPLY_MOVE, 100, 0, 10 },
{ APPLY_HITROLL, 100, 0, 1 },
{ APPLY_DAMROLL, 100, 0, 1 },
{ APPLY_AC, 50, 50, -10 },
{ APPLY_SAVES, 40, 60, -1 },
{}
};
First column is physical, second mental. All are relative probabilities.
That is, to get the chance of a strength bonus on a physical enchant,
take 40 divided by the sum of all values:
40 / (5*40 + 4*100 + 50 + 40) = 40 / 690 = 5.8%
When neither physical nor mental is specified, take the sum of physical
and mental for each stat.
|