Hallucinatory rays

When hallucinating, use nonsensical names for the rays
(wands, spells, and breath weapons), and random ray glyphs.

Original code from xNetHack by copperwater <aosdict@gmail.com>,
inspired by a YANI by Kahran042.
This commit is contained in:
Pasi Kallinen
2022-02-16 21:09:20 +02:00
parent f588a707bb
commit 122634ec9e
6 changed files with 94 additions and 26 deletions

View File

@@ -601,8 +601,11 @@ do_improvisation(struct obj* instr)
losehp(damage, buf, KILLED_BY); /* fire or frost damage */
}
} else {
buzz((instr->otyp == FROST_HORN) ? AD_COLD - 1 : AD_FIRE - 1,
rn1(6, 6), u.ux, u.uy, u.dx, u.dy);
int type = (instr->otyp == FROST_HORN) ? AD_COLD - 1 : AD_FIRE - 1;
if (!Blind)
pline("A %s blasts out of the horn!", flash_str(type, FALSE));
buzz(type, rn1(6, 6), u.ux, u.uy, u.dx, u.dy);
}
makeknown(instr->otyp);
break;