attributes: intrinsics and the like, other non-obvious capabilities */
| 1484 | |
| 1485 | /* attributes: intrinsics and the like, other non-obvious capabilities */ |
| 1486 | staticfn void |
| 1487 | attributes_enlightenment( |
| 1488 | int unused_mode UNUSED, |
| 1489 | int final) |
| 1490 | { |
| 1491 | static NEARDATA const char |
| 1492 | if_surroundings_permitted[] = " if surroundings permitted"; |
| 1493 | int ltmp, armpro, warnspecies; |
| 1494 | char buf[BUFSZ]; |
| 1495 | |
| 1496 | /*\ |
| 1497 | * Attributes |
| 1498 | \*/ |
| 1499 | enlght_out(""); |
| 1500 | enlght_out(final ? "Final Attributes:" : "Attributes:"); |
| 1501 | |
| 1502 | if (u.uevent.uhand_of_elbereth) { |
| 1503 | static const char *const hofe_titles[3] = { "the Hand of Elbereth", |
| 1504 | "the Envoy of Balance", |
| 1505 | "the Glory of Arioch" }; |
| 1506 | you_are(hofe_titles[u.uevent.uhand_of_elbereth - 1], ""); |
| 1507 | } |
| 1508 | |
| 1509 | Sprintf(buf, "%s", piousness(TRUE, "aligned")); |
| 1510 | if (u.ualign.record >= 0) |
| 1511 | you_are(buf, ""); |
| 1512 | else |
| 1513 | you_have(buf, ""); |
| 1514 | |
| 1515 | if (wizard) { |
| 1516 | Sprintf(buf, " %d", u.ualign.record); |
| 1517 | enl_msg("Your alignment ", "is", "was", buf, ""); |
| 1518 | } |
| 1519 | |
| 1520 | /*** Resistances to troubles ***/ |
| 1521 | if (Invulnerable) |
| 1522 | you_are("invulnerable", from_what(INVULNERABLE)); |
| 1523 | if (Antimagic) |
| 1524 | you_are("magic-protected", from_what(ANTIMAGIC)); |
| 1525 | if (Fire_resistance) |
| 1526 | you_are("fire resistant", from_what(FIRE_RES)); |
| 1527 | item_resistance_message(AD_FIRE, " protected from fire", final); |
| 1528 | if (Cold_resistance) |
| 1529 | you_are("cold resistant", from_what(COLD_RES)); |
| 1530 | item_resistance_message(AD_COLD, " protected from cold", final); |
| 1531 | if (Sleep_resistance) |
| 1532 | you_are("sleep resistant", from_what(SLEEP_RES)); |
| 1533 | if (Disint_resistance) |
| 1534 | you_are("disintegration resistant", from_what(DISINT_RES)); |
| 1535 | item_resistance_message(AD_DISN, " protected from disintegration", final); |
| 1536 | if (Shock_resistance) |
| 1537 | you_are("shock resistant", from_what(SHOCK_RES)); |
| 1538 | item_resistance_message(AD_ELEC, " protected from electric shocks", |
| 1539 | final); |
| 1540 | if (Poison_resistance) |
| 1541 | you_are("poison resistant", from_what(POISON_RES)); |
| 1542 | if (Acid_resistance) { |
| 1543 | Sprintf(buf, "%.20s%.30s", |
no test coverage detected