--- deliantra/server/common/living.C 2007/07/04 18:03:48 1.69 +++ deliantra/server/common/living.C 2007/07/21 14:37:25 1.71 @@ -810,6 +810,8 @@ stats.luck = arch->stats.luck; speed = arch->speed; + sint16 digestion = 0; // a local var to add digestion + /* OK - we've reset most all the objects attributes to sane values. * now go through and make adjustments for what the player has equipped. */ @@ -891,7 +893,7 @@ tmp->type == DISEASE || tmp->type == FORCE || tmp->type == SKILL) { - contr->digestion += tmp->stats.food; + digestion += tmp->stats.food; contr->gen_hp += tmp->stats.hp; contr->gen_sp += tmp->stats.sp; contr->gen_grace += tmp->stats.grace; @@ -1135,6 +1137,9 @@ } /* item is equipped */ } /* for loop of items */ + // now clamp digestion to our limits + contr->digestion = clamp (digestion, MIN_DIGESTION, MAX_DIGESTION); + /* We've gone through all the objects the player has equipped. For many things, we * have generated intermediate values which we now need to assign. */ @@ -1511,14 +1516,11 @@ char buf[MAX_BUF]; /* tmp. string buffer */ /* now grab the 'dragon_ability'-forces from the player's inventory */ - shstr_cmp dragon_ability_force ("dragon_ability_force"); - shstr_cmp dragon_skin_force ("dragon_skin_force"); - for (tmp = who->inv; tmp; tmp = tmp->below) if (tmp->type == FORCE) - if (tmp->arch->archname == dragon_ability_force) + if (tmp->arch->archname == shstr_dragon_ability_force) abil = tmp; - else if (tmp->arch->archname == dragon_skin_force) + else if (tmp->arch->archname == shstr_dragon_skin_force) skin = tmp; /* if the force is missing -> bail out */