|
|
1 | /* |
|
|
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
|
|
3 | * |
|
|
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
|
|
5 | * |
|
|
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
|
|
7 | * the terms of the Affero GNU General Public License as published by the |
|
|
8 | * Free Software Foundation, either version 3 of the License, or (at your |
|
|
9 | * option) any later version. |
|
|
10 | * |
|
|
11 | * This program is distributed in the hope that it will be useful, |
|
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
14 | * GNU General Public License for more details. |
|
|
15 | * |
|
|
16 | * You should have received a copy of the Affero GNU General Public License |
|
|
17 | * and the GNU General Public License along with this program. If not, see |
|
|
18 | * <http://www.gnu.org/licenses/>. |
|
|
19 | * |
|
|
20 | * The authors can be reached via e-mail to <support@deliantra.net> |
|
|
21 | */ |
|
|
22 | |
1 | /* alchemy.c */ |
23 | /* alchemy.c */ |
2 | int need_identify (const object *obj); |
24 | int need_identify (const object *obj); |
3 | int apply_shop_mat (object *shop_mat, object *op); |
25 | int apply_shop_mat (object *shop_mat, object *op); |
4 | const char *cost_string_from_value (sint64 cost, int approx); |
26 | const char *cost_string_from_value (sint64 cost, int approx); |
5 | void pay_player (object *pl, sint64 amount); |
27 | void pay_player (object *pl, sint64 amount); |
6 | sint64 pay_player_arch (object *pl, const char *arch, sint64 amount); |
28 | sint64 pay_player_arch (object *pl, const char *arch, sint64 amount); |
7 | void attempt_do_alchemy (object *caster, object *cauldron); |
29 | void attempt_do_alchemy (object *caster, object *cauldron, object *skill); |
8 | int content_recipe_value (object *op); |
30 | int content_recipe_value (object *op); |
9 | int numb_ob_inside (object *op); |
31 | int numb_ob_inside (object *op); |
10 | object *attempt_recipe (object *caster, object *cauldron, int ability, recipe *rp, int nbatches); |
32 | object *attempt_recipe (object *caster, object *cauldron, int ability, recipe *rp, int nbatches); |
11 | void adjust_product (object *item, int lvl, int yield); |
33 | void adjust_product (object *item, int lvl, int yield); |
12 | object *make_item_from_recipe (object *cauldron, recipe *rp); |
34 | object *make_item_from_recipe (object *cauldron, recipe *rp); |
… | |
… | |
18 | /* apply.c */ |
40 | /* apply.c */ |
19 | int transport_can_hold (const object *transport, const object *op, int nrof); |
41 | int transport_can_hold (const object *transport, const object *op, int nrof); |
20 | int apply_transport (object *pl, object *transport, int aflag); |
42 | int apply_transport (object *pl, object *transport, int aflag); |
21 | int should_director_abort (object *op, object *victim); |
43 | int should_director_abort (object *op, object *victim); |
22 | int apply_potion (object *op, object *tmp); |
44 | int apply_potion (object *op, object *tmp); |
23 | int improve_weapon_stat (object *op, object *improver, object *weapon, signed char *stat, int sacrifice_count, const char *statname); |
|
|
24 | int prepare_weapon (object *op, object *improver, object *weapon); |
45 | int prepare_weapon (object *op, object *improver, object *weapon); |
25 | int improve_weapon (object *op, object *improver, object *weapon); |
46 | int improve_weapon (object *op, object *improver, object *weapon); |
26 | int check_improve_weapon (object *op, object *tmp); |
47 | int check_improve_weapon (object *op, object *tmp); |
27 | int improve_armour (object *op, object *improver, object *armour); |
48 | int improve_armour (object *op, object *improver, object *armour); |
28 | int convert_item (object *item, object *converter); |
|
|
29 | int apply_container (object *op, object *sack); |
49 | int apply_container (object *op, object *sack); |
30 | int esrv_apply_container (object *op, object *sack); |
50 | int esrv_apply_container (object *op, object *sack); |
31 | void move_apply (object *trap, object *victim, object *originator); |
51 | void move_apply (object *trap, object *victim, object *originator); |
32 | void do_learn_spell (object *op, object *spell, int special_prayer); |
52 | void do_learn_spell (object *op, object *spell, int special_prayer); |
33 | void do_forget_spell (object *op, const char *spell); |
53 | void do_forget_spell (object *op, const char *spell); |
… | |
… | |
47 | void eat_special_food (object *who, object *food); |
67 | void eat_special_food (object *who, object *food); |
48 | void apply_lighter (object *who, object *lighter); |
68 | void apply_lighter (object *who, object *lighter); |
49 | void scroll_failure (object *op, int failure, int power); |
69 | void scroll_failure (object *op, int failure, int power); |
50 | void apply_changes_to_player (object *pl, object *change); |
70 | void apply_changes_to_player (object *pl, object *change); |
51 | void apply_item_transformer (object *pl, object *transformer); |
71 | void apply_item_transformer (object *pl, object *transformer); |
|
|
72 | extern void handle_apply_yield (object *op); |
|
|
73 | void apply_lamp (object *op, bool switch_on); |
|
|
74 | void get_animation_from_arch (object *op, arch_ptr a); |
|
|
75 | extern int convert_item (object *item, object *converter); |
52 | |
76 | |
53 | /* attack.c */ |
77 | /* attack.c */ |
54 | void cancellation (object *op); |
78 | void cancellation (object *op); |
55 | int did_make_save_item (object *op, int type, object *originator); |
79 | int did_make_save_item (object *op, int type, object *originator); |
56 | void save_throw_object (object *op, int type, object *originator); |
80 | void save_throw_object (object *op, int type, object *originator); |
… | |
… | |
72 | void deathstrike_player (object *op, object *hitter, int *dam); |
96 | void deathstrike_player (object *op, object *hitter, int *dam); |
73 | int adj_attackroll (object *hitter, object *target); |
97 | int adj_attackroll (object *hitter, object *target); |
74 | int is_aimed_missile (object *op); |
98 | int is_aimed_missile (object *op); |
75 | |
99 | |
76 | /* build_map.c */ |
100 | /* build_map.c */ |
77 | int can_build_over (struct mapdef *map, object *tmp, short x, short y); |
|
|
78 | void remove_marking_runes (struct mapdef *map, short x, short y); |
|
|
79 | int find_unused_connected_value (struct mapdef *map); |
|
|
80 | int find_or_create_connection_for_map (object *pl, short x, short y, object *rune); |
|
|
81 | object *get_connection_rune (object *pl, short x, short y); |
|
|
82 | object *get_msg_book (object *pl, short x, short y); |
|
|
83 | object *get_wall (struct mapdef *map, int x, int y); |
|
|
84 | void fix_walls (maptile *map, int x, int y); |
|
|
85 | void fix_walls_around (maptile *map, int x, int y); |
|
|
86 | void apply_builder_floor (object *pl, object *material, short x, short y); |
|
|
87 | void apply_builder_wall (object *pl, object *material, short x, short y); |
|
|
88 | void apply_builder_item (object *pl, object *item, short x, short y); |
|
|
89 | void apply_builder_remove (object *pl, int dir); |
|
|
90 | void apply_map_builder (object *pl, int dir); |
101 | void apply_map_builder (object *pl, int dir); |
91 | int adjust_sign_msg (object *pl, short x, short y, object *tmp); |
|
|
92 | |
102 | |
93 | /* c_misc.c */ |
103 | /* c_misc.c */ |
94 | int command_motd (object *op, char *params); |
104 | int command_motd (object *op, char *params); |
95 | int command_bug (object *op, char *params); |
105 | int command_bug (object *op, char *params); |
96 | void malloc_info (object *op); |
106 | void malloc_info (object *op); |
… | |
… | |
103 | int command_weather (object *op, char *params); |
113 | int command_weather (object *op, char *params); |
104 | int command_archs (object *op, char *params); |
114 | int command_archs (object *op, char *params); |
105 | int command_hiscore (object *op, char *params); |
115 | int command_hiscore (object *op, char *params); |
106 | int command_debug (object *op, char *params); |
116 | int command_debug (object *op, char *params); |
107 | int command_dumpbelow (object *op, char *params); |
117 | int command_dumpbelow (object *op, char *params); |
|
|
118 | int command_dumpfriendlyobjects (object *op, char *params); |
108 | int command_wizpass (object *op, char *params); |
119 | int command_wizpass (object *op, char *params); |
109 | int command_wizcast (object *op, char *params); |
120 | int command_wizcast (object *op, char *params); |
110 | int command_dumpallobjects (object *op, char *params); |
|
|
111 | int command_dumpfriendlyobjects (object *op, char *params); |
|
|
112 | int command_dumpallarchetypes (object *op, char *params); |
|
|
113 | int command_ssdumptable (object *op, char *params); |
|
|
114 | int command_dumpmap (object *op, char *params); |
|
|
115 | int command_dumpallmaps (object *op, char *params); |
|
|
116 | int command_printlos (object *op, char *params); |
121 | int command_printlos (object *op, char *params); |
117 | int command_version (object *op, char *params); |
122 | int command_version (object *op, char *params); |
118 | void bug_report (const char *reportstring); |
123 | void bug_report (const char *reportstring); |
119 | int command_statistics (object *pl, char *params); |
124 | int command_statistics (object *pl, char *params); |
120 | int command_fix_me (object *op, char *params); |
125 | int command_fix_me (object *op, char *params); |
121 | int command_players (object *op, char *paramss); |
126 | int command_players (object *op, char *paramss); |
122 | int command_logs (object *op, char *params); |
|
|
123 | int command_bowmode (object *op, char *params); |
127 | int command_bowmode (object *op, char *params); |
124 | int command_showpets (object *op, char *params); |
128 | int command_showpets (object *op, char *params); |
125 | int command_resistances (object *op, char *params); |
129 | int command_resistances (object *op, char *params); |
126 | int command_help (object *op, char *params); |
130 | int command_help (object *op, char *params); |
127 | int onoff_value (const char *line); |
131 | int onoff_value (const char *line); |
… | |
… | |
160 | int sack_can_hold (object *pl, object *sack, object *op, uint32 nrof); |
164 | int sack_can_hold (object *pl, object *sack, object *op, uint32 nrof); |
161 | void pick_up (object *op, object *alt); |
165 | void pick_up (object *op, object *alt); |
162 | int command_take (object *op, char *params); |
166 | int command_take (object *op, char *params); |
163 | void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof); |
167 | void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof); |
164 | void drop_object (object *op, object *tmp, uint32 nrof); |
168 | void drop_object (object *op, object *tmp, uint32 nrof); |
|
|
169 | void drop_object (object *dropper, object *obj); |
165 | void drop (object *op, object *tmp); |
170 | void drop (object *op, object *tmp); |
166 | int command_dropall (object *op, char *params); |
171 | int command_dropall (object *op, char *params); |
167 | int command_drop (object *op, char *params); |
172 | int command_drop (object *op, char *params); |
168 | int command_examine (object *op, char *params); |
173 | int command_examine (object *op, char *params); |
169 | object *find_marked_object (object *op); |
174 | object *find_marked_object (object *op); |
170 | void examine_monster (object *op, object *tmp); |
175 | void examine_monster (object *op, object *tmp); |
171 | const char *long_desc (object *tmp, object *pl); |
176 | const char *long_desc (object *tmp, object *pl); |
172 | void examine (object *op, object *tmp); |
177 | void examine (object *op, object *tmp); |
173 | void inventory (object *op, object *inv); |
|
|
174 | int command_pickup (object *op, char *params); |
178 | int command_pickup (object *op, char *params); |
175 | void set_pickup_mode (object *op, int i); |
179 | void set_pickup_mode (object *op, int i); |
176 | int command_search_items (object *op, char *params); |
180 | int command_search_items (object *op, char *params); |
177 | int command_rename_item (object *op, char *params); |
181 | int command_rename_item (object *op, char *params); |
178 | |
182 | |
… | |
… | |
181 | void remove_party (partylist *target_party); |
185 | void remove_party (partylist *target_party); |
182 | void obsolete_parties (void); |
186 | void obsolete_parties (void); |
183 | void add_kill_to_party (partylist *party, const char *killer, const char *dead, long exp); |
187 | void add_kill_to_party (partylist *party, const char *killer, const char *dead, long exp); |
184 | int confirm_party_password (object *op); |
188 | int confirm_party_password (object *op); |
185 | void receive_party_password (object *op, char k); |
189 | void receive_party_password (object *op, char k); |
186 | void send_party_message (object *op, char *msg); |
190 | void send_party_message (object *op, const char *msg); |
187 | int command_gsay (object *op, char *params); |
191 | int command_gsay (object *op, char *params); |
188 | int command_party (object *op, char *params); |
192 | int command_party (object *op, char *params); |
189 | |
193 | |
190 | /* c_range.c */ |
194 | /* c_range.c */ |
191 | int command_invoke (object *op, char *params); |
195 | int command_invoke (object *op, char *params); |
… | |
… | |
201 | void do_wizard_hide (object *op, int silent_dm); |
205 | void do_wizard_hide (object *op, int silent_dm); |
202 | int command_hide (object *op, char *params); |
206 | int command_hide (object *op, char *params); |
203 | int command_setgod (object *op, char *params); |
207 | int command_setgod (object *op, char *params); |
204 | int command_banish (object *op, char *params); |
208 | int command_banish (object *op, char *params); |
205 | int command_save_overlay (object *op, char *params); |
209 | int command_save_overlay (object *op, char *params); |
206 | int command_toggle_shout (object *op, char *params); |
|
|
207 | int command_freeze (object *op, char *params); |
210 | int command_freeze (object *op, char *params); |
208 | int command_arrest (object *op, char *params); |
211 | int command_arrest (object *op, char *params); |
209 | int command_summon (object *op, char *params); |
212 | int command_summon (object *op, char *params); |
210 | int command_teleport (object *op, char *params); |
213 | int command_teleport (object *op, char *params); |
211 | int command_create (object *op, char *params); |
214 | int command_create (object *op, char *params); |
… | |
… | |
225 | int command_dm (object *op, char *params); |
228 | int command_dm (object *op, char *params); |
226 | int command_invisible (object *op, char *params); |
229 | int command_invisible (object *op, char *params); |
227 | int command_learn_spell (object *op, char *params); |
230 | int command_learn_spell (object *op, char *params); |
228 | int command_learn_special_prayer (object *op, char *params); |
231 | int command_learn_special_prayer (object *op, char *params); |
229 | int command_forget_spell (object *op, char *params); |
232 | int command_forget_spell (object *op, char *params); |
230 | int command_listplugins (object *op, char *params); |
|
|
231 | int command_loadplugin (object *op, char *params); |
|
|
232 | int command_unloadplugin (object *op, char *params); |
|
|
233 | int command_dmhide (object *op, char *params); |
233 | int command_dmhide (object *op, char *params); |
234 | void dm_stack_pop (player *pl); |
234 | void dm_stack_pop (player *pl); |
235 | object *dm_stack_peek (player *pl); |
235 | object *dm_stack_peek (player *pl); |
236 | void dm_stack_push (player *pl, tag_t item); |
236 | void dm_stack_push (player *pl, tag_t item); |
237 | object *get_dm_object (player *pl, char **params, int *from); |
237 | object *get_dm_object (player *pl, char **params, int *from); |
… | |
… | |
250 | /* daemon.c */ |
250 | /* daemon.c */ |
251 | FILE *BecomeDaemon (const char *filename); |
251 | FILE *BecomeDaemon (const char *filename); |
252 | |
252 | |
253 | /* disease.c */ |
253 | /* disease.c */ |
254 | int move_disease (object *disease); |
254 | int move_disease (object *disease); |
255 | int remove_symptoms (object *disease); |
|
|
256 | object *find_symptom (object *disease); |
|
|
257 | int check_infection (object *disease); |
|
|
258 | int infect_object (object *victim, object *disease, int force); |
255 | int infect_object (object *victim, object *disease, int force); |
259 | int do_symptoms (object *disease); |
|
|
260 | int grant_immunity (object *disease); |
|
|
261 | int move_symptom (object *symptom); |
256 | int move_symptom (object *symptom); |
262 | int check_physically_infect (object *victim, object *hitter); |
257 | int check_physically_infect (object *victim, object *hitter); |
263 | object *find_disease (object *victim); |
|
|
264 | int cure_disease (object *sufferer, object *caster); |
258 | int cure_disease (object *sufferer, object *caster, object *spell); |
265 | int reduce_symptoms (object *sufferer, int reduction); |
|
|
266 | |
259 | |
267 | /* egoitem.c */ |
260 | /* egoitem.c */ |
268 | int create_artifact (object *op, const char *artifactname); |
261 | int create_artifact (object *op, const char *artifactname); |
269 | int apply_power_crystal (object *op, object *crystal); |
262 | int apply_power_crystal (object *op, object *crystal); |
270 | |
263 | |
… | |
… | |
272 | char *spool (char *bp, char *error); |
265 | char *spool (char *bp, char *error); |
273 | void check_score (object *op); |
266 | void check_score (object *op); |
274 | void display_high_score (object *op, int max, const char *match); |
267 | void display_high_score (object *op, int max, const char *match); |
275 | |
268 | |
276 | /* gods.c */ |
269 | /* gods.c */ |
277 | int lookup_god_by_name (const char *name); |
270 | int lookup_god_by_name (shstr_cmp name); |
278 | object *find_god (const char *name); |
271 | object *find_god (shstr_cmp name); |
279 | const char *determine_god (object *op); |
272 | shstr_tmp determine_god (object *op); |
280 | void pray_at_altar (object *pl, object *altar, object *skill); |
273 | void pray_at_altar (object *pl, object *altar, object *skill); |
281 | void become_follower (object *op, object *new_god); |
274 | void become_follower (object *op, object *new_god); |
282 | int worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string); |
275 | int worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string); |
283 | void stop_using_item (object *op, int type, int number); |
276 | void stop_using_item (object *op, int type, int number); |
284 | void update_priest_flag (object *god, object *exp_ob, uint32 flag); |
277 | void update_priest_flag (object *god, object *exp_ob, uint32 flag); |
285 | archetype *determine_holy_arch (object *god, const char *type); |
278 | archetype *determine_holy_arch (object *god, shstr_cmp type); |
286 | void god_intervention (object *op, object *god, object *skill); |
279 | void god_intervention (object *op, object *god, object *skill); |
287 | int god_examines_priest (object *op, object *god); |
280 | int god_examines_priest (object *op, object *god); |
288 | int god_examines_item (object *god, object *item); |
281 | int god_examines_item (object *god, object *item); |
289 | int get_god (object *priest); |
282 | int get_god (object *priest); |
290 | const char *get_god_for_race (const char *race); |
|
|
291 | int tailor_god_spell (object *spellop, object *caster); |
283 | int tailor_god_spell (object *spellop, object *caster); |
292 | |
284 | |
293 | /* init.c */ |
285 | /* init.c */ |
294 | void set_logfile (char *val); |
286 | void load_settings (void); |
295 | void call_version (void); |
287 | void load_materials (void); |
296 | void showscores (void); |
|
|
297 | void set_debug (void); |
|
|
298 | void unset_debug (void); |
|
|
299 | void set_mondebug (void); |
|
|
300 | void set_dumpmon1 (void); |
|
|
301 | void set_dumpmon2 (void); |
|
|
302 | void set_dumpmon3 (void); |
|
|
303 | void set_dumpmon4 (void); |
|
|
304 | void set_dumpmon5 (void); |
|
|
305 | void set_dumpmon6 (void); |
|
|
306 | void set_dumpmon7 (void); |
|
|
307 | void set_dumpmon8 (void); |
|
|
308 | void set_dumpmon9 (void); |
|
|
309 | void set_dumpmont (char *name); |
|
|
310 | void set_daemon (void); |
|
|
311 | void set_datadir (char *path); |
|
|
312 | void set_confdir (char *path); |
|
|
313 | void set_localdir (char *path); |
|
|
314 | void set_mapdir (char *path); |
|
|
315 | void set_archetypes (char *path); |
|
|
316 | void set_regions (char *path); |
|
|
317 | void set_treasures (char *path); |
|
|
318 | void set_uniquedir (char *path); |
|
|
319 | void set_templatedir (char *path); |
|
|
320 | void set_playerdir (char *path); |
|
|
321 | void set_tmpdir (char *path); |
|
|
322 | void showscoresparm (char *data); |
|
|
323 | void set_csport (char *val); |
|
|
324 | void init (int argc, char **argv); |
288 | void init (int argc, char **argv); |
325 | void usage (void); |
289 | void usage (void); |
326 | void help (void); |
290 | void help (void); |
327 | void init_beforeplay (void); |
291 | void init_beforeplay (void); |
328 | void init_startup (void); |
|
|
329 | void compile_info (void); |
|
|
330 | void init_signals (void); |
292 | void init_signals (void); |
331 | void init_races (void); |
293 | void init_races (void); |
332 | void dump_races (void); |
294 | void dump_races (void); |
333 | void add_to_racelist (const char *race_name, object *op); |
295 | void add_to_racelist (const char *race_name, object *op); |
334 | racelink *get_racelist (void); |
296 | racelink *get_racelist (void); |
… | |
… | |
337 | /* login.c */ |
299 | /* login.c */ |
338 | void delete_character (const char *name); |
300 | void delete_character (const char *name); |
339 | int verify_player (const char *name, char *password); |
301 | int verify_player (const char *name, char *password); |
340 | int check_name (player *me, const char *name); |
302 | int check_name (player *me, const char *name); |
341 | int create_savedir_if_needed (char *savedir); |
303 | int create_savedir_if_needed (char *savedir); |
342 | void destroy_object (object *op); |
|
|
343 | void copy_file (const char *filename, FILE *fpout); |
304 | void copy_file (const char *filename, FILE *fpout); |
344 | |
305 | |
345 | /* main.c */ |
306 | /* main.c */ |
346 | void server_tick (); |
307 | void server_tick (); |
347 | void version (object *op); |
308 | void version (object *op); |
348 | void info_keys (object *op); |
309 | void info_keys (object *op); |
349 | char *crypt_string (char *str, char *salt); |
310 | char *crypt_string (char *str, char *salt); |
350 | int check_password (char *typed, char *crypted); |
|
|
351 | void enter_player_savebed (object *op); |
311 | void enter_player_savebed (object *op); |
352 | void leave_map (object *op); |
312 | void leave_map (object *op); |
353 | void set_map_timeout (maptile *oldmap); |
313 | void set_map_timeout (maptile *oldmap); |
354 | char *clean_path (const char *file); |
314 | char *clean_path (const char *file); |
355 | char *unclean_path (const char *src); |
315 | char *unclean_path (const char *src); |
356 | void enter_exit (object *op, object *exit_ob); |
316 | void enter_exit (object *op, object *exit_ob); |
357 | void process_events (); |
317 | void process_events (); |
358 | void clean_tmp_files (void); |
318 | void clean_tmp_files (void); |
359 | void leave (player *pl,int draw_exit); |
319 | void leave (player *pl,int draw_exit); |
360 | int forbid_play (void); |
|
|
361 | void do_specials (void); |
320 | void do_specials (void); |
362 | int main (int argc, char **argv); |
321 | int main (int argc, char **argv); |
363 | |
322 | |
364 | /* monster.c */ |
323 | /* monster.c */ |
365 | object *check_enemy (object *npc, rv_vector *rv); |
324 | object *check_enemy (object *npc, rv_vector *rv); |
… | |
… | |
424 | object *fix_summon_pet (archetype *at, object *op, int dir, int is_golem); |
383 | object *fix_summon_pet (archetype *at, object *op, int dir, int is_golem); |
425 | void move_golem (object *op); |
384 | void move_golem (object *op); |
426 | void control_golem (object *op, int dir); |
385 | void control_golem (object *op, int dir); |
427 | int summon_golem (object *op, object *caster, int dir, object *spob); |
386 | int summon_golem (object *op, object *caster, int dir, object *spob); |
428 | object *choose_cult_monster (object *pl, object *god, int summon_level); |
387 | object *choose_cult_monster (object *pl, object *god, int summon_level); |
429 | int summon_object (object *op, object *caster, object *spell_ob, int dir, const char *stringarg); |
388 | int summon_object (object *op, object *caster, object *spell_ob, int dir, const char *spellparam); |
430 | object *get_real_owner (object *ob); |
|
|
431 | int should_arena_attack (object *pet, object *owner, object *target); |
389 | int should_arena_attack (object *pet, object *owner, object *target); |
432 | |
390 | |
433 | /* player.c */ |
391 | /* player.c */ |
434 | player *find_player (const char *plname); |
392 | player *find_player (const char *plname); |
435 | player *find_player_partial_name (const char *plname); |
393 | player *find_player_partial_name (const char *plname); |
436 | void display_motd (const object *op); |
|
|
437 | void send_rules (const object *op); |
|
|
438 | void send_news (const object *op); |
|
|
439 | int playername_ok (const char *cp); |
394 | int playername_ok (const char *cp); |
440 | archetype *get_player_archetype (archetype *at); |
395 | archetype *get_player_archetype (archetype *at); |
441 | object *get_nearest_player (object *mon); |
396 | object *get_nearest_player (object *mon); |
442 | int path_to_player (object *mon, object *pl, unsigned mindiff); |
397 | int path_to_player (object *mon, object *pl, unsigned mindiff); |
443 | void give_initial_items (object *pl, treasurelist *items); |
398 | void give_initial_items (object *pl, treasurelist *items); |
… | |
… | |
453 | int key_change_class (object *op, char key); |
408 | int key_change_class (object *op, char key); |
454 | int key_confirm_quit (object *op, char key); |
409 | int key_confirm_quit (object *op, char key); |
455 | void flee_player (object *op); |
410 | void flee_player (object *op); |
456 | int check_pick (object *op); |
411 | int check_pick (object *op); |
457 | object *find_arrow (object *op, const char *type); |
412 | object *find_arrow (object *op, const char *type); |
458 | object *find_better_arrow (object *op, object *target, const char *type, int *better); |
413 | object *find_better_arrow (object *op, object *target, shstr_cmp type, int *better); |
459 | object *pick_arrow_target (object *op, const char *type, int dir); |
414 | object *pick_arrow_target (object *op, shstr_cmp type, int dir); |
460 | int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); |
415 | int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); |
461 | int player_fire_bow (object *op, int dir); |
416 | int player_fire_bow (object *op, int dir); |
462 | void fire_misc_object (object *op, int dir); |
417 | void fire_misc_object (object *op, int dir); |
463 | bool fire (object *op, int dir); |
418 | bool fire (object *op, int dir); |
464 | object *find_key (object *pl, object *container, object *door); |
419 | object *find_key (object *pl, object *container, object *door); |
465 | bool move_player_attack (object *op, int dir); |
420 | bool move_player_attack (object *op, int dir); |
466 | bool move_player (object *op, int dir); |
421 | bool move_player (object *op, int dir); |
467 | bool handle_newcs_player (object *op); |
422 | bool handle_newcs_player (object *op); |
468 | int save_life (object *op); |
423 | int save_life (object *op); |
469 | void remove_unpaid_objects (object *op, object *env); |
|
|
470 | char *gravestone_text (object *op); |
424 | const char *gravestone_text (object *op); |
471 | void do_some_living (object *op); |
425 | void do_some_living (object *op); |
472 | void kill_player (object *op); |
426 | void kill_player (object *op); |
473 | void loot_object (object *op); |
427 | void loot_object (object *op); |
474 | void fix_weight (void); |
428 | void fix_weight (void); |
475 | void fix_luck (void); |
429 | void fix_luck (void); |
… | |
… | |
483 | int action_makes_visible (object *op); |
437 | int action_makes_visible (object *op); |
484 | int op_on_battleground (object *op, int *x, int *y); |
438 | int op_on_battleground (object *op, int *x, int *y); |
485 | void dragon_ability_gain (object *who, int atnr, int level); |
439 | void dragon_ability_gain (object *who, int atnr, int level); |
486 | void player_unready_range_ob (player *pl, object *ob); |
440 | void player_unready_range_ob (player *pl, object *ob); |
487 | |
441 | |
488 | /* plugins.c */ |
|
|
489 | int execute_event (object *op, int eventcode, object *activator, object *third, const char *message, int fix); |
|
|
490 | int execute_global_event (int eventcode, ...); |
|
|
491 | int plugins_init_plugin (const char *libfile); |
|
|
492 | void *cfapi_get_hooks (int *type, ...); |
|
|
493 | int plugins_remove_plugin (const char *id); |
|
|
494 | crossfire_plugin *plugins_find_plugin (const char *id); |
|
|
495 | void plugins_display_list (object *op); |
|
|
496 | void *cfapi_system_find_animation (int *type, ...); |
|
|
497 | void *cfapi_system_strdup (int *type, ...); |
|
|
498 | void *cfapi_system_register_global_event (int *type, ...); |
|
|
499 | void *cfapi_system_unregister_global_event (int *type, ...); |
|
|
500 | void *cfapi_system_check_path (int *type, ...); |
|
|
501 | void *cfapi_system_re_cmp (int *type, ...); |
|
|
502 | void *cfapi_system_directory (int *type, ...); |
|
|
503 | void *cfapi_map_get_map (int *type, ...); |
|
|
504 | void *cfapi_map_has_been_loaded (int *type, ...); |
|
|
505 | void *cfapi_map_create_path (int *type, ...); |
|
|
506 | void *cfapi_map_get_map_property (int *type, ...); |
|
|
507 | void *cfapi_map_set_map_property (int *type, ...); |
|
|
508 | void *cfapi_map_out_of_map (int *type, ...); |
|
|
509 | void *cfapi_map_update_position (int *type, ...); |
|
|
510 | void *cfapi_map_delete_map (int *type, ...); |
|
|
511 | void *cfapi_map_message (int *type, ...); |
|
|
512 | void *cfapi_map_get_object_at (int *type, ...); |
|
|
513 | void *cfapi_map_get_flags (int *type, ...); |
|
|
514 | void *cfapi_map_present_arch_by_name (int *type, ...); |
|
|
515 | void *cfapi_object_move (int *type, ...); |
|
|
516 | void *cfapi_object_get_key (int *type, ...); |
|
|
517 | void *cfapi_object_set_key (int *type, ...); |
|
|
518 | void *cfapi_object_get_property (int *type, ...); |
|
|
519 | void *cfapi_object_set_property (int *type, ...); |
|
|
520 | void *cfapi_object_apply_below (int *type, ...); |
|
|
521 | void *cfapi_object_apply (int *type, ...); |
|
|
522 | void *cfapi_object_identify (int *type, ...); |
|
|
523 | void *cfapi_object_describe (int *type, ...); |
|
|
524 | void *cfapi_object_drain (int *type, ...); |
|
|
525 | void *cfapi_object_fix (int *type, ...); |
|
|
526 | void *cfapi_object_give_skill (int *type, ...); |
|
|
527 | void *cfapi_object_transmute (int *type, ...); |
|
|
528 | void *cfapi_object_remove (int *type, ...); |
|
|
529 | void *cfapi_object_delete (int *type, ...); |
|
|
530 | void *cfapi_object_clone (int *type, ...); |
|
|
531 | void *cfapi_object_find (int *type, ...); |
|
|
532 | void *cfapi_object_create (int *type, ...); |
|
|
533 | void *cfapi_object_insert (int *type, ...); |
|
|
534 | void *cfapi_object_split (int *type, ...); |
|
|
535 | void *cfapi_object_merge (int *type, ...); |
|
|
536 | void *cfapi_object_distance (int *type, ...); |
|
|
537 | void *cfapi_object_update (int *type, ...); |
|
|
538 | void *cfapi_object_clear (int *type, ...); |
|
|
539 | void *cfapi_object_reset (int *type, ...); |
|
|
540 | void *cfapi_object_check_inventory (int *type, ...); |
|
|
541 | void *cfapi_object_clean_object (int *type, ...); |
|
|
542 | void *cfapi_object_on_same_map (int *type, ...); |
|
|
543 | void *cfapi_object_spring_trap (int *type, ...); |
|
|
544 | void *cfapi_object_check_trigger (int *type, ...); |
|
|
545 | void *cfapi_object_query_cost (int *type, ...); |
|
|
546 | void *cfapi_object_query_money (int *type, ...); |
|
|
547 | void *cfapi_object_cast (int *type, ...); |
|
|
548 | void *cfapi_object_learn_spell (int *type, ...); |
|
|
549 | void *cfapi_object_forget_spell (int *type, ...); |
|
|
550 | void *cfapi_object_check_spell (int *type, ...); |
|
|
551 | void *cfapi_object_pay_amount (int *type, ...); |
|
|
552 | void *cfapi_object_pay_item (int *type, ...); |
|
|
553 | void *cfapi_object_transfer (int *type, ...); |
|
|
554 | void *cfapi_object_find_archetype_inside (int *type, ...); |
|
|
555 | void *cfapi_object_drop (int *type, ...); |
|
|
556 | void *cfapi_object_take (int *type, ...); |
|
|
557 | void *cfapi_object_say (int *type, ...); |
|
|
558 | void *cfapi_object_speak (int *type, ...); |
|
|
559 | void *cfapi_player_find (int *type, ...); |
|
|
560 | void *cfapi_player_message (int *type, ...); |
|
|
561 | void *cfapi_player_send_inventory (int *type, ...); |
|
|
562 | void *cfapi_object_teleport (int *type, ...); |
|
|
563 | void *cfapi_object_pickup (int *type, ...); |
|
|
564 | void *cfapi_archetype_get_first (int *type, ...); |
|
|
565 | void *cfapi_archetype_get_property (int *type, ...); |
|
|
566 | void *cfapi_party_get_property (int *type, ...); |
|
|
567 | void *cfapi_region_get_property (int *type, ...); |
|
|
568 | CommArray_s *find_plugin_command (char *cmd, object *op); |
|
|
569 | int initPlugins (void); |
|
|
570 | |
|
|
571 | /* resurrection.c */ |
442 | /* resurrection.c */ |
572 | int cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg); |
443 | int cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg); |
573 | int resurrection_fails (int levelcaster, int leveldead); |
444 | int resurrection_fails (int levelcaster, int leveldead); |
574 | void dead_player (object *op); |
445 | void dead_player (object *op); |
575 | void dead_character (const char *name); |
446 | void dead_character (const char *name); |
… | |
… | |
592 | const char *query_cost_string (const object *tmp, object *who, int flag); |
463 | const char *query_cost_string (const object *tmp, object *who, int flag); |
593 | sint64 query_money (const object *op); |
464 | sint64 query_money (const object *op); |
594 | int pay_for_amount (sint64 to_pay, object *pl); |
465 | int pay_for_amount (sint64 to_pay, object *pl); |
595 | int pay_for_item (object *op, object *pl); |
466 | int pay_for_item (object *op, object *pl); |
596 | int can_pay (object *pl); |
467 | int can_pay (object *pl); |
597 | void sell_item (object *op, object *pl); |
468 | bool sell_item (object *op, object *pl); |
598 | double shopkeeper_approval (const maptile *map, const object *player); |
469 | double shopkeeper_approval (const maptile *map, const object *player); |
599 | int describe_shop (const object *op); |
470 | int describe_shop (const object *op); |
600 | void shop_listing (object *sign, object *op); |
471 | void shop_listing (object *sign, object *op); |
601 | bool is_in_shop (object *o); |
472 | bool is_in_shop (object *o); |
602 | bool is_in_shop (maptile *map, int x, int y); |
473 | bool is_in_shop (maptile *map, int x, int y); |
… | |
… | |
661 | void polymorph_living (object *op); |
532 | void polymorph_living (object *op); |
662 | void polymorph_melt (object *who, object *op); |
533 | void polymorph_melt (object *who, object *op); |
663 | void polymorph_item (object *who, object *op); |
534 | void polymorph_item (object *who, object *op); |
664 | void polymorph (object *op, object *who); |
535 | void polymorph (object *op, object *who); |
665 | int cast_polymorph (object *op, object *caster, object *spell_ob, int dir); |
536 | int cast_polymorph (object *op, object *caster, object *spell_ob, int dir); |
666 | int cast_create_missile (object *op, object *caster, object *spell, int dir, const char *stringarg); |
537 | int cast_create_missile (object *op, object *caster, object *spell, int dir, const char *spellparam); |
667 | int cast_create_food (object *op, object *caster, object *spell_ob, int dir, const char *stringarg); |
538 | int cast_create_food (object *op, object *caster, object *spell_ob, int dir, const char *spellparam); |
668 | int probe (object *op, object *caster, object *spell_ob, int dir); |
539 | int probe (object *op, object *caster, object *spell_ob, int dir); |
669 | int makes_invisible_to (object *pl, object *mon); |
540 | int makes_invisible_to (object *pl, object *mon); |
670 | int cast_invisible (object *op, object *caster, object *spell_ob); |
541 | int cast_invisible (object *op, object *caster, object *spell_ob); |
671 | int cast_earth_to_dust (object *op, object *caster, object *spell_ob); |
542 | int cast_earth_to_dust (object *op, object *caster, object *spell_ob); |
672 | void execute_word_of_recall (object *op); |
543 | void execute_word_of_recall (object *op); |
673 | int cast_word_of_recall (object *op, object *caster, object *spell_ob); |
544 | int cast_word_of_recall (object *op, object *caster, object *spell_ob); |
674 | int cast_wonder (object *op, object *caster, int dir, object *spell_ob); |
545 | int cast_wonder (object *op, object *caster, int dir, object *spell_ob); |
675 | int perceive_self (object *op); |
546 | int perceive_self (object *op); |
676 | int cast_create_town_portal (object *op, object *caster, object *spell, int dir); |
|
|
677 | int magic_wall (object *op, object *caster, int dir, object *spell_ob); |
547 | int magic_wall (object *op, object *caster, int dir, object *spell_ob); |
678 | int dimension_door (object *op, object *caster, object *spob, int dir); |
548 | int dimension_door (object *op, object *caster, object *spob, int dir, const char *spellparam); |
679 | int cast_heal (object *op, object *caster, object *spell, int dir); |
549 | int cast_heal (object *op, object *caster, object *spell, int dir); |
|
|
550 | int change_ability_duration (object *spell, object *caster); |
680 | int cast_change_ability (object *op, object *caster, object *spell_ob, int dir, int silent); |
551 | int cast_change_ability (object *op, object *caster, object *spell_ob, int dir, int silent); |
681 | int cast_bless (object *op, object *caster, object *spell_ob, int dir); |
552 | int cast_bless (object *op, object *caster, object *spell_ob, int dir); |
682 | int alchemy (object *op, object *caster, object *spell_ob); |
553 | int alchemy (object *op, object *caster, object *spell_ob); |
683 | int remove_curse (object *op, object *caster, object *spell); |
554 | int remove_curse (object *op, object *caster, object *spell); |
684 | int cast_identify (object *op, object *caster, object *spell); |
555 | int cast_identify (object *op, object *caster, object *spell); |
… | |
… | |
692 | void move_aura (object *aura); |
563 | void move_aura (object *aura); |
693 | void move_peacemaker (object *op); |
564 | void move_peacemaker (object *op); |
694 | int write_mark (object *op, object *spell, const char *msg); |
565 | int write_mark (object *op, object *spell, const char *msg); |
695 | |
566 | |
696 | /* spell_util.c */ |
567 | /* spell_util.c */ |
697 | object *find_random_spell_in_ob (object *ob, const char *skill); |
568 | object *find_random_spell_in_ob (object *ob, shstr_cmp skill = shstr_cmp ()); |
698 | void set_spell_skill (object *op, object *caster, object *spob, object *dest); |
569 | void set_spell_skill (object *op, object *caster, object *spob, object *dest); |
699 | void init_spells (void); |
|
|
700 | void dump_spells (void); |
|
|
701 | void spell_effect (object *spob, int x, int y, maptile *map, object *originator); |
570 | void spell_effect (object *spob, int x, int y, maptile *map, object *originator); |
702 | int min_casting_level (object *caster, object *spell); |
571 | int min_casting_level (object *caster, object *spell); |
703 | int caster_level (object *caster, object *spell); |
572 | int casting_level (object *caster, object *spell); |
704 | sint16 SP_level_spellpoint_cost (object *caster, object *spell, int flags); |
573 | sint16 SP_level_spellpoint_cost (object *caster, object *spell, int flags); |
705 | int SP_level_dam_adjust (object *caster, object *spob); |
574 | int SP_level_dam_adjust (object *caster, object *spob); |
706 | int SP_level_duration_adjust (object *caster, object *spob); |
575 | int SP_level_duration_adjust (object *caster, object *spob); |
707 | int SP_level_range_adjust (object *caster, object *spob); |
576 | int SP_level_range_adjust (object *caster, object *spob); |
708 | object *check_spell_known (object *op, const char *name); |
577 | object *check_spell_known (object *op, shstr_cmp name); |
709 | object *lookup_spell_by_name (object *op, const char *spname); |
578 | object *lookup_spell_by_name (object *op, const char *spname); |
710 | int reflwall (maptile *m, int x, int y, object *sp_op); |
579 | int reflwall (maptile *m, int x, int y, object *sp_op); |
711 | int cast_create_obj (object *op, object *caster, object *new_op, int dir); |
580 | int cast_create_obj (object *op, object *caster, object *new_op, int dir); |
712 | int ok_to_put_more (maptile *m, sint16 x, sint16 y, object *op, int immune_stop); |
581 | int ok_to_put_more (maptile *m, sint16 x, sint16 y, object *op, int immune_stop); |
713 | int fire_arch_from_position (object *op, object *caster, sint16 x, sint16 y, int dir, object *spell); |
582 | int fire_arch_from_position (object *op, object *caster, sint16 x, sint16 y, int dir, object *spell); |
… | |
… | |
718 | void put_a_monster (object *op, const char *monstername); |
587 | void put_a_monster (object *op, const char *monstername); |
719 | int summon_hostile_monsters (object *op, int n, const char *monstername); |
588 | int summon_hostile_monsters (object *op, int n, const char *monstername); |
720 | void shuffle_attack (object *op, int change_face); |
589 | void shuffle_attack (object *op, int change_face); |
721 | void prayer_failure (object *op, int failure, int power); |
590 | void prayer_failure (object *op, int failure, int power); |
722 | void spell_failure (object *op, int failure, int power, object *skill); |
591 | void spell_failure (object *op, int failure, int power, object *skill); |
723 | int cast_party_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg); |
592 | int cast_party_spell (object *op, object *caster, int dir, object *spell_ob, char *spellparam); |
724 | int cast_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg); |
593 | int cast_spell (object *op, object *caster, int dir, object *spell_ob, char *spellparam); |
725 | void move_spell_effect (object *op); |
594 | void move_spell_effect (object *op); |
726 | void check_spell_effect (object *op); |
595 | void check_spell_effect (object *op); |
727 | void apply_spell_effect (object *spell, object *victim); |
596 | void apply_spell_effect (object *spell, object *victim); |
|
|
597 | void create_exploding_ball_at (object *victim, int level); |
728 | |
598 | |
729 | /* swamp.c */ |
599 | /* swamp.c */ |
730 | void walk_on_deep_swamp (object *op, object *victim); |
600 | void walk_on_deep_swamp (object *op, object *victim); |
731 | void move_deep_swamp (object *op); |
601 | void move_deep_swamp (object *op); |
732 | |
602 | |
… | |
… | |
763 | void move_duplicator (object *op); |
633 | void move_duplicator (object *op); |
764 | void move_creator (object *creator); |
634 | void move_creator (object *creator); |
765 | void move_marker (object *op); |
635 | void move_marker (object *op); |
766 | void process_object (object *op); |
636 | void process_object (object *op); |
767 | |
637 | |
768 | /* timers.c */ |
|
|
769 | void cftimer_process_timers (void); |
|
|
770 | void cftimer_process_event (object *ob); |
|
|
771 | int cftimer_create (int id, long delay, object *ob, int mode); |
|
|
772 | int cftimer_destroy (int id); |
|
|
773 | int cftimer_find_free_id (void); |
|
|
774 | |
|
|
775 | /* weather.c */ |
638 | /* weather.c */ |
776 | void set_darkness_map (maptile *m); |
639 | void set_darkness_map (maptile *m); |
777 | void adjust_daylight (void); |
640 | void adjust_daylight (void); |