MCPcopy Create free account
hub / github.com/NetHack/NetHack / altar_wrath

Function altar_wrath

src/pray.c:2651–2673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2649}
2650
2651void
2652altar_wrath(coordxy x, coordxy y)
2653{
2654 aligntyp altaralign = a_align(x, y);
2655
2656 if (u.ualign.type == altaralign && u.ualign.record > -rn2(4)) {
2657 godvoice(altaralign, "How darest thou desecrate my altar!");
2658 (void) adjattrib(A_WIS, -1, FALSE);
2659 u.ualign.record--;
2660 } else {
2661 pline("%s %s%s:",
2662 !Deaf ? "A voice (could it be"
2663 : "Despite your deafness, you seem to hear",
2664 align_gname(altaralign),
2665 !Deaf ? "?) whispers" : " say");
2666 SetVoice((struct monst *) 0, 0, 80, voice_deity);
2667 verbalize("Thou shalt pay, infidel!");
2668 /* higher luck is more likely to be reduced; as it approaches -5
2669 the chance to lose another point drops down, eventually to 0 */
2670 if (Luck > -5 && rn2(Luck + 6))
2671 change_luck(rn2(20) ? -1 : -2);
2672 }
2673}
2674
2675/* assumes isok() at one space away, but not necessarily at two */
2676staticfn boolean

Callers 5

dositFunction · 0.85
digFunction · 0.85
doengraveFunction · 0.85
vomitFunction · 0.85
kick_nondoorFunction · 0.85

Calls 7

rn2Function · 0.85
godvoiceFunction · 0.85
adjattribFunction · 0.85
align_gnameFunction · 0.85
verbalizeFunction · 0.85
change_luckFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected