1 | /* |
1 | /* |
2 | * CrossFire, A Multiplayer game for X-windows |
2 | * This file is part of Crossfire TRT, the Roguelike Realtime MORPG. |
3 | * |
3 | * |
4 | * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team |
5 | * Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (C) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * This program is free software; you can redistribute it and/or modify |
8 | * Crossfire TRT is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or |
10 | * the Free Software Foundation, either version 3 of the License, or |
11 | * (at your option) any later version. |
11 | * (at your option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the GNU General Public License |
19 | * along with this program; if not, write to the Free Software |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
|
21 | * |
20 | * |
22 | * The authors can be reached via e-mail at <crossfire@schmorp.de> |
21 | * The authors can be reached via e-mail to <crossfire@schmorp.de> |
23 | */ |
22 | */ |
24 | |
23 | |
25 | #include <global.h> |
24 | #include <global.h> |
26 | #include <loader.h> |
25 | #include <loader.h> |
27 | #include <sproto.h> |
26 | #include <sproto.h> |
… | |
… | |
252 | { |
251 | { |
253 | sprintf (buf, "Global debug level is %d.", settings.debug); |
252 | sprintf (buf, "Global debug level is %d.", settings.debug); |
254 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
253 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
255 | return 1; |
254 | return 1; |
256 | } |
255 | } |
257 | settings.debug = (enum LogLevel) FABS (i); |
256 | |
|
|
257 | settings.debug = i; |
|
|
258 | |
258 | sprintf (buf, "Set debug level to %d.", i); |
259 | sprintf (buf, "Set debug level to %d.", i); |
259 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
260 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
260 | return 1; |
261 | return 1; |
261 | } |
262 | } |
262 | |
263 | |
… | |
… | |
334 | new_draw_info_format (NDI_UNIQUE, 0, pl, " Experience: %" PRId64, pl->stats.exp); |
335 | new_draw_info_format (NDI_UNIQUE, 0, pl, " Experience: %" PRId64, pl->stats.exp); |
335 | new_draw_info_format (NDI_UNIQUE, 0, pl, " Next Level: %" PRId64, level_exp (pl->level + 1, pl->expmul)); |
336 | new_draw_info_format (NDI_UNIQUE, 0, pl, " Next Level: %" PRId64, level_exp (pl->level + 1, pl->expmul)); |
336 | new_draw_info (NDI_UNIQUE, 0, pl, "\nStat Nat/Real/Max"); |
337 | new_draw_info (NDI_UNIQUE, 0, pl, "\nStat Nat/Real/Max"); |
337 | |
338 | |
338 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Str %2d/ %3d/%3d", |
339 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Str %2d/ %3d/%3d", |
339 | pl->contr->orig_stats.Str, pl->stats.Str, 20 + pl->arch->clone.stats.Str); |
340 | pl->contr->orig_stats.Str, pl->stats.Str, 20 + pl->arch->stats.Str); |
340 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Dex %2d/ %3d/%3d", |
341 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Dex %2d/ %3d/%3d", |
341 | pl->contr->orig_stats.Dex, pl->stats.Dex, 20 + pl->arch->clone.stats.Dex); |
342 | pl->contr->orig_stats.Dex, pl->stats.Dex, 20 + pl->arch->stats.Dex); |
342 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Con %2d/ %3d/%3d", |
343 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Con %2d/ %3d/%3d", |
343 | pl->contr->orig_stats.Con, pl->stats.Con, 20 + pl->arch->clone.stats.Con); |
344 | pl->contr->orig_stats.Con, pl->stats.Con, 20 + pl->arch->stats.Con); |
344 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Int %2d/ %3d/%3d", |
345 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Int %2d/ %3d/%3d", |
345 | pl->contr->orig_stats.Int, pl->stats.Int, 20 + pl->arch->clone.stats.Int); |
346 | pl->contr->orig_stats.Int, pl->stats.Int, 20 + pl->arch->stats.Int); |
346 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Wis %2d/ %3d/%3d", |
347 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Wis %2d/ %3d/%3d", |
347 | pl->contr->orig_stats.Wis, pl->stats.Wis, 20 + pl->arch->clone.stats.Wis); |
348 | pl->contr->orig_stats.Wis, pl->stats.Wis, 20 + pl->arch->stats.Wis); |
348 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Pow %2d/ %3d/%3d", |
349 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Pow %2d/ %3d/%3d", |
349 | pl->contr->orig_stats.Pow, pl->stats.Pow, 20 + pl->arch->clone.stats.Pow); |
350 | pl->contr->orig_stats.Pow, pl->stats.Pow, 20 + pl->arch->stats.Pow); |
350 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Cha %2d/ %3d/%3d", |
351 | new_draw_info_format (NDI_UNIQUE, 0, pl, "Cha %2d/ %3d/%3d", |
351 | pl->contr->orig_stats.Cha, pl->stats.Cha, 20 + pl->arch->clone.stats.Cha); |
352 | pl->contr->orig_stats.Cha, pl->stats.Cha, 20 + pl->arch->stats.Cha); |
352 | new_draw_info_format (NDI_UNIQUE, 0, pl, "\nAttack Mode: %s", pl->contr->peaceful ? "Peaceful" : "Hostile"); |
353 | new_draw_info_format (NDI_UNIQUE, 0, pl, "\nAttack Mode: %s", pl->contr->peaceful ? "Peaceful" : "Hostile"); |
353 | |
354 | |
354 | /* Can't think of anything else to print right now */ |
355 | /* Can't think of anything else to print right now */ |
355 | return 0; |
356 | return 0; |
356 | } |
357 | } |
… | |
… | |
488 | int attack; |
489 | int attack; |
489 | object *tmp; |
490 | object *tmp; |
490 | |
491 | |
491 | for (tmp = op->inv; tmp != NULL; tmp = tmp->below) |
492 | for (tmp = op->inv; tmp != NULL; tmp = tmp->below) |
492 | { |
493 | { |
493 | if ((tmp->type == FORCE) && (strcmp (tmp->arch->name, "dragon_skin_force") == 0)) |
494 | if ((tmp->type == FORCE) && (strcmp (tmp->arch->archname, "dragon_skin_force") == 0)) |
494 | { |
495 | { |
495 | new_draw_info (NDI_UNIQUE, 0, op, "\nNatural skin resistances:"); |
496 | new_draw_info (NDI_UNIQUE, 0, op, "\nNatural skin resistances:"); |
496 | for (attack = 0; attack < NROFATTACKS; attack++) |
497 | for (attack = 0; attack < NROFATTACKS; attack++) |
497 | { |
498 | { |
498 | if (atnr_is_dragon_enabled (attack)) |
499 | if (atnr_is_dragon_enabled (attack)) |