… | |
… | |
858 | * then calls this function. |
858 | * then calls this function. |
859 | */ |
859 | */ |
860 | if (QUERY_FLAG (tmp, FLAG_APPLIED) && tmp->type == POTION) |
860 | if (QUERY_FLAG (tmp, FLAG_APPLIED) && tmp->type == POTION) |
861 | continue; |
861 | continue; |
862 | |
862 | |
863 | /* See note in map.c:update_position about making this additive |
|
|
864 | * since light sources are never applied, need to put check here. |
|
|
865 | */ |
|
|
866 | glow_radius = max (glow_radius, tmp->glow_radius); |
863 | glow_radius += tmp->glow_radius; |
867 | |
864 | |
868 | /* For some things, we don't care what is equipped */ |
865 | /* For some things, we don't care what is equipped */ |
869 | if (tmp->type == SKILL) |
866 | if (tmp->type == SKILL) |
870 | { |
867 | { |
871 | /* Want to take the highest skill here. */ |
868 | /* Want to take the highest skill here. */ |
… | |
… | |
1137 | else /* To nullify the below effect */ |
1134 | else /* To nullify the below effect */ |
1138 | ac += tmp->stats.ac + tmp->magic; |
1135 | ac += tmp->stats.ac + tmp->magic; |
1139 | } |
1136 | } |
1140 | |
1137 | |
1141 | if (tmp->stats.wc) |
1138 | if (tmp->stats.wc) |
1142 | wc -= (tmp->stats.wc + tmp->magic); |
1139 | wc -= tmp->stats.wc + tmp->magic; |
1143 | |
1140 | |
1144 | if (tmp->stats.ac) |
1141 | if (tmp->stats.ac) |
1145 | ac -= (tmp->stats.ac + tmp->magic); |
1142 | ac -= tmp->stats.ac + tmp->magic; |
1146 | |
1143 | |
1147 | if (ARMOUR_SPEED (tmp)) |
1144 | if (ARMOUR_SPEED (tmp)) |
1148 | max_speed = min (max_speed, ARMOUR_SPEED (tmp) / 10.f); |
1145 | max_speed = min (max_speed, ARMOUR_SPEED (tmp) / 10.f); |
1149 | |
1146 | |
1150 | break; |
1147 | break; |
1151 | } /* switch tmp->type */ |
1148 | } /* switch tmp->type */ |
1152 | } /* item is equipped */ |
1149 | } /* item is equipped */ |
1153 | } /* for loop of items */ |
1150 | } /* for loop of items */ |
|
|
1151 | |
|
|
1152 | glow_radius = min (glow_radius, MAX_LIGHT_RADIUS); |
1154 | |
1153 | |
1155 | /* We've gone through all the objects the player has equipped. For many things, we |
1154 | /* We've gone through all the objects the player has equipped. For many things, we |
1156 | * have generated intermediate values which we now need to assign. |
1155 | * have generated intermediate values which we now need to assign. |
1157 | */ |
1156 | */ |
1158 | |
1157 | |