offering the Amulet on a high altar (checked by caller) ends the game; we don't declare this 'NORETURN' because done() can return (if called with some reasons other than ASCENDED and ESCAPED) */
| 1526 | we don't declare this 'NORETURN' because done() can return (if called |
| 1527 | with some reasons other than ASCENDED and ESCAPED) */ |
| 1528 | staticfn void |
| 1529 | offer_real_amulet(struct obj *otmp, aligntyp altaralign) |
| 1530 | { |
| 1531 | static NEARDATA const char |
| 1532 | cloud_of_smoke[] = "A cloud of %s smoke surrounds you..."; |
| 1533 | |
| 1534 | /* The final Test. Did you win? */ |
| 1535 | if (uamul == otmp) |
| 1536 | Amulet_off(); |
| 1537 | if (carried(otmp)) |
| 1538 | useup(otmp); /* well, it's gone now */ |
| 1539 | else |
| 1540 | useupf(otmp, 1L); |
| 1541 | |
| 1542 | You("offer the Amulet of Yendor to %s...", a_gname()); |
| 1543 | |
| 1544 | if (altaralign == A_NONE) { |
| 1545 | /* Moloch's high altar at the bottom of Gehennom. */ |
| 1546 | if (u.ualign.record > -99) |
| 1547 | u.ualign.record = -99; |
| 1548 | pline("An invisible choir chants, and you are bathed in darkness..."); |
| 1549 | /*[apparently shrug/snarl can be sensed without being seen]*/ |
| 1550 | pline("%s shrugs and retains dominion over %s,", Moloch, u_gname()); |
| 1551 | pline("then mercilessly snuffs out your life."); |
| 1552 | Sprintf(svk.killer.name, "%s indifference", s_suffix(Moloch)); |
| 1553 | svk.killer.format = KILLED_BY; |
| 1554 | done(DIED); |
| 1555 | /* life-saved (or declined to die in wizard/explore mode) */ |
| 1556 | pline("%s snarls and tries again...", Moloch); |
| 1557 | fry_by_god(A_NONE, TRUE); /* wrath of Moloch */ |
| 1558 | /* declined to die in wizard or explore mode */ |
| 1559 | pline(cloud_of_smoke, hcolor(NH_BLACK)); |
| 1560 | done(ESCAPED); |
| 1561 | /*NOTREACHED*/ |
| 1562 | } else if (u.ualign.type != altaralign) { |
| 1563 | /* And the opposing team picks you up and carries you off |
| 1564 | on their shoulders. */ |
| 1565 | adjalign(-99); |
| 1566 | pline("%s accepts your gift, and gains dominion over %s...", |
| 1567 | a_gname(), u_gname()); |
| 1568 | pline("%s is enraged...", u_gname()); |
| 1569 | pline("Fortunately, %s permits you to live...", a_gname()); |
| 1570 | pline(cloud_of_smoke, hcolor(NH_ORANGE)); |
| 1571 | done(ESCAPED); |
| 1572 | /*NOTREACHED*/ |
| 1573 | } else { |
| 1574 | /* You've won the game! Feedback-wise, it's a bit of a let down. */ |
| 1575 | u.uevent.ascended = 1; |
| 1576 | adjalign(10); |
| 1577 | pline("An invisible choir sings, and you are bathed in radiance..."); |
| 1578 | godvoice(altaralign, "Mortal, thou hast done well!"); |
| 1579 | display_nhwindow(WIN_MESSAGE, FALSE); |
| 1580 | SetVoice((struct monst *) 0, 0, 80, voice_deity); |
| 1581 | verbalize( |
| 1582 | "In return for thy service, I grant thee the gift of Immortality!"); |
| 1583 | You("ascend to the status of Demigod%s...", |
| 1584 | flags.female ? "dess" : ""); |
| 1585 | done(ASCENDED); |
no test coverage detected