… | |
… | |
933 | if (QUERY_FLAG (tmp, FLAG_APPLIED)) |
933 | if (QUERY_FLAG (tmp, FLAG_APPLIED)) |
934 | for (int i = 0; i < NUM_BODY_LOCATIONS; i++) |
934 | for (int i = 0; i < NUM_BODY_LOCATIONS; i++) |
935 | slot[i].used += tmp->slot[i].info; |
935 | slot[i].used += tmp->slot[i].info; |
936 | |
936 | |
937 | if (tmp->type == SYMPTOM) |
937 | if (tmp->type == SYMPTOM) |
938 | speed_reduce_from_disease = |
|
|
939 | min (speed_reduce_from_disease, tmp->last_sp ? tmp->last_sp / 100.f : 1.f); |
938 | min_it (speed_reduce_from_disease, tmp->last_sp ? tmp->last_sp / 100.f : 1.f); |
940 | |
939 | |
941 | /* Pos. and neg. protections are counted separate (-> pro/vuln). |
940 | /* Pos. and neg. protections are counted separate (-> pro/vuln). |
942 | * (Negative protections are calculated exactly like positive.) |
941 | * (Negative protections are calculated exactly like positive.) |
943 | * Resistance from potions are treated special as well. If there's |
942 | * Resistance from potions are treated special as well. If there's |
944 | * more than one potion-effect, the bigger prot.-value is taken. |
943 | * more than one potion-effect, the bigger prot.-value is taken. |
… | |
… | |
1041 | |
1040 | |
1042 | if (tmp->stats.ac) |
1041 | if (tmp->stats.ac) |
1043 | ac -= tmp->stats.ac + tmp->magic; |
1042 | ac -= tmp->stats.ac + tmp->magic; |
1044 | |
1043 | |
1045 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1044 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1046 | contr->encumbrance += (int) 3 *tmp->weight / 1000; |
1045 | contr->encumbrance += 3 * tmp->weight / 1000; |
1047 | } |
1046 | } |
1048 | |
1047 | |
1049 | break; |
1048 | break; |
1050 | |
1049 | |
1051 | case SHIELD: |
1050 | case SHIELD: |
1052 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1051 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1053 | contr->encumbrance += (int) tmp->weight / 2000; |
1052 | contr->encumbrance += tmp->weight / 2000; |
|
|
1053 | //FALLTHROUGH |
1054 | case RING: |
1054 | case RING: |
1055 | case AMULET: |
1055 | case AMULET: |
1056 | case GIRDLE: |
1056 | case GIRDLE: |
1057 | case HELMET: |
1057 | case HELMET: |
1058 | case BOOTS: |
1058 | case BOOTS: |