Go to the documentation of this file.
32 "physical ",
"magic ",
"fire ",
"electricity ",
"cold ",
"confusion ",
"acid ",
33 "drain ",
"weaponmagic ",
"ghosthit ",
"poison ",
"slow ",
"paralyze ",
34 "turn_undead ",
"fear ",
"cancellation ",
"deplete ",
"death ",
"chaos ",
35 "counterspell ",
"godpower ",
"holyword ",
"blind ",
"internal ",
"life_stealing ",
41 "physical",
"magic",
"fire",
"electricity",
"cold",
"confusion",
"acid",
42 "drain",
"weapon magic",
"ghost hit",
"poison",
"slow",
"paralyze",
43 "turn undead",
"fear",
"cancellation",
"deplete",
"death",
"chaos",
44 "counterspell",
"god power",
"holy word",
"blind",
"internal",
"life stealing",
50 "armour",
"resist magic",
"resist fire",
"resist electricity",
"resist cold",
51 "resist confusion",
"resist acid",
"resist drain",
52 "resist weaponmagic",
"resist ghosthit",
"resist poison",
"resist slow",
53 "resist paralyzation",
"resist turn undead",
"resist fear",
54 "resist cancellation",
"resist depletion",
"resist death",
"resist chaos",
55 "resist counterspell",
"resist god power",
"resist holy word",
56 "resist blindness",
"resist internal",
"resist life stealing",
62 "#FF15CD",
"#930C76",
"red",
"blue",
"#2CFFFF", NULL, NULL, NULL, NULL, NULL,
"green", NULL, NULL,
63 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
71 "physical",
"magic",
"fire",
"electricity",
"cold",
"confusion",
"acid",
72 "draining",
"weapon magic",
"ghosts",
"poison",
"slow",
"paralyze",
73 "turn undead",
"fear",
"cancellation",
"depletion",
"death attacks",
"chaos",
74 "counterspell",
"god power",
"holy word",
"blinding attacks",
"internal",
75 "life stealing",
"disease"
143 .log_callback =
nullptr,
148 .localdir = LOCALDIR,
176 .who_wiz_format = { 0 },
181 .meta_server = { 0 },
184 .meta_comment = { 0 },
189 .worldmaptilesizex = 0,
190 .worldmaptilesizey = 0,
192 .emergency_mapname =
nullptr,
196 .item_power_factor = 1.0,
203 .no_player_stealing = 1,
204 .create_home_portals = 0,
205 .personalized_blessings = 1,
206 .pk_max_experience = 5000000,
207 .pk_max_experience_percent = 10,
208 .allow_denied_spells_writing = 0,
209 .allow_broken_converters = 0,
211 .log_timestamp_format =
nullptr,
212 .starting_stat_min = 3,
213 .starting_stat_max = 18,
214 .starting_stat_points = 85,
215 .roll_stat_points = 115,
217 .special_break_map = 1,
218 .disabled_plugins = { },
219 .ignore_plugin_compatibility = 0,
220 .account_block_create = 0,
221 .account_trusted_host =
nullptr,
225 .hooks_filename = {
nullptr },
226 .hooks = {
nullptr },
227 .ignore_assets_errors = 0,
228 .assets_tracker =
nullptr,
229 .fatal_hook =
nullptr,
230 .stat_file =
nullptr,
286 while (fgets(tmpbuf,
MAX_BUF-1, fp)) {
287 if (tmpbuf[0] ==
'#')
291 tmpbuf[strlen(tmpbuf)-1] = 0;
294 }
else if (online == 1) {
296 }
else if (online == 2) {
352 LOG(
llevError,
"Assets errors, please fix and restart.\n");
367 cp = getenv(
"CROSSFIRE_LIBDIR");
370 cp = getenv(
"CROSSFIRE_LOCALDIR");
373 cp = getenv(
"CROSSFIRE_PLAYERDIR");
376 cp = getenv(
"CROSSFIRE_MAPDIR");
379 cp = getenv(
"CROSSFIRE_UNIQUEDIR");
382 cp = getenv(
"CROSSFIRE_TEMPLATEDIR");
385 cp = getenv(
"CROSSFIRE_TMPDIR");
408 setvbuf(
logfile, NULL, _IOLBF, 0);
499 LOG(
llevError,
"Unable to continue without initial map.\n");
504 LOG(
llevError,
"Legacy map must have a 'slaying' field!\n");
509 LOG(
llevError,
"Can not find object of type MAP subtype MAP_TYPE_DEFAULT.\n");
510 LOG(
llevError,
"Are the archetype files up to date? Can not continue.\n");
539 static int has_been_done = 0;
555 if (fscanf(fp,
"%lu", &
todtick) == 1) {
559 LOG(
llevError,
"Couldn't parse todtick, using default value 0\n");
575 int mess = -1,
level;
576 int mode = 0,
total = 0;
580 if (*
buf ==
'#' || *
buf ==
'\0')
589 cp =
buf + strspn(
buf,
" \t");
591 if (strncmp(cp,
"TYPE:", 5) == 0) {
592 p = strtok(
buf,
":");
593 p = strtok(NULL,
":");
609 p = strtok(
buf,
"=");
611 p = strtok(NULL,
"=");
619 }
else if (mode == 2) {
620 p = strtok(
buf,
"=");
622 p = strtok(NULL,
"=");
630 }
else if (mode == 3) {
631 p = strtok(
buf,
"=");
633 p = strtok(NULL,
"=");
static void init_dynamic(void)
#define DEATH_PENALTY_LEVEL
#define SPELL_ENCUMBRANCE
struct Statistics statistics
static void init_emergency_mappath(void)
void LOG(LogLevel logLevel, const char *format,...)
int of_close(OutputFile *of)
FILE * of_open(OutputFile *of, const char *fname)
mapstruct * ready_map_name(const char *name, int flags)
char first_map_path[MAX_BUF]
const char *const spellpathnames[NRSPELLPATHS]
char first_map_ext_path[MAX_BUF]
void init_attackmess(BufferReader *reader, const char *filename)
static void init_clocks(void)
void clear_friendly_list(void)
std::vector< materialtype_t * > materials
AssetsManager * getManager()
#define DEATH_PENALTY_RATIO
void write_todclock(void)
#define ARMOR_SPEED_IMPROVEMENT
static void init_environ(void)
#define SPELLPOINT_LEVEL_DEPEND
sstring add_string(const char *str)
long trying_emergency_save
const char *const change_resist_msg[NROFATTACKS]
#define ARMOR_SPEED_LINEAR
#define ARMOR_WEIGHT_REDUCTION
#define ARMOR_MAX_ENCHANT
const char *const resist_save[NROFATTACKS]
void delete_map(mapstruct *m)
Chaos_Attacks ATTACKS[22]
void fatal(enum fatal_error err)
const char *const resist_plus[NROFATTACKS]
size_t strlcpy(char *dst, const char *src, size_t size)
#define FREE_AND_CLEAR_STR(xyz)
attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]
#define ARMOR_WEIGHT_LINEAR
#define STAT_LOSS_ON_DEATH
std::vector< region * > all_regions
#define SET_FRIENDLY_FIRE
const char *const attacktype_desc[NROFATTACKS]
#define FREE_AND_CLEAR(xyz)
void init_hash_table(void)
const typedef char * sstring
void free_experience(void)
void init_experience(void)
#define RESET_LOCATION_TIME
#define SPELL_FAILURE_EFFECTS
static void init_defaults(void)
#define BALANCED_STAT_LOSS
const char *const resist_color[NROFATTACKS]
#define PERMANENT_EXPERIENCE_RATIO
artifactlist * first_artifactlist
archetype * get_archetype_by_type_subtype(int type, int subtype)
archetype * empty_archetype
void assets_collect(const char *datadir, int what)
#define EMERGENCY_MAPPATH
char * bufferreader_next_line(BufferReader *br)