obj is an object dropped on an altar */
| 360 | |
| 361 | /* obj is an object dropped on an altar */ |
| 362 | void |
| 363 | doaltarobj(struct obj *obj) |
| 364 | { |
| 365 | if (Blind) |
| 366 | return; |
| 367 | |
| 368 | if (obj->oclass != COIN_CLASS) { |
| 369 | /* KMH, conduct */ |
| 370 | if (!svc.context.mon_moving && !u.uconduct.gnostic++) |
| 371 | livelog_printf(LL_CONDUCT, |
| 372 | "eschewed atheism, by dropping %s on an altar", |
| 373 | doname(obj)); |
| 374 | } else { |
| 375 | /* coins don't have bless/curse status */ |
| 376 | obj->blessed = obj->cursed = 0; |
| 377 | } |
| 378 | |
| 379 | if (obj->blessed || obj->cursed) { |
| 380 | There("is %s flash as %s %s the altar.", |
| 381 | an(hcolor(obj->blessed ? NH_AMBER : NH_BLACK)), doname(obj), |
| 382 | otense(obj, "hit")); |
| 383 | if (!Hallucination) |
| 384 | obj->bknown = 1; /* ok to bypass set_bknown() */ |
| 385 | } else { |
| 386 | pline("%s %s on the altar.", Doname2(obj), otense(obj, "land")); |
| 387 | if (obj->oclass != COIN_CLASS) |
| 388 | obj->bknown = 1; /* ok to bypass set_bknown() */ |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | /* If obj is neither formally identified nor informally called something |
| 393 | * already, prompt the player to call its object type. */ |
no test coverage detected