In ....
struct char_data *read_mobile(mob_vnum nr, int type);
if (!mob->points.max_hit) {
mob->points.max_hit = dice(mob->points.hit, mob->points.mana) +
mob->points.move;
} else
mob->points.max_hit = rand_number(mob->points.hit, mob->points.mana);
I understand how the first part works:
if (!mob->points.max_hit) {
mob->points.max_hit = dice(mob->points.hit, mob->points.mana) +
mob->points.move;
because movement/mana is not used for mobiles, they use it to store the HP dice, etc.
But what about the second part:
} else
mob->points.max_hit = rand_number(mob->points.hit, mob->points.mana);
In fact I don't understand why it's checking the value of mob->points.max_hit at all.
Can someone explain this?


