… | |
… | |
58 | |
58 | |
59 | sprintf (buf, "Set debug level to %d.", i); |
59 | sprintf (buf, "Set debug level to %d.", i); |
60 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
60 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
61 | return 1; |
61 | return 1; |
62 | } |
62 | } |
63 | |
|
|
64 | |
63 | |
65 | /* |
64 | /* |
66 | * Those dumps should be just one dump with good parser |
65 | * Those dumps should be just one dump with good parser |
67 | */ |
66 | */ |
68 | |
67 | |
… | |
… | |
210 | " Wis %2d\n" |
209 | " Wis %2d\n" |
211 | " Cha %2d\n" |
210 | " Cha %2d\n" |
212 | " Pow %2d\n" |
211 | " Pow %2d\n" |
213 | " wc %d damage %d ac %d\n", |
212 | " wc %d damage %d ac %d\n", |
214 | &ob->name, |
213 | &ob->name, |
215 | &ob->name, |
214 | ob->level, |
216 | ob->stats.hp, ob->stats.maxhp, ob->stats.sp, ob->stats.maxsp, |
215 | ob->stats.hp, ob->stats.maxhp, ob->stats.sp, ob->stats.maxsp, |
217 | ob->stats.Str, |
216 | ob->stats.Str, |
218 | ob->stats.Dex, |
217 | ob->stats.Dex, |
219 | ob->stats.Con, |
218 | ob->stats.Con, |
220 | ob->stats.Int, |
219 | ob->stats.Int, |
… | |
… | |
266 | op->contr->infobox (MSG_CHANNEL ("resistances"), msg); |
265 | op->contr->infobox (MSG_CHANNEL ("resistances"), msg); |
267 | |
266 | |
268 | return 0; |
267 | return 0; |
269 | } |
268 | } |
270 | |
269 | |
271 | /* |
|
|
272 | * Actual commands. |
|
|
273 | * Those should be in small separate files (c_object.c, c_wiz.c, cmove.c,...) |
|
|
274 | */ |
|
|
275 | |
|
|
276 | int |
|
|
277 | onoff_value (const char *line) |
|
|
278 | { |
|
|
279 | int i; |
|
|
280 | |
|
|
281 | if (sscanf (line, "%d", &i)) |
|
|
282 | return (i != 0); |
|
|
283 | switch (line[0]) |
|
|
284 | { |
|
|
285 | case 'o': |
|
|
286 | switch (line[1]) |
|
|
287 | { |
|
|
288 | case 'n': |
|
|
289 | return 1; /* on */ |
|
|
290 | default: |
|
|
291 | return 0; /* o[ff] */ |
|
|
292 | } |
|
|
293 | case 'y': /* y[es] */ |
|
|
294 | case 'k': /* k[ylla] */ |
|
|
295 | case 's': |
|
|
296 | case 'd': |
|
|
297 | return 1; |
|
|
298 | case 'n': /* n[o] */ |
|
|
299 | case 'e': /* e[i] */ |
|
|
300 | case 'u': |
|
|
301 | default: |
|
|
302 | return 0; |
|
|
303 | } |
|
|
304 | } |
|
|
305 | |
|
|
306 | int |
270 | int |
307 | command_title (object *op, char *params) |
271 | command_title (object *op, char *params) |
308 | { |
272 | { |
309 | char buf[MAX_BUF]; |
273 | char buf[MAX_BUF]; |
310 | |
274 | |