tbamud/src/spell_parser.c

932 lines
33 KiB
C
Raw Normal View History

/**************************************************************************
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
* File: spell_parser.c Part of tbaMUD *
* Usage: Top-level magic routines; outside points of entry to magic sys. *
* *
* All rights reserved. See license for complete information. *
* *
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
**************************************************************************/
2006-12-19 22:56:18 +00:00
#include "conf.h"
#include "sysdep.h"
#include "structs.h"
#include "utils.h"
#include "interpreter.h"
#include "spells.h"
#include "handler.h"
#include "comm.h"
#include "db.h"
#include "dg_scripts.h"
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line Minor Bugfix: All game configuration settings now reference the world config structure, not the individual config variables found in config.c. ------------------------------------------------------------------------ rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line Added lib/world/qst/ directory, index, index.mini, and 0.qst. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines Bugfix: the include directory (for .h files) is now referenced correctly in the depend statement. Deletion: listrent.c removed as a separate utility. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line Enhancement: utils/ Makefile will now use a depends file, and looks for dependen cies in the ../ directory (shrinks the necessary information to make each utilit y). ------------------------------------------------------------------------ Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line Made TBA specific changes. do_cheat, removed help level checking, and advance to level 32. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a ttribution for the changes. (Thanks seqwith.) ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines Changed Makefile.in to use glob expressions when building the objects. This translates into no longer a need to update Makefile.in whenever a new .c file is added to the mud code. Other Makefile.* have not yet been changed (and need review, anyway). All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen does, however the tbaMUD (and legacy circle code) has never been marked-up with the special CXREF codes required to effectively use the program. Since Doxygen is easier to use, and provides almost as much functionality as CXREF, CXREF support has been dropped. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line Bug Fix: asciiflag_conv* functions now can handle a negative numeric value. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master) will no longer attempt to wander off. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines Based on the compiler warning about mag_materials being an unused function, and the clone spell being unused. Bug fix: Clone can now be cast. It is an 'ignore' target spell. Fix and Modification: Clone, being an effectively unused spell that is only used by mortal Magic Users at level 30, is now implemented as very simple example of how to use mag_materials(). The item required by mag_materials is vnum 161, which in stock tbaMUD is some sacrificial entrails. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix for "Did you mean:" including DG commands. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a door. Documentation: do_simple_move documented. ------------------------------------------------------------------------ Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line Trial run of columnizer function on commands list to see how people like it. ------------------------------------------------------------------------ jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line asciimap, an in game automap, along with a couple of minor bug fixes to do with the automap, patched in (Thanks Jamdog). ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line Minor update: Relocate local variable declaration to the top of ACMD(do_help) ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines Checked in the following placeholders for do_gen_tog: #define SCMD_AUTOLOOT 24 #define SCMD_AUTOGOLD 25 #define SCMD_AUTOSPLIT 26 #define SCMD_AUTOSAC 27 #define SCMD_AUTOASSIST 28 ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line The Autoquest patch, along with a couple of minor bug fixes, has been integrated into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.) ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines Minor Fix: Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int index types. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines Added a new atoidx() conversion function for dealing with string to IDXTYPE conversions (in utils.c, prototype exported through utils.h). Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h). Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c). ------------------------------------------------------------------------ Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line Fixed direction mapping to give readable directions instead of sub commands. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines Since general olc editing are automatically saved to disk, 'shutdown reboot' has been changed to not-autosave by default. (Small change made to do_shutdown in act.wizard.c). ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines Changed: struct attack_hit_type moved to fight.h attack_hit_text exported through fight.h ------------------------------------------------------------------------ jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines - do_file heads or tails files correctly and has also been enhanced to return file info (act.wizard.c) - defines made for common log files created by autorun, and those used by do_file (db.h) - utility functions added: file_head(), file_tail(), file_sizeof(), and file_numlines() (defined utils.c and exported through utils.h) ------------------------------------------------------------------------ Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line Fixed export command. (thanks Kyle) ------------------------------------------------------------------------ jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line Files are now tagged as executable. Should be able to be checked out from subver sion and executed without running chmod. ------------------------------------------------------------------------ Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back. ------------------------------------------------------------------------ jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line Event queue function definitions, global variables and defines doxygenated. ------------------------------------------------------------------------ Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line Updated levels command to use an arg/range and added color parsing to greetings. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line Doxygen comments completed for weather.c ------------------------------------------------------------------------ Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line Corrected several 64-bit warnings. (thanks Buggo) ------------------------------------------------------------------------ Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line Added get_flag_by_name allowing for new trigedit variable checks like %actor.pref(FLAG)% checks. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines COMPLETE: tbaMUD code re-org of global and local scope function and variable declarations. There may be a few things that I did not catch (some non extern keyword declarations of function prototypes within other functions, for example). BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines Continued clean-up of 'extern' references to functions and variables. BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of the char * returned from title_female and title_male. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines More work on mud clean-up. New file: spec_procs.h Created this file to house the legacy special procedures (spec_procs.c and castle.c) and special feature assignment in general. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines - Minor Bugfix: Fixed parse error in mobact.c - Minor Bugfix: act.h is now included in all of the act functions. Forgot to do that the first time :( - Additions: ban.h has been added as the external entry point into the ban.c globals and functions. Files needing ban.h have been updated. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line All act*.c functions, defines and globals have been prototyped/declared in act.h. The file act.h does not contain every ACMD, only those ACMDs and utility functions available within the act*.c files. ------------------------------------------------------------------------ Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line Fixed the last few flags missed for the 128 bit conversion. ------------------------------------------------------------------------ Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines Adding a column formatter for lists. Accepts printf-like arguments. Only used by medit right now. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines - Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts. - Ongoing cleanup to mud project. ------------------------------------------------------------------------ Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line Fixed run_autowiz which ran twice on advancement. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line act.h created and added. This header will be the external entry point for the functions, function subcommands and variables within the act*.c files. It is not designed to be the entry point for all ACMD functions. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line Merge of another part of the code cleanup, the dg script stuff. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line Modularizing and organizing files continues. Committing comm.c and comm.h because they are hairy, and I don't want to do them over if my hard drive crashes. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines - Marking all file scope functions as 'static' - Reorganization of the global variables and functions. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line * Protected the conf.h.* system config files from multiple calls. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line * Removed extraneous references to TRUE / FALSE and YES / NO defines. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines * BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before) * Migrated NUM_* settings from oasis.h to more appropriate locations near where they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the POSITION_* defines.) ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line Added Appendix A - Coder Support. Right now, it simply speaks to the fact that we have included doxygen config files, are working to document the source code, and provides a rudimentary "do this" guide to create the doxygen cross references. ------------------------------------------------------------------------ jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines - All .h files now have doxygen recognized headers, and the format is slightly altered to ease editing of headers. - Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE R_H_ #define _HEADER_H_ .... #endif) ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line constants.h, structs.h and utils.h now protected from multiple includes. This is sometimes overkill, but good practice overall. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line Updated documentation for constants.c and constants.h. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if Graphviz is not available. Now just need a short document describing the usage of doxygen. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line Minor document correction in struct dex_app_tpe. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line *bugfix* do_drink command: When a container is empty, the correct, "It is empty." message is now displayed. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines Merging changes to trunk for: * utils.h, utils.c and structs.h doxygen comments * adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
#include "fight.h" /* for hit() */
2006-12-19 22:56:18 +00:00
#define SINFO spell_info[spellnum]
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line Minor Bugfix: All game configuration settings now reference the world config structure, not the individual config variables found in config.c. ------------------------------------------------------------------------ rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line Added lib/world/qst/ directory, index, index.mini, and 0.qst. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines Bugfix: the include directory (for .h files) is now referenced correctly in the depend statement. Deletion: listrent.c removed as a separate utility. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line Enhancement: utils/ Makefile will now use a depends file, and looks for dependen cies in the ../ directory (shrinks the necessary information to make each utilit y). ------------------------------------------------------------------------ Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line Made TBA specific changes. do_cheat, removed help level checking, and advance to level 32. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a ttribution for the changes. (Thanks seqwith.) ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines Changed Makefile.in to use glob expressions when building the objects. This translates into no longer a need to update Makefile.in whenever a new .c file is added to the mud code. Other Makefile.* have not yet been changed (and need review, anyway). All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen does, however the tbaMUD (and legacy circle code) has never been marked-up with the special CXREF codes required to effectively use the program. Since Doxygen is easier to use, and provides almost as much functionality as CXREF, CXREF support has been dropped. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line Bug Fix: asciiflag_conv* functions now can handle a negative numeric value. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master) will no longer attempt to wander off. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines Based on the compiler warning about mag_materials being an unused function, and the clone spell being unused. Bug fix: Clone can now be cast. It is an 'ignore' target spell. Fix and Modification: Clone, being an effectively unused spell that is only used by mortal Magic Users at level 30, is now implemented as very simple example of how to use mag_materials(). The item required by mag_materials is vnum 161, which in stock tbaMUD is some sacrificial entrails. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix for "Did you mean:" including DG commands. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a door. Documentation: do_simple_move documented. ------------------------------------------------------------------------ Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line Trial run of columnizer function on commands list to see how people like it. ------------------------------------------------------------------------ jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line asciimap, an in game automap, along with a couple of minor bug fixes to do with the automap, patched in (Thanks Jamdog). ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line Minor update: Relocate local variable declaration to the top of ACMD(do_help) ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines Checked in the following placeholders for do_gen_tog: #define SCMD_AUTOLOOT 24 #define SCMD_AUTOGOLD 25 #define SCMD_AUTOSPLIT 26 #define SCMD_AUTOSAC 27 #define SCMD_AUTOASSIST 28 ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line The Autoquest patch, along with a couple of minor bug fixes, has been integrated into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.) ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines Minor Fix: Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int index types. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines Added a new atoidx() conversion function for dealing with string to IDXTYPE conversions (in utils.c, prototype exported through utils.h). Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h). Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c). ------------------------------------------------------------------------ Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line Fixed direction mapping to give readable directions instead of sub commands. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines Since general olc editing are automatically saved to disk, 'shutdown reboot' has been changed to not-autosave by default. (Small change made to do_shutdown in act.wizard.c). ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines Changed: struct attack_hit_type moved to fight.h attack_hit_text exported through fight.h ------------------------------------------------------------------------ jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines - do_file heads or tails files correctly and has also been enhanced to return file info (act.wizard.c) - defines made for common log files created by autorun, and those used by do_file (db.h) - utility functions added: file_head(), file_tail(), file_sizeof(), and file_numlines() (defined utils.c and exported through utils.h) ------------------------------------------------------------------------ Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line Fixed export command. (thanks Kyle) ------------------------------------------------------------------------ jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line Files are now tagged as executable. Should be able to be checked out from subver sion and executed without running chmod. ------------------------------------------------------------------------ Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back. ------------------------------------------------------------------------ jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line Event queue function definitions, global variables and defines doxygenated. ------------------------------------------------------------------------ Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line Updated levels command to use an arg/range and added color parsing to greetings. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line Doxygen comments completed for weather.c ------------------------------------------------------------------------ Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line Corrected several 64-bit warnings. (thanks Buggo) ------------------------------------------------------------------------ Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line Added get_flag_by_name allowing for new trigedit variable checks like %actor.pref(FLAG)% checks. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines COMPLETE: tbaMUD code re-org of global and local scope function and variable declarations. There may be a few things that I did not catch (some non extern keyword declarations of function prototypes within other functions, for example). BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines Continued clean-up of 'extern' references to functions and variables. BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of the char * returned from title_female and title_male. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines More work on mud clean-up. New file: spec_procs.h Created this file to house the legacy special procedures (spec_procs.c and castle.c) and special feature assignment in general. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines - Minor Bugfix: Fixed parse error in mobact.c - Minor Bugfix: act.h is now included in all of the act functions. Forgot to do that the first time :( - Additions: ban.h has been added as the external entry point into the ban.c globals and functions. Files needing ban.h have been updated. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line All act*.c functions, defines and globals have been prototyped/declared in act.h. The file act.h does not contain every ACMD, only those ACMDs and utility functions available within the act*.c files. ------------------------------------------------------------------------ Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line Fixed the last few flags missed for the 128 bit conversion. ------------------------------------------------------------------------ Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines Adding a column formatter for lists. Accepts printf-like arguments. Only used by medit right now. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines - Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts. - Ongoing cleanup to mud project. ------------------------------------------------------------------------ Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line Fixed run_autowiz which ran twice on advancement. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line act.h created and added. This header will be the external entry point for the functions, function subcommands and variables within the act*.c files. It is not designed to be the entry point for all ACMD functions. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line Merge of another part of the code cleanup, the dg script stuff. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line Modularizing and organizing files continues. Committing comm.c and comm.h because they are hairy, and I don't want to do them over if my hard drive crashes. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines - Marking all file scope functions as 'static' - Reorganization of the global variables and functions. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line * Protected the conf.h.* system config files from multiple calls. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line * Removed extraneous references to TRUE / FALSE and YES / NO defines. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines * BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before) * Migrated NUM_* settings from oasis.h to more appropriate locations near where they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the POSITION_* defines.) ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line Added Appendix A - Coder Support. Right now, it simply speaks to the fact that we have included doxygen config files, are working to document the source code, and provides a rudimentary "do this" guide to create the doxygen cross references. ------------------------------------------------------------------------ jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines - All .h files now have doxygen recognized headers, and the format is slightly altered to ease editing of headers. - Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE R_H_ #define _HEADER_H_ .... #endif) ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line constants.h, structs.h and utils.h now protected from multiple includes. This is sometimes overkill, but good practice overall. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line Updated documentation for constants.c and constants.h. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if Graphviz is not available. Now just need a short document describing the usage of doxygen. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line Minor document correction in struct dex_app_tpe. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line *bugfix* do_drink command: When a container is empty, the correct, "It is empty." message is now displayed. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines Merging changes to trunk for: * utils.h, utils.c and structs.h doxygen comments * adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
/* Global Variables definitions, used elsewhere */
2006-12-19 22:56:18 +00:00
struct spell_info_type spell_info[TOP_SPELL_DEFINE + 1];
char cast_arg2[MAX_INPUT_LENGTH];
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line Minor Bugfix: All game configuration settings now reference the world config structure, not the individual config variables found in config.c. ------------------------------------------------------------------------ rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line Added lib/world/qst/ directory, index, index.mini, and 0.qst. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines Bugfix: the include directory (for .h files) is now referenced correctly in the depend statement. Deletion: listrent.c removed as a separate utility. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line Enhancement: utils/ Makefile will now use a depends file, and looks for dependen cies in the ../ directory (shrinks the necessary information to make each utilit y). ------------------------------------------------------------------------ Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line Made TBA specific changes. do_cheat, removed help level checking, and advance to level 32. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a ttribution for the changes. (Thanks seqwith.) ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines Changed Makefile.in to use glob expressions when building the objects. This translates into no longer a need to update Makefile.in whenever a new .c file is added to the mud code. Other Makefile.* have not yet been changed (and need review, anyway). All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen does, however the tbaMUD (and legacy circle code) has never been marked-up with the special CXREF codes required to effectively use the program. Since Doxygen is easier to use, and provides almost as much functionality as CXREF, CXREF support has been dropped. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line Bug Fix: asciiflag_conv* functions now can handle a negative numeric value. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master) will no longer attempt to wander off. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines Based on the compiler warning about mag_materials being an unused function, and the clone spell being unused. Bug fix: Clone can now be cast. It is an 'ignore' target spell. Fix and Modification: Clone, being an effectively unused spell that is only used by mortal Magic Users at level 30, is now implemented as very simple example of how to use mag_materials(). The item required by mag_materials is vnum 161, which in stock tbaMUD is some sacrificial entrails. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix for "Did you mean:" including DG commands. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a door. Documentation: do_simple_move documented. ------------------------------------------------------------------------ Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line Trial run of columnizer function on commands list to see how people like it. ------------------------------------------------------------------------ jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line asciimap, an in game automap, along with a couple of minor bug fixes to do with the automap, patched in (Thanks Jamdog). ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line Minor update: Relocate local variable declaration to the top of ACMD(do_help) ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines Checked in the following placeholders for do_gen_tog: #define SCMD_AUTOLOOT 24 #define SCMD_AUTOGOLD 25 #define SCMD_AUTOSPLIT 26 #define SCMD_AUTOSAC 27 #define SCMD_AUTOASSIST 28 ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line The Autoquest patch, along with a couple of minor bug fixes, has been integrated into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.) ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines Minor Fix: Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int index types. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines Added a new atoidx() conversion function for dealing with string to IDXTYPE conversions (in utils.c, prototype exported through utils.h). Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h). Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c). ------------------------------------------------------------------------ Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line Fixed direction mapping to give readable directions instead of sub commands. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines Since general olc editing are automatically saved to disk, 'shutdown reboot' has been changed to not-autosave by default. (Small change made to do_shutdown in act.wizard.c). ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines Changed: struct attack_hit_type moved to fight.h attack_hit_text exported through fight.h ------------------------------------------------------------------------ jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines - do_file heads or tails files correctly and has also been enhanced to return file info (act.wizard.c) - defines made for common log files created by autorun, and those used by do_file (db.h) - utility functions added: file_head(), file_tail(), file_sizeof(), and file_numlines() (defined utils.c and exported through utils.h) ------------------------------------------------------------------------ Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line Fixed export command. (thanks Kyle) ------------------------------------------------------------------------ jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line Files are now tagged as executable. Should be able to be checked out from subver sion and executed without running chmod. ------------------------------------------------------------------------ Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back. ------------------------------------------------------------------------ jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line Event queue function definitions, global variables and defines doxygenated. ------------------------------------------------------------------------ Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line Updated levels command to use an arg/range and added color parsing to greetings. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line Doxygen comments completed for weather.c ------------------------------------------------------------------------ Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line Corrected several 64-bit warnings. (thanks Buggo) ------------------------------------------------------------------------ Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line Added get_flag_by_name allowing for new trigedit variable checks like %actor.pref(FLAG)% checks. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines COMPLETE: tbaMUD code re-org of global and local scope function and variable declarations. There may be a few things that I did not catch (some non extern keyword declarations of function prototypes within other functions, for example). BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines Continued clean-up of 'extern' references to functions and variables. BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of the char * returned from title_female and title_male. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines More work on mud clean-up. New file: spec_procs.h Created this file to house the legacy special procedures (spec_procs.c and castle.c) and special feature assignment in general. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines - Minor Bugfix: Fixed parse error in mobact.c - Minor Bugfix: act.h is now included in all of the act functions. Forgot to do that the first time :( - Additions: ban.h has been added as the external entry point into the ban.c globals and functions. Files needing ban.h have been updated. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line All act*.c functions, defines and globals have been prototyped/declared in act.h. The file act.h does not contain every ACMD, only those ACMDs and utility functions available within the act*.c files. ------------------------------------------------------------------------ Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line Fixed the last few flags missed for the 128 bit conversion. ------------------------------------------------------------------------ Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines Adding a column formatter for lists. Accepts printf-like arguments. Only used by medit right now. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines - Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts. - Ongoing cleanup to mud project. ------------------------------------------------------------------------ Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line Fixed run_autowiz which ran twice on advancement. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line act.h created and added. This header will be the external entry point for the functions, function subcommands and variables within the act*.c files. It is not designed to be the entry point for all ACMD functions. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line Merge of another part of the code cleanup, the dg script stuff. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line Modularizing and organizing files continues. Committing comm.c and comm.h because they are hairy, and I don't want to do them over if my hard drive crashes. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines - Marking all file scope functions as 'static' - Reorganization of the global variables and functions. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line * Protected the conf.h.* system config files from multiple calls. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line * Removed extraneous references to TRUE / FALSE and YES / NO defines. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines * BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before) * Migrated NUM_* settings from oasis.h to more appropriate locations near where they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the POSITION_* defines.) ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line Added Appendix A - Coder Support. Right now, it simply speaks to the fact that we have included doxygen config files, are working to document the source code, and provides a rudimentary "do this" guide to create the doxygen cross references. ------------------------------------------------------------------------ jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines - All .h files now have doxygen recognized headers, and the format is slightly altered to ease editing of headers. - Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE R_H_ #define _HEADER_H_ .... #endif) ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line constants.h, structs.h and utils.h now protected from multiple includes. This is sometimes overkill, but good practice overall. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line Updated documentation for constants.c and constants.h. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if Graphviz is not available. Now just need a short document describing the usage of doxygen. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line Minor document correction in struct dex_app_tpe. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line *bugfix* do_drink command: When a container is empty, the correct, "It is empty." message is now displayed. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines Merging changes to trunk for: * utils.h, utils.c and structs.h doxygen comments * adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
const char *unused_spellname = "!UNUSED!"; /* So we can get &unused_spellname */
2006-12-19 22:56:18 +00:00
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line Minor Bugfix: All game configuration settings now reference the world config structure, not the individual config variables found in config.c. ------------------------------------------------------------------------ rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line Added lib/world/qst/ directory, index, index.mini, and 0.qst. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines Bugfix: the include directory (for .h files) is now referenced correctly in the depend statement. Deletion: listrent.c removed as a separate utility. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line Enhancement: utils/ Makefile will now use a depends file, and looks for dependen cies in the ../ directory (shrinks the necessary information to make each utilit y). ------------------------------------------------------------------------ Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line Made TBA specific changes. do_cheat, removed help level checking, and advance to level 32. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a ttribution for the changes. (Thanks seqwith.) ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines Changed Makefile.in to use glob expressions when building the objects. This translates into no longer a need to update Makefile.in whenever a new .c file is added to the mud code. Other Makefile.* have not yet been changed (and need review, anyway). All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen does, however the tbaMUD (and legacy circle code) has never been marked-up with the special CXREF codes required to effectively use the program. Since Doxygen is easier to use, and provides almost as much functionality as CXREF, CXREF support has been dropped. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line Bug Fix: asciiflag_conv* functions now can handle a negative numeric value. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master) will no longer attempt to wander off. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines Based on the compiler warning about mag_materials being an unused function, and the clone spell being unused. Bug fix: Clone can now be cast. It is an 'ignore' target spell. Fix and Modification: Clone, being an effectively unused spell that is only used by mortal Magic Users at level 30, is now implemented as very simple example of how to use mag_materials(). The item required by mag_materials is vnum 161, which in stock tbaMUD is some sacrificial entrails. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix for "Did you mean:" including DG commands. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a door. Documentation: do_simple_move documented. ------------------------------------------------------------------------ Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line Trial run of columnizer function on commands list to see how people like it. ------------------------------------------------------------------------ jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line asciimap, an in game automap, along with a couple of minor bug fixes to do with the automap, patched in (Thanks Jamdog). ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line Minor update: Relocate local variable declaration to the top of ACMD(do_help) ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines Checked in the following placeholders for do_gen_tog: #define SCMD_AUTOLOOT 24 #define SCMD_AUTOGOLD 25 #define SCMD_AUTOSPLIT 26 #define SCMD_AUTOSAC 27 #define SCMD_AUTOASSIST 28 ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line The Autoquest patch, along with a couple of minor bug fixes, has been integrated into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.) ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines Minor Fix: Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int index types. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines Added a new atoidx() conversion function for dealing with string to IDXTYPE conversions (in utils.c, prototype exported through utils.h). Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h). Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c). ------------------------------------------------------------------------ Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line Fixed direction mapping to give readable directions instead of sub commands. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines Since general olc editing are automatically saved to disk, 'shutdown reboot' has been changed to not-autosave by default. (Small change made to do_shutdown in act.wizard.c). ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines Changed: struct attack_hit_type moved to fight.h attack_hit_text exported through fight.h ------------------------------------------------------------------------ jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines - do_file heads or tails files correctly and has also been enhanced to return file info (act.wizard.c) - defines made for common log files created by autorun, and those used by do_file (db.h) - utility functions added: file_head(), file_tail(), file_sizeof(), and file_numlines() (defined utils.c and exported through utils.h) ------------------------------------------------------------------------ Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line Fixed export command. (thanks Kyle) ------------------------------------------------------------------------ jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line Files are now tagged as executable. Should be able to be checked out from subver sion and executed without running chmod. ------------------------------------------------------------------------ Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back. ------------------------------------------------------------------------ jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line Event queue function definitions, global variables and defines doxygenated. ------------------------------------------------------------------------ Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line Updated levels command to use an arg/range and added color parsing to greetings. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line Doxygen comments completed for weather.c ------------------------------------------------------------------------ Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line Corrected several 64-bit warnings. (thanks Buggo) ------------------------------------------------------------------------ Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line Added get_flag_by_name allowing for new trigedit variable checks like %actor.pref(FLAG)% checks. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines COMPLETE: tbaMUD code re-org of global and local scope function and variable declarations. There may be a few things that I did not catch (some non extern keyword declarations of function prototypes within other functions, for example). BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines Continued clean-up of 'extern' references to functions and variables. BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of the char * returned from title_female and title_male. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines More work on mud clean-up. New file: spec_procs.h Created this file to house the legacy special procedures (spec_procs.c and castle.c) and special feature assignment in general. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines - Minor Bugfix: Fixed parse error in mobact.c - Minor Bugfix: act.h is now included in all of the act functions. Forgot to do that the first time :( - Additions: ban.h has been added as the external entry point into the ban.c globals and functions. Files needing ban.h have been updated. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line All act*.c functions, defines and globals have been prototyped/declared in act.h. The file act.h does not contain every ACMD, only those ACMDs and utility functions available within the act*.c files. ------------------------------------------------------------------------ Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line Fixed the last few flags missed for the 128 bit conversion. ------------------------------------------------------------------------ Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines Adding a column formatter for lists. Accepts printf-like arguments. Only used by medit right now. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines - Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts. - Ongoing cleanup to mud project. ------------------------------------------------------------------------ Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line Fixed run_autowiz which ran twice on advancement. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line act.h created and added. This header will be the external entry point for the functions, function subcommands and variables within the act*.c files. It is not designed to be the entry point for all ACMD functions. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line Merge of another part of the code cleanup, the dg script stuff. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line Modularizing and organizing files continues. Committing comm.c and comm.h because they are hairy, and I don't want to do them over if my hard drive crashes. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines - Marking all file scope functions as 'static' - Reorganization of the global variables and functions. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line * Protected the conf.h.* system config files from multiple calls. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line * Removed extraneous references to TRUE / FALSE and YES / NO defines. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines * BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before) * Migrated NUM_* settings from oasis.h to more appropriate locations near where they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the POSITION_* defines.) ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line Added Appendix A - Coder Support. Right now, it simply speaks to the fact that we have included doxygen config files, are working to document the source code, and provides a rudimentary "do this" guide to create the doxygen cross references. ------------------------------------------------------------------------ jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines - All .h files now have doxygen recognized headers, and the format is slightly altered to ease editing of headers. - Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE R_H_ #define _HEADER_H_ .... #endif) ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line constants.h, structs.h and utils.h now protected from multiple includes. This is sometimes overkill, but good practice overall. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line Updated documentation for constants.c and constants.h. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if Graphviz is not available. Now just need a short document describing the usage of doxygen. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line Minor document correction in struct dex_app_tpe. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line *bugfix* do_drink command: When a container is empty, the correct, "It is empty." message is now displayed. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines Merging changes to trunk for: * utils.h, utils.c and structs.h doxygen comments * adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
/* Local (File Scope) Function Prototypes */
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
static void say_spell(struct char_data *ch, int spellnum, struct char_data *tch,
struct obj_data *tobj);
static void spello(int spl, const char *name, int max_mana, int min_mana,
int mana_change, int minpos, int targets, int violent, int routines,
const char *wearoff);
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line Minor Bugfix: All game configuration settings now reference the world config structure, not the individual config variables found in config.c. ------------------------------------------------------------------------ rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line Added lib/world/qst/ directory, index, index.mini, and 0.qst. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines Bugfix: the include directory (for .h files) is now referenced correctly in the depend statement. Deletion: listrent.c removed as a separate utility. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line Enhancement: utils/ Makefile will now use a depends file, and looks for dependen cies in the ../ directory (shrinks the necessary information to make each utilit y). ------------------------------------------------------------------------ Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line Made TBA specific changes. do_cheat, removed help level checking, and advance to level 32. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a ttribution for the changes. (Thanks seqwith.) ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines Changed Makefile.in to use glob expressions when building the objects. This translates into no longer a need to update Makefile.in whenever a new .c file is added to the mud code. Other Makefile.* have not yet been changed (and need review, anyway). All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen does, however the tbaMUD (and legacy circle code) has never been marked-up with the special CXREF codes required to effectively use the program. Since Doxygen is easier to use, and provides almost as much functionality as CXREF, CXREF support has been dropped. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line Bug Fix: asciiflag_conv* functions now can handle a negative numeric value. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master) will no longer attempt to wander off. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines Based on the compiler warning about mag_materials being an unused function, and the clone spell being unused. Bug fix: Clone can now be cast. It is an 'ignore' target spell. Fix and Modification: Clone, being an effectively unused spell that is only used by mortal Magic Users at level 30, is now implemented as very simple example of how to use mag_materials(). The item required by mag_materials is vnum 161, which in stock tbaMUD is some sacrificial entrails. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix for "Did you mean:" including DG commands. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a door. Documentation: do_simple_move documented. ------------------------------------------------------------------------ Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line Trial run of columnizer function on commands list to see how people like it. ------------------------------------------------------------------------ jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line asciimap, an in game automap, along with a couple of minor bug fixes to do with the automap, patched in (Thanks Jamdog). ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line Minor update: Relocate local variable declaration to the top of ACMD(do_help) ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines Checked in the following placeholders for do_gen_tog: #define SCMD_AUTOLOOT 24 #define SCMD_AUTOGOLD 25 #define SCMD_AUTOSPLIT 26 #define SCMD_AUTOSAC 27 #define SCMD_AUTOASSIST 28 ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line The Autoquest patch, along with a couple of minor bug fixes, has been integrated into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.) ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines Minor Fix: Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int index types. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines Added a new atoidx() conversion function for dealing with string to IDXTYPE conversions (in utils.c, prototype exported through utils.h). Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h). Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c). ------------------------------------------------------------------------ Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line Fixed direction mapping to give readable directions instead of sub commands. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines Since general olc editing are automatically saved to disk, 'shutdown reboot' has been changed to not-autosave by default. (Small change made to do_shutdown in act.wizard.c). ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines Changed: struct attack_hit_type moved to fight.h attack_hit_text exported through fight.h ------------------------------------------------------------------------ jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines - do_file heads or tails files correctly and has also been enhanced to return file info (act.wizard.c) - defines made for common log files created by autorun, and those used by do_file (db.h) - utility functions added: file_head(), file_tail(), file_sizeof(), and file_numlines() (defined utils.c and exported through utils.h) ------------------------------------------------------------------------ Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line Fixed export command. (thanks Kyle) ------------------------------------------------------------------------ jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line Files are now tagged as executable. Should be able to be checked out from subver sion and executed without running chmod. ------------------------------------------------------------------------ Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back. ------------------------------------------------------------------------ jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line Event queue function definitions, global variables and defines doxygenated. ------------------------------------------------------------------------ Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line Updated levels command to use an arg/range and added color parsing to greetings. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line Doxygen comments completed for weather.c ------------------------------------------------------------------------ Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line Corrected several 64-bit warnings. (thanks Buggo) ------------------------------------------------------------------------ Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line Added get_flag_by_name allowing for new trigedit variable checks like %actor.pref(FLAG)% checks. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines COMPLETE: tbaMUD code re-org of global and local scope function and variable declarations. There may be a few things that I did not catch (some non extern keyword declarations of function prototypes within other functions, for example). BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines Continued clean-up of 'extern' references to functions and variables. BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of the char * returned from title_female and title_male. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines More work on mud clean-up. New file: spec_procs.h Created this file to house the legacy special procedures (spec_procs.c and castle.c) and special feature assignment in general. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines - Minor Bugfix: Fixed parse error in mobact.c - Minor Bugfix: act.h is now included in all of the act functions. Forgot to do that the first time :( - Additions: ban.h has been added as the external entry point into the ban.c globals and functions. Files needing ban.h have been updated. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line All act*.c functions, defines and globals have been prototyped/declared in act.h. The file act.h does not contain every ACMD, only those ACMDs and utility functions available within the act*.c files. ------------------------------------------------------------------------ Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line Fixed the last few flags missed for the 128 bit conversion. ------------------------------------------------------------------------ Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines Adding a column formatter for lists. Accepts printf-like arguments. Only used by medit right now. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines - Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts. - Ongoing cleanup to mud project. ------------------------------------------------------------------------ Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line Fixed run_autowiz which ran twice on advancement. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line act.h created and added. This header will be the external entry point for the functions, function subcommands and variables within the act*.c files. It is not designed to be the entry point for all ACMD functions. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line Merge of another part of the code cleanup, the dg script stuff. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line Modularizing and organizing files continues. Committing comm.c and comm.h because they are hairy, and I don't want to do them over if my hard drive crashes. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines - Marking all file scope functions as 'static' - Reorganization of the global variables and functions. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line * Protected the conf.h.* system config files from multiple calls. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line * Removed extraneous references to TRUE / FALSE and YES / NO defines. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines * BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before) * Migrated NUM_* settings from oasis.h to more appropriate locations near where they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the POSITION_* defines.) ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line Added Appendix A - Coder Support. Right now, it simply speaks to the fact that we have included doxygen config files, are working to document the source code, and provides a rudimentary "do this" guide to create the doxygen cross references. ------------------------------------------------------------------------ jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines - All .h files now have doxygen recognized headers, and the format is slightly altered to ease editing of headers. - Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE R_H_ #define _HEADER_H_ .... #endif) ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line constants.h, structs.h and utils.h now protected from multiple includes. This is sometimes overkill, but good practice overall. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line Updated documentation for constants.c and constants.h. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if Graphviz is not available. Now just need a short document describing the usage of doxygen. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line Minor document correction in struct dex_app_tpe. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line *bugfix* do_drink command: When a container is empty, the correct, "It is empty." message is now displayed. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines Merging changes to trunk for: * utils.h, utils.c and structs.h doxygen comments * adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
static int mag_manacost(struct char_data *ch, int spellnum);
2006-12-19 22:56:18 +00:00
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line Minor Bugfix: All game configuration settings now reference the world config structure, not the individual config variables found in config.c. ------------------------------------------------------------------------ rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line Added lib/world/qst/ directory, index, index.mini, and 0.qst. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines Bugfix: the include directory (for .h files) is now referenced correctly in the depend statement. Deletion: listrent.c removed as a separate utility. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line Enhancement: utils/ Makefile will now use a depends file, and looks for dependen cies in the ../ directory (shrinks the necessary information to make each utilit y). ------------------------------------------------------------------------ Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line Made TBA specific changes. do_cheat, removed help level checking, and advance to level 32. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a ttribution for the changes. (Thanks seqwith.) ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines Changed Makefile.in to use glob expressions when building the objects. This translates into no longer a need to update Makefile.in whenever a new .c file is added to the mud code. Other Makefile.* have not yet been changed (and need review, anyway). All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen does, however the tbaMUD (and legacy circle code) has never been marked-up with the special CXREF codes required to effectively use the program. Since Doxygen is easier to use, and provides almost as much functionality as CXREF, CXREF support has been dropped. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line Bug Fix: asciiflag_conv* functions now can handle a negative numeric value. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master) will no longer attempt to wander off. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines Based on the compiler warning about mag_materials being an unused function, and the clone spell being unused. Bug fix: Clone can now be cast. It is an 'ignore' target spell. Fix and Modification: Clone, being an effectively unused spell that is only used by mortal Magic Users at level 30, is now implemented as very simple example of how to use mag_materials(). The item required by mag_materials is vnum 161, which in stock tbaMUD is some sacrificial entrails. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix for "Did you mean:" including DG commands. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a door. Documentation: do_simple_move documented. ------------------------------------------------------------------------ Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line Trial run of columnizer function on commands list to see how people like it. ------------------------------------------------------------------------ jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line asciimap, an in game automap, along with a couple of minor bug fixes to do with the automap, patched in (Thanks Jamdog). ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line Minor update: Relocate local variable declaration to the top of ACMD(do_help) ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines Checked in the following placeholders for do_gen_tog: #define SCMD_AUTOLOOT 24 #define SCMD_AUTOGOLD 25 #define SCMD_AUTOSPLIT 26 #define SCMD_AUTOSAC 27 #define SCMD_AUTOASSIST 28 ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line The Autoquest patch, along with a couple of minor bug fixes, has been integrated into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.) ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines Minor Fix: Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int index types. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines Added a new atoidx() conversion function for dealing with string to IDXTYPE conversions (in utils.c, prototype exported through utils.h). Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h). Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c). ------------------------------------------------------------------------ Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line Fixed direction mapping to give readable directions instead of sub commands. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines Since general olc editing are automatically saved to disk, 'shutdown reboot' has been changed to not-autosave by default. (Small change made to do_shutdown in act.wizard.c). ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines Changed: struct attack_hit_type moved to fight.h attack_hit_text exported through fight.h ------------------------------------------------------------------------ jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines - do_file heads or tails files correctly and has also been enhanced to return file info (act.wizard.c) - defines made for common log files created by autorun, and those used by do_file (db.h) - utility functions added: file_head(), file_tail(), file_sizeof(), and file_numlines() (defined utils.c and exported through utils.h) ------------------------------------------------------------------------ Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line Fixed export command. (thanks Kyle) ------------------------------------------------------------------------ jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line Files are now tagged as executable. Should be able to be checked out from subver sion and executed without running chmod. ------------------------------------------------------------------------ Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back. ------------------------------------------------------------------------ jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line Event queue function definitions, global variables and defines doxygenated. ------------------------------------------------------------------------ Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line Updated levels command to use an arg/range and added color parsing to greetings. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line Doxygen comments completed for weather.c ------------------------------------------------------------------------ Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line Corrected several 64-bit warnings. (thanks Buggo) ------------------------------------------------------------------------ Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line Added get_flag_by_name allowing for new trigedit variable checks like %actor.pref(FLAG)% checks. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines COMPLETE: tbaMUD code re-org of global and local scope function and variable declarations. There may be a few things that I did not catch (some non extern keyword declarations of function prototypes within other functions, for example). BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines Continued clean-up of 'extern' references to functions and variables. BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of the char * returned from title_female and title_male. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines More work on mud clean-up. New file: spec_procs.h Created this file to house the legacy special procedures (spec_procs.c and castle.c) and special feature assignment in general. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines - Minor Bugfix: Fixed parse error in mobact.c - Minor Bugfix: act.h is now included in all of the act functions. Forgot to do that the first time :( - Additions: ban.h has been added as the external entry point into the ban.c globals and functions. Files needing ban.h have been updated. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line All act*.c functions, defines and globals have been prototyped/declared in act.h. The file act.h does not contain every ACMD, only those ACMDs and utility functions available within the act*.c files. ------------------------------------------------------------------------ Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line Fixed the last few flags missed for the 128 bit conversion. ------------------------------------------------------------------------ Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines Adding a column formatter for lists. Accepts printf-like arguments. Only used by medit right now. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines - Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts. - Ongoing cleanup to mud project. ------------------------------------------------------------------------ Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line Fixed run_autowiz which ran twice on advancement. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line act.h created and added. This header will be the external entry point for the functions, function subcommands and variables within the act*.c files. It is not designed to be the entry point for all ACMD functions. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line Merge of another part of the code cleanup, the dg script stuff. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line Modularizing and organizing files continues. Committing comm.c and comm.h because they are hairy, and I don't want to do them over if my hard drive crashes. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines - Marking all file scope functions as 'static' - Reorganization of the global variables and functions. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line * Protected the conf.h.* system config files from multiple calls. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line * Removed extraneous references to TRUE / FALSE and YES / NO defines. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines * BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before) * Migrated NUM_* settings from oasis.h to more appropriate locations near where they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the POSITION_* defines.) ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line Added Appendix A - Coder Support. Right now, it simply speaks to the fact that we have included doxygen config files, are working to document the source code, and provides a rudimentary "do this" guide to create the doxygen cross references. ------------------------------------------------------------------------ jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines - All .h files now have doxygen recognized headers, and the format is slightly altered to ease editing of headers. - Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE R_H_ #define _HEADER_H_ .... #endif) ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line constants.h, structs.h and utils.h now protected from multiple includes. This is sometimes overkill, but good practice overall. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line Updated documentation for constants.c and constants.h. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if Graphviz is not available. Now just need a short document describing the usage of doxygen. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line Minor document correction in struct dex_app_tpe. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line *bugfix* do_drink command: When a container is empty, the correct, "It is empty." message is now displayed. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines Merging changes to trunk for: * utils.h, utils.c and structs.h doxygen comments * adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
/* Local (File Scope) Variables */
2006-12-19 22:56:18 +00:00
struct syllable {
const char *org;
const char *news;
};
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
static struct syllable syls[] = { { " ", " " }, { "ar", "abra" },
{ "ate", "i" }, { "cau", "kada" }, { "blind", "nose" }, { "bur", "mosa" }, {
"cu", "judi" }, { "de", "oculo" }, { "dis", "mar" },
{ "ect", "kamina" }, { "en", "uns" }, { "gro", "cra" }, { "light", "dies" },
{ "lo", "hi" }, { "magi", "kari" }, { "mon", "bar" }, { "mor", "zak" }, {
"move", "sido" }, { "ness", "lacri" }, { "ning", "illa" }, { "per",
"duda" }, { "ra", "gru" }, { "re", "candus" }, { "son", "sabru" }, {
"tect", "infra" }, { "tri", "cula" }, { "ven", "nofo" }, { "word of",
"inset" }, { "a", "i" }, { "b", "v" }, { "c", "q" }, { "d", "m" }, {
"e", "o" }, { "f", "y" }, { "g", "t" }, { "h", "p" }, { "i", "u" }, {
"j", "y" }, { "k", "t" }, { "l", "r" }, { "m", "w" }, { "n", "b" }, {
"o", "a" }, { "p", "s" }, { "q", "d" }, { "r", "f" }, { "s", "g" }, {
"t", "h" }, { "u", "e" }, { "v", "z" }, { "w", "x" }, { "x", "n" }, {
"y", "l" }, { "z", "k" }, { "", "" } };
static int mag_manacost(struct char_data *ch, int spellnum) {
2006-12-19 22:56:18 +00:00
return MAX(SINFO.mana_max - (SINFO.mana_change *
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
(GET_LEVEL(ch) - SINFO.min_level[(int) GET_CLASS(ch)])),
SINFO.mana_min);
2006-12-19 22:56:18 +00:00
}
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
static char *obfuscate_spell(const char *unobfuscated) {
static char obfuscated[200];
int maxlen = 200;
2006-12-19 22:56:18 +00:00
int j, ofs = 0;
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
*obfuscated = '\0';
2006-12-19 22:56:18 +00:00
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
while (unobfuscated[ofs]) {
2006-12-19 22:56:18 +00:00
for (j = 0; *(syls[j].org); j++) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if (!strncmp(syls[j].org, unobfuscated + ofs, strlen(syls[j].org))) {
if (strlen(syls[j].news) < maxlen) {
strncat(obfuscated, syls[j].news, maxlen);
maxlen -= strlen(syls[j].news);
} else {
log("No room in obfuscated version of '%s' (currently obfuscated to '%s') to add syllable '%s'.",
unobfuscated, obfuscated, syls[j].news);
}
ofs += strlen(syls[j].org);
2006-12-19 22:56:18 +00:00
break;
}
}
/* i.e., we didn't find a match in syls[] */
if (!*syls[j].org) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
log("No entry in syllable table for substring of '%s' starting at '%s'.", unobfuscated, unobfuscated + ofs);
2006-12-19 22:56:18 +00:00
ofs++;
}
}
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
return obfuscated;
}
static void say_spell(struct char_data *ch, int spellnum, struct char_data *tch,
struct obj_data *tobj) {
const char *format, *spell = skill_name(spellnum);
char act_buf_original[256], act_buf_obfuscated[256], *obfuscated = obfuscate_spell(spell);
struct char_data *i;
2006-12-19 22:56:18 +00:00
if (tch != NULL && IN_ROOM(tch) == IN_ROOM(ch)) {
if (tch == ch)
format = "$n closes $s eyes and utters the words, '%s'.";
else
format = "$n stares at $N and utters the words, '%s'.";
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
} else if (tobj != NULL
&& ((IN_ROOM(tobj) == IN_ROOM(ch)) || (tobj->carried_by == ch)))
2006-12-19 22:56:18 +00:00
format = "$n stares at $p and utters the words, '%s'.";
else
format = "$n utters the words, '%s'.";
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
snprintf(act_buf_original, sizeof(act_buf_original), format, spell);
snprintf(act_buf_obfuscated, sizeof(act_buf_obfuscated), format, obfuscated);
2006-12-19 22:56:18 +00:00
for (i = world[IN_ROOM(ch)].people; i; i = i->next_in_room) {
if (i == ch || i == tch || !i->desc || !AWAKE(i))
continue;
if (GET_CLASS(ch) == GET_CLASS(i))
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
perform_act(act_buf_original, ch, tobj, tch, i);
2006-12-19 22:56:18 +00:00
else
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
perform_act(act_buf_obfuscated, ch, tobj, tch, i);
2006-12-19 22:56:18 +00:00
}
if (tch != NULL && tch != ch && IN_ROOM(tch) == IN_ROOM(ch)) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
snprintf(act_buf_original, sizeof(act_buf_original), "$n stares at you and utters the words, '%s'.",
GET_CLASS(ch) == GET_CLASS(tch) ? spell : obfuscated);
act(act_buf_original, FALSE, ch, NULL, tch, TO_VICT);
2006-12-19 22:56:18 +00:00
}
}
/* This function should be used anytime you are not 100% sure that you have
2006-12-19 22:56:18 +00:00
* a valid spell/skill number. A typical for() loop would not need to use
* this because you can guarantee > 0 and <= TOP_SPELL_DEFINE. */
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
const char *skill_name(int num) {
2006-12-19 22:56:18 +00:00
if (num > 0 && num <= TOP_SPELL_DEFINE)
return (spell_info[num].name);
else if (num == -1)
return ("UNUSED");
else
return ("UNDEFINED");
}
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
int find_skill_num(char *name) {
2006-12-19 22:56:18 +00:00
int skindex, ok;
char *temp, *temp2;
char first[256], first2[256], tempbuf[256];
for (skindex = 1; skindex <= TOP_SPELL_DEFINE; skindex++) {
if (is_abbrev(name, spell_info[skindex].name))
return (skindex);
ok = TRUE;
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
strlcpy(tempbuf, spell_info[skindex].name, sizeof(tempbuf)); /* strlcpy: OK */
2006-12-19 22:56:18 +00:00
temp = any_one_arg(tempbuf, first);
temp2 = any_one_arg(name, first2);
while (*first && *first2 && ok) {
if (!is_abbrev(first2, first))
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
ok = FALSE;
2006-12-19 22:56:18 +00:00
temp = any_one_arg(temp, first);
temp2 = any_one_arg(temp2, first2);
}
if (ok && !*first2)
return (skindex);
}
return (-1);
}
/* This function is the very heart of the entire magic system. All invocations
* of all types of magic -- objects, spoken and unspoken PC and NPC spells, the
2010-11-06 15:47:38 +00:00
* works -- all come through this function eventually. This is also the entry
* point for non-spoken or unrestricted spells. Spellnum 0 is legal but silently
* ignored here, to make callers simpler. */
2006-12-19 22:56:18 +00:00
int call_magic(struct char_data *caster, struct char_data *cvict,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
struct obj_data *ovict, int spellnum, int level, int casttype) {
2006-12-19 22:56:18 +00:00
int savetype;
if (spellnum < 1 || spellnum > TOP_SPELL_DEFINE)
return (0);
if (!cast_wtrigger(caster, cvict, ovict, spellnum))
return 0;
if (!cast_otrigger(caster, ovict, spellnum))
return 0;
if (!cast_mtrigger(caster, cvict, spellnum))
return 0;
if (ROOM_FLAGGED(IN_ROOM(caster), ROOM_NOMAGIC)) {
send_to_char(caster, "Your magic fizzles out and dies.\r\n");
act("$n's magic fizzles out and dies.", FALSE, caster, 0, 0, TO_ROOM);
return (0);
}
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if (ROOM_FLAGGED(IN_ROOM(caster), ROOM_PEACEFUL) && (SINFO.violent || IS_SET(SINFO.routines, MAG_DAMAGE))) {
2006-12-19 22:56:18 +00:00
send_to_char(caster, "A flash of white light fills the room, dispelling your violent magic!\r\n");
act("White light from no particular source suddenly fills the room, then vanishes.", FALSE, caster, 0, 0, TO_ROOM);
return (0);
}
if (cvict && MOB_FLAGGED(cvict, MOB_NOKILL)) {
send_to_char(caster, "This mob is protected.\r\n");
return (0);
}
2006-12-19 22:56:18 +00:00
/* determine the type of saving throw */
switch (casttype) {
case CAST_STAFF:
case CAST_SCROLL:
case CAST_POTION:
case CAST_WAND:
savetype = SAVING_ROD;
break;
case CAST_SPELL:
savetype = SAVING_SPELL;
break;
default:
savetype = SAVING_BREATH;
break;
}
if (IS_SET(SINFO.routines, MAG_DAMAGE))
if (mag_damage(level, caster, cvict, spellnum, savetype) == -1)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
return (-1); /* Successful and target died, don't cast again. */
2006-12-19 22:56:18 +00:00
if (IS_SET(SINFO.routines, MAG_AFFECTS))
mag_affects(level, caster, cvict, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_UNAFFECTS))
mag_unaffects(level, caster, cvict, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_POINTS))
mag_points(level, caster, cvict, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_ALTER_OBJS))
mag_alter_objs(level, caster, ovict, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_GROUPS))
mag_groups(level, caster, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_MASSES))
mag_masses(level, caster, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_AREAS))
mag_areas(level, caster, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_SUMMONS))
mag_summons(level, caster, ovict, spellnum, savetype);
if (IS_SET(SINFO.routines, MAG_CREATIONS))
mag_creations(level, caster, spellnum);
if (IS_SET(SINFO.routines, MAG_ROOMS))
mag_rooms(level, caster, spellnum);
2006-12-19 22:56:18 +00:00
if (IS_SET(SINFO.routines, MAG_MANUAL))
switch (spellnum) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
case SPELL_CHARM:
MANUAL_SPELL(spell_charm)
;
break;
case SPELL_CREATE_WATER:
MANUAL_SPELL(spell_create_water)
;
break;
case SPELL_DETECT_POISON:
MANUAL_SPELL(spell_detect_poison)
;
break;
case SPELL_ENCHANT_WEAPON:
MANUAL_SPELL(spell_enchant_weapon)
;
break;
case SPELL_IDENTIFY:
MANUAL_SPELL(spell_identify)
;
break;
case SPELL_LOCATE_OBJECT:
MANUAL_SPELL(spell_locate_object)
;
break;
case SPELL_SUMMON:
MANUAL_SPELL(spell_summon)
;
break;
case SPELL_WORD_OF_RECALL:
MANUAL_SPELL(spell_recall)
;
break;
case SPELL_TELEPORT:
MANUAL_SPELL(spell_teleport)
;
break;
2006-12-19 22:56:18 +00:00
}
return (1);
}
/* mag_objectmagic: This is the entry-point for all magic items. This should
2006-12-19 22:56:18 +00:00
* only be called by the 'quaff', 'use', 'recite', etc. routines.
* For reference, object values 0-3:
* staff - [0] level [1] max charges [2] num charges [3] spell num
* wand - [0] level [1] max charges [2] num charges [3] spell num
* scroll - [0] level [1] spell num [2] spell num [3] spell num
* potion - [0] level [1] spell num [2] spell num [3] spell num
* Staves and wands will default to level 14 if the level is not specified; the
* DikuMUD format did not specify staff and wand levels in the world files */
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
void mag_objectmagic(struct char_data *ch, struct obj_data *obj, char *argument) {
2006-12-19 22:56:18 +00:00
char arg[MAX_INPUT_LENGTH];
int i, k;
struct char_data *tch = NULL, *next_tch;
struct obj_data *tobj = NULL;
one_argument(argument, arg);
k = generic_find(arg, FIND_CHAR_ROOM | FIND_OBJ_INV | FIND_OBJ_ROOM |
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
FIND_OBJ_EQUIP, ch, &tch, &tobj);
2006-12-19 22:56:18 +00:00
switch (GET_OBJ_TYPE(obj)) {
case ITEM_STAFF:
act("You tap $p three times on the ground.", FALSE, ch, obj, 0, TO_CHAR);
if (obj->action_description)
act(obj->action_description, FALSE, ch, obj, 0, TO_ROOM);
else
act("$n taps $p three times on the ground.", FALSE, ch, obj, 0, TO_ROOM);
if (GET_OBJ_VAL(obj, 2) <= 0) {
send_to_char(ch, "It seems powerless.\r\n");
act("Nothing seems to happen.", FALSE, ch, obj, 0, TO_ROOM);
} else {
GET_OBJ_VAL(obj, 2)--;
WAIT_STATE(ch, PULSE_VIOLENCE);
/* Level to cast spell at. */
k = GET_OBJ_VAL(obj, 0) ? GET_OBJ_VAL(obj, 0) : DEFAULT_STAFF_LVL;
/* Area/mass spells on staves can cause crashes. So we use special cases
* for those spells spells here. */
2006-12-19 22:56:18 +00:00
if (HAS_SPELL_ROUTINE(GET_OBJ_VAL(obj, 3), MAG_MASSES | MAG_AREAS)) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
for (i = 0, tch = world[IN_ROOM(ch)].people; tch;
tch = tch->next_in_room)
i++;
while (i-- > 0)
call_magic(ch, NULL, NULL, GET_OBJ_VAL(obj, 3), k, CAST_STAFF);
2006-12-19 22:56:18 +00:00
} else {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
for (tch = world[IN_ROOM(ch)].people; tch; tch = next_tch) {
next_tch = tch->next_in_room;
if (ch != tch)
call_magic(ch, tch, NULL, GET_OBJ_VAL(obj, 3), k, CAST_STAFF);
}
2006-12-19 22:56:18 +00:00
}
}
break;
case ITEM_WAND:
if (k == FIND_CHAR_ROOM) {
if (tch == ch) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
act("You point $p at yourself.", FALSE, ch, obj, 0, TO_CHAR);
act("$n points $p at $mself.", FALSE, ch, obj, 0, TO_ROOM);
2006-12-19 22:56:18 +00:00
} else {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
act("You point $p at $N.", FALSE, ch, obj, tch, TO_CHAR);
if (obj->action_description)
act(obj->action_description, FALSE, ch, obj, tch, TO_ROOM);
else
act("$n points $p at $N.", TRUE, ch, obj, tch, TO_ROOM);
2006-12-19 22:56:18 +00:00
}
} else if (tobj != NULL) {
act("You point $p at $P.", FALSE, ch, obj, tobj, TO_CHAR);
if (obj->action_description)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
act(obj->action_description, FALSE, ch, obj, tobj, TO_ROOM);
2006-12-19 22:56:18 +00:00
else
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
act("$n points $p at $P.", TRUE, ch, obj, tobj, TO_ROOM);
} else if (IS_SET(spell_info[GET_OBJ_VAL(obj, 3)].routines,
MAG_AREAS | MAG_MASSES)) {
2006-12-19 22:56:18 +00:00
/* Wands with area spells don't need to be pointed. */
act("You point $p outward.", FALSE, ch, obj, NULL, TO_CHAR);
act("$n points $p outward.", TRUE, ch, obj, NULL, TO_ROOM);
} else {
act("At what should $p be pointed?", FALSE, ch, obj, NULL, TO_CHAR);
return;
}
if (GET_OBJ_VAL(obj, 2) <= 0) {
send_to_char(ch, "It seems powerless.\r\n");
act("Nothing seems to happen.", FALSE, ch, obj, 0, TO_ROOM);
return;
}
GET_OBJ_VAL(obj, 2)--;
WAIT_STATE(ch, PULSE_VIOLENCE);
if (GET_OBJ_VAL(obj, 0))
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
call_magic(ch, tch, tobj, GET_OBJ_VAL(obj, 3), GET_OBJ_VAL(obj, 0),
CAST_WAND);
2006-12-19 22:56:18 +00:00
else
call_magic(ch, tch, tobj, GET_OBJ_VAL(obj, 3),
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
DEFAULT_WAND_LVL, CAST_WAND);
2006-12-19 22:56:18 +00:00
break;
case ITEM_SCROLL:
if (*arg) {
if (!k) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
act("There is nothing to here to affect with $p.", FALSE, ch, obj, NULL,
TO_CHAR);
return;
2006-12-19 22:56:18 +00:00
}
} else
tch = ch;
act("You recite $p which dissolves.", TRUE, ch, obj, 0, TO_CHAR);
if (obj->action_description)
act(obj->action_description, FALSE, ch, obj, tch, TO_ROOM);
2006-12-19 22:56:18 +00:00
else
act("$n recites $p.", FALSE, ch, obj, NULL, TO_ROOM);
WAIT_STATE(ch, PULSE_VIOLENCE);
for (i = 1; i <= 3; i++)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if (call_magic(ch, tch, tobj, GET_OBJ_VAL(obj, i), GET_OBJ_VAL(obj, 0),
CAST_SCROLL) <= 0)
break;
2006-12-19 22:56:18 +00:00
if (obj != NULL)
extract_obj(obj);
break;
case ITEM_POTION:
tch = ch;
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if (!consume_otrigger(obj, ch, OCMD_QUAFF)) /* check trigger */
return;
2006-12-19 22:56:18 +00:00
act("You quaff $p.", FALSE, ch, obj, NULL, TO_CHAR);
if (obj->action_description)
act(obj->action_description, FALSE, ch, obj, NULL, TO_ROOM);
else
act("$n quaffs $p.", TRUE, ch, obj, NULL, TO_ROOM);
WAIT_STATE(ch, PULSE_VIOLENCE);
for (i = 1; i <= 3; i++)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if (call_magic(ch, ch, NULL, GET_OBJ_VAL(obj, i), GET_OBJ_VAL(obj, 0),
CAST_POTION) <= 0)
break;
2006-12-19 22:56:18 +00:00
if (obj != NULL)
extract_obj(obj);
break;
default:
log("SYSERR: Unknown object_type %d in mag_objectmagic.",
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
GET_OBJ_TYPE(obj));
2006-12-19 22:56:18 +00:00
break;
}
}
/* cast_spell is used generically to cast any spoken spell, assuming we already
2010-11-06 15:47:38 +00:00
* have the target char/obj and spell number. It checks all restrictions,
* prints the words, etc. Entry point for NPC casts. Recommended entry point
* for spells cast by NPCs via specprocs. */
2006-12-19 22:56:18 +00:00
int cast_spell(struct char_data *ch, struct char_data *tch,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
struct obj_data *tobj, int spellnum) {
2006-12-19 22:56:18 +00:00
if (spellnum < 0 || spellnum > TOP_SPELL_DEFINE) {
log("SYSERR: cast_spell trying to call spellnum %d/%d.", spellnum,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TOP_SPELL_DEFINE);
2006-12-19 22:56:18 +00:00
return (0);
}
2006-12-19 22:56:18 +00:00
if (GET_POS(ch) < SINFO.min_position) {
switch (GET_POS(ch)) {
case POS_SLEEPING:
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
send_to_char(ch, "You dream about great magical powers.\r\n");
break;
case POS_RESTING:
send_to_char(ch, "You cannot concentrate while resting.\r\n");
break;
case POS_SITTING:
send_to_char(ch, "You can't do this sitting!\r\n");
break;
case POS_FIGHTING:
send_to_char(ch, "Impossible! You can't concentrate enough!\r\n");
break;
default:
send_to_char(ch, "You can't do much of anything like this!\r\n");
break;
2006-12-19 22:56:18 +00:00
}
return (0);
}
if (AFF_FLAGGED(ch, AFF_CHARM) && (ch->master == tch)) {
send_to_char(ch, "You are afraid you might hurt your master!\r\n");
return (0);
}
if ((tch != ch) && IS_SET(SINFO.targets, TAR_SELF_ONLY)) {
send_to_char(ch, "You can only cast this spell upon yourself!\r\n");
return (0);
}
if ((tch == ch) && IS_SET(SINFO.targets, TAR_NOT_SELF)) {
send_to_char(ch, "You cannot cast this spell upon yourself!\r\n");
return (0);
}
if (IS_SET(SINFO.routines, MAG_GROUPS) && !GROUP(ch)) {
2006-12-19 22:56:18 +00:00
send_to_char(ch, "You can't cast this spell if you're not in a group!\r\n");
return (0);
}
send_to_char(ch, "%s", CONFIG_OK);
say_spell(ch, spellnum, tch, tobj);
return (call_magic(ch, tch, tobj, spellnum, GET_LEVEL(ch), CAST_SPELL));
}
/* do_cast is the entry point for PC-casted spells. It parses the arguments,
2006-12-19 22:56:18 +00:00
* determines the spell number and finds a target, throws the die to see if
* the spell can be cast, checks for sufficient mana and subtracts it, and
* passes control to cast_spell(). */
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
ACMD(do_cast) {
2006-12-19 22:56:18 +00:00
struct char_data *tch = NULL;
struct obj_data *tobj = NULL;
char *s, *t;
int number, mana, spellnum, i, target = 0;
2006-12-19 22:56:18 +00:00
if (IS_NPC(ch))
return;
/* get: blank, spell name, target name */
s = strtok(argument, "'");
if (s == NULL) {
send_to_char(ch, "Cast what where?\r\n");
return;
}
s = strtok(NULL, "'");
if (s == NULL) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
send_to_char(ch,
"Spell names must be enclosed in the Holy Magic Symbols: '\r\n");
2006-12-19 22:56:18 +00:00
return;
}
t = strtok(NULL, "\0");
2010-11-06 15:47:38 +00:00
skip_spaces(&s);
2006-12-19 22:56:18 +00:00
/* spellnum = search_block(s, spells, 0); */
spellnum = find_skill_num(s);
2010-11-06 15:47:38 +00:00
if ((spellnum < 1) || (spellnum > MAX_SPELLS) || !*s) {
2006-12-19 22:56:18 +00:00
send_to_char(ch, "Cast what?!?\r\n");
return;
}
if (GET_LEVEL(ch) < SINFO.min_level[(int) GET_CLASS(ch)]) {
send_to_char(ch, "You do not know that spell!\r\n");
return;
}
if (GET_SKILL(ch, spellnum) == 0) {
send_to_char(ch, "You are unfamiliar with that spell.\r\n");
return;
}
/* Find the target */
if (t != NULL) {
char arg[MAX_INPUT_LENGTH];
strlcpy(arg, t, sizeof(arg));
one_argument(arg, t);
skip_spaces(&t);
/* Copy target to global cast_arg2, for use in spells like locate object */
strcpy(cast_arg2, t);
2006-12-19 22:56:18 +00:00
}
if (IS_SET(SINFO.targets, TAR_IGNORE)) {
target = TRUE;
} else if (t != NULL && *t) {
number = get_number(&t);
2006-12-19 22:56:18 +00:00
if (!target && (IS_SET(SINFO.targets, TAR_CHAR_ROOM))) {
if ((tch = get_char_vis(ch, t, &number, FIND_CHAR_ROOM)) != NULL)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
target = TRUE;
2006-12-19 22:56:18 +00:00
}
if (!target && IS_SET(SINFO.targets, TAR_CHAR_WORLD))
if ((tch = get_char_vis(ch, t, &number, FIND_CHAR_WORLD)) != NULL)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
target = TRUE;
2006-12-19 22:56:18 +00:00
if (!target && IS_SET(SINFO.targets, TAR_OBJ_INV))
if ((tobj = get_obj_in_list_vis(ch, t, &number, ch->carrying)) != NULL)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
target = TRUE;
2006-12-19 22:56:18 +00:00
if (!target && IS_SET(SINFO.targets, TAR_OBJ_EQUIP)) {
for (i = 0; !target && i < NUM_WEARS; i++)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if (GET_EQ(ch, i) && isname(t, GET_EQ(ch, i)->name)) {
tobj = GET_EQ(ch, i);
target = TRUE;
}
2006-12-19 22:56:18 +00:00
}
if (!target && IS_SET(SINFO.targets, TAR_OBJ_ROOM))
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if ((tobj = get_obj_in_list_vis(ch, t, &number,
world[IN_ROOM(ch)].contents)) != NULL)
target = TRUE;
2006-12-19 22:56:18 +00:00
if (!target && IS_SET(SINFO.targets, TAR_OBJ_WORLD))
if ((tobj = get_obj_vis(ch, t, &number)) != NULL)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
target = TRUE;
2006-12-19 22:56:18 +00:00
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
} else { /* if target string is empty */
2006-12-19 22:56:18 +00:00
if (!target && IS_SET(SINFO.targets, TAR_FIGHT_SELF))
if (FIGHTING(ch) != NULL) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
tch = ch;
target = TRUE;
2006-12-19 22:56:18 +00:00
}
if (!target && IS_SET(SINFO.targets, TAR_FIGHT_VICT))
if (FIGHTING(ch) != NULL) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
tch = FIGHTING(ch);
target = TRUE;
2006-12-19 22:56:18 +00:00
}
/* if no target specified, and the spell isn't violent, default to self */
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
if (!target && IS_SET(SINFO.targets, TAR_CHAR_ROOM) && !SINFO.violent) {
2006-12-19 22:56:18 +00:00
tch = ch;
target = TRUE;
}
if (!target) {
send_to_char(ch, "Upon %s should the spell be cast?\r\n",
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
IS_SET(SINFO.targets, TAR_OBJ_ROOM | TAR_OBJ_INV | TAR_OBJ_WORLD | TAR_OBJ_EQUIP) ?
"what" : "who");
2006-12-19 22:56:18 +00:00
return;
}
}
if (target && (tch == ch) && SINFO.violent) {
send_to_char(ch, "You shouldn't cast that on yourself -- could be bad for your health!\r\n");
return;
}
if (!target) {
send_to_char(ch, "Cannot find the target of your spell!\r\n");
return;
}
mana = mag_manacost(ch, spellnum);
if ((mana > 0) && (GET_MANA(ch) < mana) && (GET_LEVEL(ch) < LVL_IMMORT)) {
2006-12-19 22:56:18 +00:00
send_to_char(ch, "You haven't the energy to cast that spell!\r\n");
return;
}
/* You throws the dice and you takes your chances.. 101% is total failure */
if (rand_number(0, 101) > GET_SKILL(ch, spellnum)) {
WAIT_STATE(ch, PULSE_VIOLENCE);
if (!tch || !skill_message(0, ch, tch, spellnum))
send_to_char(ch, "You lost your concentration!\r\n");
if (mana > 0)
GET_MANA(ch) = MAX(0, MIN(GET_MAX_MANA(ch), GET_MANA(ch) - (mana / 2)));
if (SINFO.violent && tch && IS_NPC(tch))
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
hit(tch, ch, TYPE_UNDEFINED);
2006-12-19 22:56:18 +00:00
} else { /* cast spell returns 1 on success; subtract mana & set waitstate */
if (cast_spell(ch, tch, tobj, spellnum)) {
WAIT_STATE(ch, PULSE_VIOLENCE);
if (mana > 0)
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
GET_MANA(ch) = MAX(0, MIN(GET_MAX_MANA(ch), GET_MANA(ch) - mana));
2006-12-19 22:56:18 +00:00
}
}
}
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
void spell_level(int spell, int chclass, int level) {
2006-12-19 22:56:18 +00:00
int bad = 0;
if (spell < 0 || spell > TOP_SPELL_DEFINE) {
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
log("SYSERR: attempting assign to illegal spellnum %d/%d", spell,
TOP_SPELL_DEFINE);
2006-12-19 22:56:18 +00:00
return;
}
if (chclass < 0 || chclass >= NUM_CLASSES) {
log("SYSERR: assigning '%s' to illegal class %d/%d.", skill_name(spell),
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
chclass, NUM_CLASSES - 1);
2006-12-19 22:56:18 +00:00
bad = 1;
}
if (level < 1 || level > LVL_IMPL) {
2006-12-19 22:56:18 +00:00
log("SYSERR: assigning '%s' to illegal level %d/%d.", skill_name(spell),
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
level, LVL_IMPL);
2006-12-19 22:56:18 +00:00
bad = 1;
}
if (!bad)
2006-12-19 22:56:18 +00:00
spell_info[spell].min_level[chclass] = level;
}
/* Assign the spells on boot up */
jeremyosborne | 2008-04-04 02:36:38 +0200 (Fri, 04 Apr 2008) | 1 line Minor Bugfix: All game configuration settings now reference the world config structure, not the individual config variables found in config.c. ------------------------------------------------------------------------ rumble | 2008-03-22 13:27:00 +0100 (Sat, 22 Mar 2008) | 1 line Added lib/world/qst/ directory, index, index.mini, and 0.qst. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:27:51 +0100 (Sat, 08 Mar 2008) | 3 lines Bugfix: the include directory (for .h files) is now referenced correctly in the depend statement. Deletion: listrent.c removed as a separate utility. ------------------------------------------------------------------------ jeremyosborne | 2008-03-08 03:08:51 +0100 (Sat, 08 Mar 2008) | 1 line Enhancement: utils/ Makefile will now use a depends file, and looks for dependen cies in the ../ directory (shrinks the necessary information to make each utilit y). ------------------------------------------------------------------------ Rumble | 2008-03-06 23:39:35 +0100 (Thu, 06 Mar 2008) | 1 line Made TBA specific changes. do_cheat, removed help level checking, and advance to level 32. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:37:12 +0100 (Thu, 06 Mar 2008) | 1 line Minor Update: Changed header of Makefile.in to read 'tbaMUD' and also added in a ttribution for the changes. (Thanks seqwith.) ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 18:31:07 +0100 (Thu, 06 Mar 2008) | 4 lines Changed Makefile.in to use glob expressions when building the objects. This translates into no longer a need to update Makefile.in whenever a new .c file is added to the mud code. Other Makefile.* have not yet been changed (and need review, anyway). All CXREF cruft left in Makefile.in has been removed. tbaMUD is now using Doxygen. Technically, CXREF provides a bit more auto-documentation than Doxygen does, however the tbaMUD (and legacy circle code) has never been marked-up with the special CXREF codes required to effectively use the program. Since Doxygen is easier to use, and provides almost as much functionality as CXREF, CXREF support has been dropped. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:31:02 +0100 (Thu, 06 Mar 2008) | 1 line Bug Fix: asciiflag_conv* functions now can handle a negative numeric value. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:16:06 +0100 (Thu, 06 Mar 2008) | 1 line Bug fix/enhancement: Charmed mobs (specifically charmed mobs with a ->master) will no longer attempt to wander off. ------------------------------------------------------------------------ jeremyosborne | 2008-03-06 08:13:38 +0100 (Thu, 06 Mar 2008) | 6 lines Based on the compiler warning about mag_materials being an unused function, and the clone spell being unused. Bug fix: Clone can now be cast. It is an 'ignore' target spell. Fix and Modification: Clone, being an effectively unused spell that is only used by mortal Magic Users at level 30, is now implemented as very simple example of how to use mag_materials(). The item required by mag_materials is vnum 161, which in stock tbaMUD is some sacrificial entrails. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:43:09 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix for "Did you mean:" including DG commands. ------------------------------------------------------------------------ jeremyosborne | 2008-03-05 01:29:18 +0100 (Wed, 05 Mar 2008) | 3 lines Bug Fix: do_simple_move slightly rewritten to handle Leave triggers that purge a door. Documentation: do_simple_move documented. ------------------------------------------------------------------------ Laoris | 2008-03-01 08:22:12 +0100 (Sat, 01 Mar 2008) | 1 line Trial run of columnizer function on commands list to see how people like it. ------------------------------------------------------------------------ jeremyosborne | 2008-02-26 22:36:17 +0100 (Tue, 26 Feb 2008) | 1 line asciimap, an in game automap, along with a couple of minor bug fixes to do with the automap, patched in (Thanks Jamdog). ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:08:05 +0100 (Fri, 22 Feb 2008) | 1 line Minor update: Relocate local variable declaration to the top of ACMD(do_help) ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 04:04:37 +0100 (Fri, 22 Feb 2008) | 6 lines Checked in the following placeholders for do_gen_tog: #define SCMD_AUTOLOOT 24 #define SCMD_AUTOGOLD 25 #define SCMD_AUTOSPLIT 26 #define SCMD_AUTOSAC 27 #define SCMD_AUTOASSIST 28 ------------------------------------------------------------------------ jeremyosborne | 2008-02-22 03:57:06 +0100 (Fri, 22 Feb 2008) | 1 line The Autoquest patch, along with a couple of minor bug fixes, has been integrated into tbaMUD. (Thanks Jamdog, Kenneth Ray and Morgaelin.) ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 21:46:45 +0100 (Mon, 18 Feb 2008) | 2 lines Minor Fix: Casted NOWHERE, NOTHING, NOBODY and NOFLAG as IDXTYPE for the signed short int index types. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 03:36:16 +0100 (Mon, 18 Feb 2008) | 7 lines Added a new atoidx() conversion function for dealing with string to IDXTYPE conversions (in utils.c, prototype exported through utils.h). Added IDXTYPE_MIN and IDXTYPE_MAX defines (in structs.h). Replaced atoi references with atoidx in do_oasis_zedit (in zedit.c). ------------------------------------------------------------------------ Rumble | 2008-02-18 01:44:13 +0100 (Mon, 18 Feb 2008) | 1 line Fixed direction mapping to give readable directions instead of sub commands. ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:26:15 +0100 (Mon, 18 Feb 2008) | 5 lines Since general olc editing are automatically saved to disk, 'shutdown reboot' has been changed to not-autosave by default. (Small change made to do_shutdown in act.wizard.c). ------------------------------------------------------------------------ jeremyosborne | 2008-02-18 00:12:12 +0100 (Mon, 18 Feb 2008) | 3 lines Changed: struct attack_hit_type moved to fight.h attack_hit_text exported through fight.h ------------------------------------------------------------------------ jeremyosborne | 2008-02-17 22:32:51 +0100 (Sun, 17 Feb 2008) | 7 lines - do_file heads or tails files correctly and has also been enhanced to return file info (act.wizard.c) - defines made for common log files created by autorun, and those used by do_file (db.h) - utility functions added: file_head(), file_tail(), file_sizeof(), and file_numlines() (defined utils.c and exported through utils.h) ------------------------------------------------------------------------ Rumble | 2008-02-16 23:24:05 +0100 (Sat, 16 Feb 2008) | 1 line Fixed export command. (thanks Kyle) ------------------------------------------------------------------------ jeremyosborne | 2008-02-16 22:42:46 +0100 (Sat, 16 Feb 2008) | 1 line Files are now tagged as executable. Should be able to be checked out from subver sion and executed without running chmod. ------------------------------------------------------------------------ Rumble | 2008-02-15 17:03:06 +0100 (Fri, 15 Feb 2008) | 1 line Fixed strcat() writing out of bounds in cedit.c since strdup() only malloc() strlen(str)+1 bytes. (thanks Buggo) and moved attack_hit_text back. ------------------------------------------------------------------------ jeremyosborne | 2008-02-13 20:41:02 +0100 (Wed, 13 Feb 2008) | 1 line Event queue function definitions, global variables and defines doxygenated. ------------------------------------------------------------------------ Rumble | 2008-02-12 00:23:38 +0100 (Tue, 12 Feb 2008) | 1 line Updated levels command to use an arg/range and added color parsing to greetings. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-11 21:06:10 +0100 (Mon, 11 Feb 2008) | 1 line Doxygen comments completed for weather.c ------------------------------------------------------------------------ Rumble | 2008-02-11 03:52:50 +0100 (Mon, 11 Feb 2008) | 1 line Corrected several 64-bit warnings. (thanks Buggo) ------------------------------------------------------------------------ Rumble | 2008-02-10 22:56:56 +0100 (Sun, 10 Feb 2008) | 1 line Added get_flag_by_name allowing for new trigedit variable checks like %actor.pref(FLAG)% checks. (thanks Jamdog) ------------------------------------------------------------------------ jeremyosborne | 2008-02-08 21:22:26 +0100 (Fri, 08 Feb 2008) | 3 lines COMPLETE: tbaMUD code re-org of global and local scope function and variable declarations. There may be a few things that I did not catch (some non extern keyword declarations of function prototypes within other functions, for example). BUG FIX: Unused functions encrypt_hex() and decrypt_hex() removed from mail.c. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 23:31:09 +0100 (Tue, 05 Feb 2008) | 2 lines Continued clean-up of 'extern' references to functions and variables. BUG UNCOVERED: set_title() in class.c incorrectly handles the const nature of the char * returned from title_female and title_male. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 19:38:17 +0100 (Tue, 05 Feb 2008) | 3 lines More work on mud clean-up. New file: spec_procs.h Created this file to house the legacy special procedures (spec_procs.c and castle.c) and special feature assignment in general. ------------------------------------------------------------------------ jeremyosborne | 2008-02-05 00:59:44 +0100 (Tue, 05 Feb 2008) | 3 lines - Minor Bugfix: Fixed parse error in mobact.c - Minor Bugfix: act.h is now included in all of the act functions. Forgot to do that the first time :( - Additions: ban.h has been added as the external entry point into the ban.c globals and functions. Files needing ban.h have been updated. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 20:02:11 +0100 (Mon, 04 Feb 2008) | 1 line All act*.c functions, defines and globals have been prototyped/declared in act.h. The file act.h does not contain every ACMD, only those ACMDs and utility functions available within the act*.c files. ------------------------------------------------------------------------ Rumble | 2008-02-04 17:59:47 +0100 (Mon, 04 Feb 2008) | 1 line Fixed the last few flags missed for the 128 bit conversion. ------------------------------------------------------------------------ Laoris | 2008-02-04 07:27:56 +0100 (Mon, 04 Feb 2008) | 3 lines Adding a column formatter for lists. Accepts printf-like arguments. Only used by medit right now. ------------------------------------------------------------------------ jeremyosborne | 2008-02-04 07:09:19 +0100 (Mon, 04 Feb 2008) | 2 lines - Changed the 'struct queue' to 'struct dg_queue' to avoid namespace conflicts. - Ongoing cleanup to mud project. ------------------------------------------------------------------------ Rumble | 2008-02-04 00:07:09 +0100 (Mon, 04 Feb 2008) | 1 line Fixed run_autowiz which ran twice on advancement. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 03:46:22 +0100 (Sun, 03 Feb 2008) | 1 line act.h created and added. This header will be the external entry point for the functions, function subcommands and variables within the act*.c files. It is not designed to be the entry point for all ACMD functions. ------------------------------------------------------------------------ jeremyosborne | 2008-02-03 02:44:29 +0100 (Sun, 03 Feb 2008) | 1 line Merge of another part of the code cleanup, the dg script stuff. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 08:56:03 +0100 (Sat, 02 Feb 2008) | 1 line Modularizing and organizing files continues. Committing comm.c and comm.h because they are hairy, and I don't want to do them over if my hard drive crashes. ------------------------------------------------------------------------ jeremyosborne | 2008-02-02 07:05:08 +0100 (Sat, 02 Feb 2008) | 4 lines - Marking all file scope functions as 'static' - Reorganization of the global variables and functions. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 10:20:47 +0100 (Thu, 31 Jan 2008) | 1 line * Protected the conf.h.* system config files from multiple calls. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:56:18 +0100 (Thu, 31 Jan 2008) | 1 line * Removed extraneous references to TRUE / FALSE and YES / NO defines. ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 09:46:20 +0100 (Thu, 31 Jan 2008) | 2 lines * BUGFIX: NUM_POSITIONS set to 8 (was incorrectly set to 15 before) * Migrated NUM_* settings from oasis.h to more appropriate locations near where they are defined. (For Example: NUM_POSITIONS moved to structs.h next to the POSITION_* defines.) ------------------------------------------------------------------------ jeremyosborne | 2008-01-31 03:58:28 +0100 (Thu, 31 Jan 2008) | 1 line Added Appendix A - Coder Support. Right now, it simply speaks to the fact that we have included doxygen config files, are working to document the source code, and provides a rudimentary "do this" guide to create the doxygen cross references. ------------------------------------------------------------------------ jeremyosborne | 2008-01-30 07:12:07 +0100 (Wed, 30 Jan 2008) | 2 lines - All .h files now have doxygen recognized headers, and the format is slightly altered to ease editing of headers. - Protected all .h files from multiple calls. (Standard format is #ifndef _HEADE R_H_ #define _HEADER_H_ .... #endif) ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 11:18:14 +0100 (Tue, 29 Jan 2008) | 1 line constants.h, structs.h and utils.h now protected from multiple includes. This is sometimes overkill, but good practice overall. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:38:18 +0100 (Tue, 29 Jan 2008) | 1 line Updated documentation for constants.c and constants.h. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:15:25 +0100 (Tue, 29 Jan 2008) | 3 lines The standard Doxygen configuration doxyfiles (config files) for tbaMUD. One is to be used with the Graphviz DOT (dox_withGraphs), one is designed to be used if Graphviz is not available. Now just need a short document describing the usage of doxygen. ------------------------------------------------------------------------ jeremyosborne | 2008-01-29 10:11:36 +0100 (Tue, 29 Jan 2008) | 1 line Minor document correction in struct dex_app_tpe. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 20:53:51 +0100 (Mon, 28 Jan 2008) | 1 line *bugfix* do_drink command: When a container is empty, the correct, "It is empty." message is now displayed. ------------------------------------------------------------------------ jeremyosborne | 2008-01-28 07:58:15 +0100 (Mon, 28 Jan 2008) | 3 lines Merging changes to trunk for: * utils.h, utils.c and structs.h doxygen comments * adding file dox_withGraphs.doxyfile
2008-04-12 01:31:58 +00:00
static void spello(int spl, const char *name, int max_mana, int min_mana,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
int mana_change, int minpos, int targets, int violent, int routines,
const char *wearoff) {
2006-12-19 22:56:18 +00:00
int i;
for (i = 0; i < NUM_CLASSES; i++)
spell_info[spl].min_level[i] = LVL_IMMORT;
2006-12-19 22:56:18 +00:00
spell_info[spl].mana_max = max_mana;
spell_info[spl].mana_min = min_mana;
spell_info[spl].mana_change = mana_change;
spell_info[spl].min_position = minpos;
spell_info[spl].targets = targets;
spell_info[spl].violent = violent;
spell_info[spl].routines = routines;
spell_info[spl].name = name;
spell_info[spl].wear_off_msg = wearoff;
}
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
void unused_spell(int spl) {
2006-12-19 22:56:18 +00:00
int i;
for (i = 0; i < NUM_CLASSES; i++)
spell_info[spl].min_level[i] = LVL_IMPL + 1;
2006-12-19 22:56:18 +00:00
spell_info[spl].mana_max = 0;
spell_info[spl].mana_min = 0;
spell_info[spl].mana_change = 0;
spell_info[spl].min_position = 0;
spell_info[spl].targets = 0;
spell_info[spl].violent = 0;
spell_info[spl].routines = 0;
spell_info[spl].name = unused_spellname;
}
#define skillo(skill, name) spello(skill, name, 0, 0, 0, 0, 0, 0, 0, NULL);
/* Arguments for spello calls:
2006-12-19 22:56:18 +00:00
* spellnum, maxmana, minmana, manachng, minpos, targets, violent?, routines.
* spellnum: Number of the spell. Usually the symbolic name as defined in
* spells.h (such as SPELL_HEAL).
2006-12-19 22:56:18 +00:00
* spellname: The name of the spell.
* maxmana : The maximum mana this spell will take (i.e., the mana it
* will take when the player first gets the spell).
2006-12-19 22:56:18 +00:00
* minmana : The minimum mana this spell will take, no matter how high
* level the caster is.
2006-12-19 22:56:18 +00:00
* manachng: The change in mana for the spell from level to level. This
* number should be positive, but represents the reduction in mana cost as
* the caster's level increases.
2006-12-19 22:56:18 +00:00
* minpos : Minimum position the caster must be in for the spell to work
* (usually fighting or standing). targets : A "list" of the valid targets
* for the spell, joined with bitwise OR ('|').
2006-12-19 22:56:18 +00:00
* violent : TRUE or FALSE, depending on if this is considered a violent
* spell and should not be cast in PEACEFUL rooms or on yourself. Should be
* set on any spell that inflicts damage, is considered aggressive (i.e.
* charm, curse), or is otherwise nasty.
2006-12-19 22:56:18 +00:00
* routines: A list of magic routines which are associated with this spell
* if the spell uses spell templates. Also joined with bitwise OR ('|').
2010-11-06 15:47:38 +00:00
* See the documentation for a more detailed description of these fields. You
* only need a spello() call to define a new spell; to decide who gets to use
* a spell or skill, look in class.c. -JE */
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
void mag_assign_spells(void) {
2006-12-19 22:56:18 +00:00
int i;
/* Do not change the loop below. */
for (i = 0; i <= TOP_SPELL_DEFINE; i++)
unused_spell(i);
/* Do not change the loop above. */
spello(SPELL_ANIMATE_DEAD, "animate dead", 35, 10, 3, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_OBJ_ROOM, FALSE, MAG_SUMMONS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_ARMOR, "armor", 30, 15, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "You feel less protected.");
2006-12-19 22:56:18 +00:00
spello(SPELL_BLESS, "bless", 35, 5, 3, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS,
"You feel less righteous.");
2006-12-19 22:56:18 +00:00
spello(SPELL_BLINDNESS, "blindness", 35, 25, 1, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_NOT_SELF, FALSE, MAG_AFFECTS,
"You feel a cloak of blindness dissolve.");
2006-12-19 22:56:18 +00:00
spello(SPELL_BURNING_HANDS, "burning hands", 30, 10, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CALL_LIGHTNING, "call lightning", 40, 25, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CHARM, "charm person", 75, 50, 2, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_MANUAL,
"You feel more self-confident.");
2006-12-19 22:56:18 +00:00
spello(SPELL_CHILL_TOUCH, "chill touch", 30, 10, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_AFFECTS,
"You feel your strength return.");
2006-12-19 22:56:18 +00:00
spello(SPELL_CLONE, "clone", 80, 65, 5, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, FALSE, MAG_SUMMONS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_COLOR_SPRAY, "color spray", 30, 15, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CONTROL_WEATHER, "control weather", 75, 25, 5, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CREATE_FOOD, "create food", 30, 5, 4, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, FALSE, MAG_CREATIONS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CREATE_WATER, "create water", 30, 5, 4, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CURE_BLIND, "cure blind", 30, 5, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_UNAFFECTS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CURE_CRITIC, "cure critic", 30, 10, 2, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_POINTS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CURE_LIGHT, "cure light", 30, 10, 2, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_POINTS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_CURSE, "curse", 80, 50, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV, TRUE, MAG_AFFECTS | MAG_ALTER_OBJS,
"You feel more optimistic.");
2006-12-19 22:56:18 +00:00
spello(SPELL_DARKNESS, "darkness", 30, 5, 4, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, FALSE, MAG_ROOMS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_DETECT_ALIGN, "detect alignment", 20, 10, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS, "You feel less aware.");
2006-12-19 22:56:18 +00:00
spello(SPELL_DETECT_INVIS, "detect invisibility", 20, 10, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
"Your eyes stop tingling.");
2006-12-19 22:56:18 +00:00
spello(SPELL_DETECT_MAGIC, "detect magic", 20, 10, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
"The detect magic wears off.");
2006-12-19 22:56:18 +00:00
spello(SPELL_DETECT_POISON, "detect poison", 15, 5, 1, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL,
"The detect poison wears off.");
2006-12-19 22:56:18 +00:00
spello(SPELL_DISPEL_EVIL, "dispel evil", 40, 25, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_DISPEL_GOOD, "dispel good", 40, 25, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_EARTHQUAKE, "earthquake", 40, 25, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, TRUE, MAG_AREAS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_ENCHANT_WEAPON, "enchant weapon", 150, 100, 10, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_OBJ_INV, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_ENERGY_DRAIN, "energy drain", 40, 25, 1, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_GROUP_ARMOR, "group armor", 50, 30, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, FALSE, MAG_GROUPS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_FIREBALL, "fireball", 40, 30, 2, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
2010-11-06 15:47:38 +00:00
spello(SPELL_FLY, "fly", 40, 20, 2, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "You drift slowly to the ground.");
2010-11-06 15:47:38 +00:00
2006-12-19 22:56:18 +00:00
spello(SPELL_GROUP_HEAL, "group heal", 80, 60, 5, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, FALSE, MAG_GROUPS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_HARM, "harm", 75, 45, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_HEAL, "heal", 60, 40, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_POINTS | MAG_UNAFFECTS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_INFRAVISION, "infravision", 25, 10, 1, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
"Your night vision seems to fade.");
2006-12-19 22:56:18 +00:00
spello(SPELL_INVISIBLE, "invisibility", 35, 25, 1, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE,
MAG_AFFECTS | MAG_ALTER_OBJS, "You feel yourself exposed.");
2006-12-19 22:56:18 +00:00
spello(SPELL_LIGHTNING_BOLT, "lightning bolt", 30, 15, 1, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_LOCATE_OBJECT, "locate object", 25, 20, 1, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_OBJ_WORLD, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_MAGIC_MISSILE, "magic missile", 25, 10, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_POISON, "poison", 50, 20, 3, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_NOT_SELF | TAR_OBJ_INV, TRUE,
MAG_AFFECTS | MAG_ALTER_OBJS, "You feel less sick.");
2006-12-19 22:56:18 +00:00
spello(SPELL_PROT_FROM_EVIL, "protection from evil", 40, 10, 3, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
"You feel less protected.");
2006-12-19 22:56:18 +00:00
spello(SPELL_REMOVE_CURSE, "remove curse", 45, 25, 5, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE,
MAG_UNAFFECTS | MAG_ALTER_OBJS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_REMOVE_POISON, "remove poison", 40, 8, 4, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE,
MAG_UNAFFECTS | MAG_ALTER_OBJS, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_SANCTUARY, "sanctuary", 110, 85, 5, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "The white aura around your body fades.");
2006-12-19 22:56:18 +00:00
spello(SPELL_SENSE_LIFE, "sense life", 20, 10, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
"You feel less aware of your surroundings.");
2006-12-19 22:56:18 +00:00
spello(SPELL_SHOCKING_GRASP, "shocking grasp", 30, 15, 3, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_SLEEP, "sleep", 40, 25, 5, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, TRUE, MAG_AFFECTS, "You feel less tired.");
2006-12-19 22:56:18 +00:00
spello(SPELL_STRENGTH, "strength", 35, 30, 1, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "You feel weaker.");
2006-12-19 22:56:18 +00:00
spello(SPELL_SUMMON, "summon", 75, 50, 3, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_TELEPORT, "teleport", 75, 50, 3, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_WATERWALK, "waterwalk", 40, 20, 2, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "Your feet seem less buoyant.");
2006-12-19 22:56:18 +00:00
spello(SPELL_WORD_OF_RECALL, "word of recall", 20, 10, 2, POS_FIGHTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
spello(SPELL_IDENTIFY, "identify", 50, 25, 5, POS_STANDING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
/* NON-castable spells should appear below here. */
spello(SPELL_IDENTIFY, "identify", 0, 0, 0, 0,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, NULL);
2006-12-19 22:56:18 +00:00
/* you might want to name this one something more fitting to your theme -Welcor*/
spello(SPELL_DG_AFFECT, "Script-inflicted", 0, 0, 0, POS_SITTING,
Gcc 9.2.1 warnings (#87) * Make sure all followers are free'd before freeing the character list Otherwise, the followers structs will point to free'd memory and the stop_follower call will attempt to dereference a free'd characters' followers list. * fix gcc warning: truncation in strncat In file included from /usr/include/string.h:494, from sysdep.h:74, from act.item.c:12: In function ‘strncat’, inlined from ‘name_from_drinkcon’ at act.item.c:804:5, inlined from ‘name_from_drinkcon’ at act.item.c:769:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ act.item.c: In function ‘name_from_drinkcon’: act.item.c:797:16: note: length computed here 797 | cpylen = strlen(cur_name); | ^~~~~~~~~~~~~~~~ * Whitespace cleanup before bugfix * Fix warnings for gcc-9.2.1 Also, fixed an ancient FIXME and a known bad strcat usage. spell_parser.c: In function ‘say_spell’: spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=] 135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.", | ^~ In file included from /usr/include/stdio.h:867, from sysdep.h:69, from spell_parser.c:12: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 13:33:59 +01:00
TAR_IGNORE, TRUE, 0, NULL);
2006-12-19 22:56:18 +00:00
/* Declaration of skills - this actually doesn't do anything except set it up
2010-11-06 15:47:38 +00:00
* so that immortals can use these skills by default. The min level to use
* the skill for other classes is set up in class.c. */
2006-12-19 22:56:18 +00:00
skillo(SKILL_BACKSTAB, "backstab");
skillo(SKILL_BASH, "bash");
skillo(SKILL_HIDE, "hide");
skillo(SKILL_KICK, "kick");
skillo(SKILL_PICK_LOCK, "pick lock");
skillo(SKILL_RESCUE, "rescue");
skillo(SKILL_SNEAK, "sneak");
skillo(SKILL_STEAL, "steal");
skillo(SKILL_TRACK, "track");
skillo(SKILL_WHIRLWIND, "whirlwind");
skillo(SKILL_BANDAGE, "bandage");
2006-12-19 22:56:18 +00:00
}