… | |
… | |
1141 | } /* for loop of items */ |
1141 | } /* for loop of items */ |
1142 | |
1142 | |
1143 | if (type != PLAYER) |
1143 | if (type != PLAYER) |
1144 | this->chosen_skill = chosen_skill; |
1144 | this->chosen_skill = chosen_skill; |
1145 | |
1145 | |
1146 | glow_radius = min (glow_radius, MAX_LIGHT_RADIUS); |
1146 | min_it (glow_radius, MAX_LIGHT_RADIUS); |
1147 | |
1147 | |
1148 | /* We've gone through all the objects the player has equipped. For many things, we |
1148 | /* We've gone through all the objects the player has equipped. For many things, we |
1149 | * have generated intermediate values which we now need to assign. |
1149 | * have generated intermediate values which we now need to assign. |
1150 | */ |
1150 | */ |
1151 | |
1151 | |
… | |
… | |
1158 | for (int i = 0; i < NROFATTACKS; i++) |
1158 | for (int i = 0; i < NROFATTACKS; i++) |
1159 | { |
1159 | { |
1160 | resist[i] = prot[i] - vuln[i]; |
1160 | resist[i] = prot[i] - vuln[i]; |
1161 | |
1161 | |
1162 | if (potion_resist[i] != -1000 |
1162 | if (potion_resist[i] != -1000 |
1163 | && (potion_resist[i] > resist[i] || potion_resist[i] < 0)) |
1163 | && (potion_resist[i] < 0 || potion_resist[i] > resist[i])) |
1164 | resist[i] = potion_resist[i]; |
1164 | resist[i] = potion_resist[i]; |
1165 | } |
1165 | } |
1166 | |
1166 | |
1167 | if (type == PLAYER) |
1167 | if (type == PLAYER) |
1168 | { |
1168 | { |