… | |
… | |
155 | /* the caster gets an increase in ability based on thier skill lvl */ |
155 | /* the caster gets an increase in ability based on thier skill lvl */ |
156 | if (rp->skill) |
156 | if (rp->skill) |
157 | { |
157 | { |
158 | skop = find_skill_by_name (caster, rp->skill); |
158 | skop = find_skill_by_name (caster, rp->skill); |
159 | if (!skop) |
159 | if (!skop) |
160 | { |
|
|
161 | new_draw_info (NDI_UNIQUE, 0, caster, "You do not have the proper skill for this recipe"); |
160 | new_draw_info (NDI_UNIQUE, 0, caster, "You do not have the proper skill for this recipe"); |
162 | } |
|
|
163 | else |
161 | else |
164 | { |
|
|
165 | ability += (int) (skop->level * ((4.0 + cauldron->magic) / 4.0)); |
162 | ability += (int) (skop->level * ((4.0 + cauldron->magic) / 4.0)); |
166 | } |
|
|
167 | } |
163 | } |
168 | else |
164 | else |
169 | { |
165 | { |
170 | LOG (llevDebug, "Recipe %s has NULL skill!\n", &rp->title); |
166 | LOG (llevDebug, "Recipe %s has NULL skill!\n", &rp->title); |
171 | return; |
167 | return; |
172 | } |
168 | } |
173 | |
169 | |
174 | if (rp->cauldron) |
170 | if (!rp->cauldron) |
175 | { |
171 | { |
176 | LOG (llevDebug, "Recipe %s has NULL cauldron!\n", &rp->title); |
172 | LOG (llevDebug, "Recipe %s has NULL cauldron!\n", &rp->title); |
177 | return; |
173 | return; |
178 | } |
174 | } |
179 | |
175 | |