… | |
… | |
36 | #include <sproto.h> |
36 | #include <sproto.h> |
37 | |
37 | |
38 | /** |
38 | /** |
39 | * Returns the id of specified god. |
39 | * Returns the id of specified god. |
40 | */ |
40 | */ |
41 | int |
41 | static int |
42 | lookup_god_by_name (shstr_cmp name) |
42 | lookup_god_by_name (shstr_cmp name) |
43 | { |
43 | { |
44 | if (name) |
44 | if (name) |
45 | for (godlink *gl = first_god; gl; gl = gl->next) |
45 | for (godlink *gl = first_god; gl; gl = gl->next) |
46 | if (gl->name == name) |
46 | if (gl->name == name) |
… | |
… | |
282 | } |
282 | } |
283 | |
283 | |
284 | /** |
284 | /** |
285 | * Unapplies up to number worth of items of type |
285 | * Unapplies up to number worth of items of type |
286 | */ |
286 | */ |
287 | void |
287 | static void |
288 | stop_using_item (object *op, int type, int number) |
288 | stop_using_item (object *op, int type, int number) |
289 | { |
289 | { |
290 | object *tmp; |
290 | object *tmp; |
291 | |
291 | |
292 | for (tmp = op->inv; tmp && number; tmp = tmp->below) |
292 | for (tmp = op->inv; tmp && number; tmp = tmp->below) |
… | |
… | |
887 | { |
887 | { |
888 | object *depl; |
888 | object *depl; |
889 | archetype *at; |
889 | archetype *at; |
890 | int i; |
890 | int i; |
891 | |
891 | |
892 | if ((at = archetype::find (ARCH_DEPLETION)) == NULL) |
892 | if ((at = archetype::find (shstr_depletion)) == NULL) |
893 | { |
893 | { |
894 | LOG (llevError, "Could not find archetype depletion.\n"); |
894 | LOG (llevError, "Could not find archetype depletion.\n"); |
895 | continue; |
895 | continue; |
896 | } |
896 | } |
897 | |
897 | |
… | |
… | |
1063 | } |
1063 | } |
1064 | } |
1064 | } |
1065 | } |
1065 | } |
1066 | |
1066 | |
1067 | /** |
1067 | /** |
1068 | * Returns priest's god's id. |
|
|
1069 | * Straight calls lookup_god_by_name |
|
|
1070 | */ |
|
|
1071 | int |
|
|
1072 | get_god (object *priest) |
|
|
1073 | { |
|
|
1074 | return lookup_god_by_name (determine_god (priest)); |
|
|
1075 | } |
|
|
1076 | |
|
|
1077 | /** |
|
|
1078 | * Changes the attributes of cone, smite, and ball spells as needed by the code. |
1068 | * Changes the attributes of cone, smite, and ball spells as needed by the code. |
1079 | * Returns false if there was no race to assign to the slaying field of the spell, but |
1069 | * Returns false if there was no race to assign to the slaying field of the spell, but |
1080 | * the spell attacktype contains AT_HOLYWORD. -b.t. |
1070 | * the spell attacktype contains AT_HOLYWORD. -b.t. |
1081 | */ |
1071 | */ |
1082 | int |
1072 | int |