… | |
… | |
808 | ac = arch->stats.ac; |
808 | ac = arch->stats.ac; |
809 | |
809 | |
810 | stats.luck = arch->stats.luck; |
810 | stats.luck = arch->stats.luck; |
811 | speed = arch->speed; |
811 | speed = arch->speed; |
812 | |
812 | |
|
|
813 | sint16 digestion = 0; // a local var to add digestion |
|
|
814 | |
813 | /* OK - we've reset most all the objects attributes to sane values. |
815 | /* OK - we've reset most all the objects attributes to sane values. |
814 | * now go through and make adjustments for what the player has equipped. |
816 | * now go through and make adjustments for what the player has equipped. |
815 | */ |
817 | */ |
816 | for (tmp = inv; tmp; tmp = tmp->below) |
818 | for (tmp = inv; tmp; tmp = tmp->below) |
817 | { |
819 | { |
… | |
… | |
889 | tmp->type == AMULET || tmp->type == GIRDLE || |
891 | tmp->type == AMULET || tmp->type == GIRDLE || |
890 | tmp->type == BRACERS || tmp->type == CLOAK || |
892 | tmp->type == BRACERS || tmp->type == CLOAK || |
891 | tmp->type == DISEASE || tmp->type == FORCE || |
893 | tmp->type == DISEASE || tmp->type == FORCE || |
892 | tmp->type == SKILL) |
894 | tmp->type == SKILL) |
893 | { |
895 | { |
894 | contr->digestion += tmp->stats.food; |
896 | digestion += tmp->stats.food; |
895 | contr->gen_hp += tmp->stats.hp; |
897 | contr->gen_hp += tmp->stats.hp; |
896 | contr->gen_sp += tmp->stats.sp; |
898 | contr->gen_sp += tmp->stats.sp; |
897 | contr->gen_grace += tmp->stats.grace; |
899 | contr->gen_grace += tmp->stats.grace; |
898 | contr->gen_sp_armour += tmp->gen_sp_armour; |
900 | contr->gen_sp_armour += tmp->gen_sp_armour; |
899 | } |
901 | } |
… | |
… | |
1132 | |
1134 | |
1133 | break; |
1135 | break; |
1134 | } /* switch tmp->type */ |
1136 | } /* switch tmp->type */ |
1135 | } /* item is equipped */ |
1137 | } /* item is equipped */ |
1136 | } /* for loop of items */ |
1138 | } /* for loop of items */ |
|
|
1139 | |
|
|
1140 | // now clamp digestion to our limits |
|
|
1141 | contr->digestion = clamp (digestion, MIN_DIGESTION, MAX_DIGESTION); |
1137 | |
1142 | |
1138 | /* We've gone through all the objects the player has equipped. For many things, we |
1143 | /* We've gone through all the objects the player has equipped. For many things, we |
1139 | * have generated intermediate values which we now need to assign. |
1144 | * have generated intermediate values which we now need to assign. |
1140 | */ |
1145 | */ |
1141 | |
1146 | |