… | |
… | |
569 | perceive_self (object *op) |
569 | perceive_self (object *op) |
570 | { |
570 | { |
571 | const char *cp = describe_item (op, op); |
571 | const char *cp = describe_item (op, op); |
572 | archetype *at = archetype::find (ARCH_DEPLETION); |
572 | archetype *at = archetype::find (ARCH_DEPLETION); |
573 | |
573 | |
574 | dynbuf_text buf; |
574 | dynbuf_text &buf = msg_dynbuf; buf.clear (); |
575 | |
575 | |
576 | if (player *pl = op->contr) |
576 | if (!op->is_player ()) |
|
|
577 | return 0; |
|
|
578 | |
577 | if (object *race = archetype::find (op->race)) |
579 | if (object *race = archetype::find (op->race)) |
578 | buf << " - You are a G<male|female> " << &race->name << ".\n"; |
580 | buf << " - You are a G<male|female> " << &race->name << ".\n"; |
579 | |
581 | |
580 | if (object *god = find_god (determine_god (op))) |
582 | if (object *god = find_god (determine_god (op))) |
581 | buf << " - You worship " << &god->name << ".\n"; |
583 | buf << " - You worship " << &god->name << ".\n"; |
582 | else |
584 | else |
583 | buf << " - You worship no god.\n"; |
585 | buf << " - You worship no god.\n"; |
… | |
… | |
609 | |
611 | |
610 | break; |
612 | break; |
611 | } |
613 | } |
612 | } |
614 | } |
613 | |
615 | |
614 | buf << '\0'; // zero-terminate |
616 | op->contr->infobox (MSG_CHANNEL ("perceiveself"), buf); |
615 | |
|
|
616 | new_draw_info (NDI_UNIQUE, 0, op, buf.linearise ()); |
|
|
617 | |
617 | |
618 | return 1; |
618 | return 1; |
619 | } |
619 | } |
620 | |
620 | |
621 | /* This creates magic walls. Really, it can create most any object, |
621 | /* This creates magic walls. Really, it can create most any object, |
… | |
… | |
1463 | |
1463 | |
1464 | /* Identifies objects in the players inventory/on the ground */ |
1464 | /* Identifies objects in the players inventory/on the ground */ |
1465 | int |
1465 | int |
1466 | cast_identify (object *op, object *caster, object *spell) |
1466 | cast_identify (object *op, object *caster, object *spell) |
1467 | { |
1467 | { |
1468 | dynbuf_text buf; |
|
|
1469 | object *tmp; |
1468 | object *tmp; |
|
|
1469 | dynbuf_text &buf = msg_dynbuf; buf.clear (); |
1470 | |
1470 | |
1471 | int num_ident = spell->stats.dam + SP_level_dam_adjust (caster, spell); |
1471 | int num_ident = spell->stats.dam + SP_level_dam_adjust (caster, spell); |
1472 | |
1472 | |
1473 | if (num_ident < 1) |
1473 | if (num_ident < 1) |
1474 | num_ident = 1; |
1474 | num_ident = 1; |