From 0843550e3738368de4752c97f5f2e389bc5b23e6 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Fri, 17 Dec 2004 00:56:35 +0000 Subject: [PATCH] coaligned unicorn in bones wrote: >> If the previous character was non-neutral, the unicorn would have >> started off as hostile. When a bones file is loaded, I don't think >> hostiles are made non-hostile, although the reverse is certainly true >> (pets of the deceased are usually hostile). > > In the general case, they are, or rather their hostility is > re-evaluated with respect to the new character; see the peace_minded() > call in getlev(). However, co-aligned unicorns always being created > peaceful is a special case in makemon(), _not_ part of peace_minded(), > so they'd just have the usual chance of being made peaceful or not > depending on alignment strength, as for any other co-aligned monster > not explicitly declared always peaceful or always hostile. --- doc/fixes34.4 | 1 + src/restore.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 504dab9d1..fd999b7fb 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -74,6 +74,7 @@ give blindness feedback when moving into/through stinking cloud fix case on monster name when monster reflects floating eye's gaze monsters "shrieking in pain" from a potion didn't wake anything up Master of Thieves as Tourist Nemesis still had STRAT_CLOSE +co-aligned unicorns in bones could be hostile Platform- and/or Interface-Specific Fixes diff --git a/src/restore.c b/src/restore.c index 0ff54c435..0e913be26 100644 --- a/src/restore.c +++ b/src/restore.c @@ -823,9 +823,14 @@ boolean ghostly; mtmp2 = mtmp->nmon; if (ghostly) { /* reset peaceful/malign relative to new character */ - if(!mtmp->isshk) - /* shopkeepers will reset based on name */ + /* shopkeepers will reset based on name */ + if(!mtmp->isshk) { + if (is_unicorn(mtmp->data) && + sgn(u.ualign.type) == sgn(mtmp->data->maligntyp)) + mtmp->mpeaceful = TRUE; + else mtmp->mpeaceful = peace_minded(mtmp->data); + } set_malign(mtmp); } else if (monstermoves > omoves) mon_catchup_elapsed_time(mtmp, monstermoves - omoves); -- 2.40.0