From 0c9e34832cc95a90cf5807c0ac3c0471b1b0b45f Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Tue, 21 Nov 2023 12:07:13 -0500 Subject: [PATCH] Make HoOA confuse the hero, summon erinyes A helmet psychically reaching inside your head and twiddling knobs in your brain must be a confusing experience. And the instant rejection of your god (not to mention the vow that you made to find the amulet for them), perhaps on the very cusp of their ascendance over the other gods, is sort of the ultimate oathbreaking, so it interests the erinyes. --- include/extern.h | 1 + src/attrib.c | 11 ++++++----- src/makemon.c | 11 +++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/extern.h b/include/extern.h index 17efeecbe..e09f343ae 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1426,6 +1426,7 @@ extern int mbirth_limit(int); extern void mkmonmoney(struct monst *, long) NONNULLARG1; extern int bagotricks(struct obj *, boolean, int *); extern boolean propagate(int, boolean, boolean); +extern void summon_furies(int); /* ### mcastu.c ### */ diff --git a/src/attrib.c b/src/attrib.c index 2bcc6cade..c51db05e8 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -1257,18 +1257,19 @@ uchangealign(int newalign, (u.ualign.type != oldalign) ? "sudden " : ""); } else { /* putting on or taking off a helm of opposite alignment */ + u.ualign.type = (aligntyp) newalign; if (reason == 1) { + Your("mind oscillates %s.", Hallucination ? "wildly" : "briefly"); + make_confused(rn1(2, 3), FALSE); + summon_furies(Is_astralevel(&u.uz) ? 0 : 1); /* don't livelog taking it back off */ livelog_printf(LL_ALIGNMENT, "used a helm to turn %s", aligns[1 - newalign].adj); - } - u.ualign.type = (aligntyp) newalign; - if (reason == 1) - Your("mind oscillates %s.", Hallucination ? "wildly" : "briefly"); - else if (reason == 2) + } else if (reason == 2) { Your("mind is %s.", Hallucination ? "much of a muchness" : "back in sync with your body"); + } } if (u.ualign.type != oldalign) { u.ualign.record = 0; /* slate is wiped clean */ diff --git a/src/makemon.c b/src/makemon.c index b28d03f8d..608e2a3e5 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -2452,4 +2452,15 @@ bagotricks( return moncount; } +/* create some or all remaining erinyes around the player */ +void +summon_furies(int limit) /* number to create, or 0 to create until extinct */ +{ + int i = 0; + while (mk_gen_ok(PM_ERINYS, G_GONE, 0U) && (i < limit || !limit)) { + makemon(&mons[PM_ERINYS], u.ux, u.uy, MM_ADJACENTOK | MM_NOWAIT); + i++; + } +} + /*makemon.c*/