From f4a3ad5b61842b75731de8a8124e4ca73bf0ef85 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 5 Jan 2009 02:31:06 +0000 Subject: Fix Boris sometimes dying with foe == MHITNOT, and thus having no foe to which to address his death speech. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8226 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index c9602632f4..6e4d895468 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1563,7 +1563,18 @@ void monster_die(monsters *monster, killer_type killer, break; } - if (monster->type == MONS_BORIS && !in_transit) + // Make sure Boris has a foe to address + if (monster->foe == MHITNOT) + { + // Hostile monsters outside of the arena always have you as a + // foe. + if (!mons_wont_attack(monster) && !crawl_state.arena) + monster->foe = MHITYOU; + else if (!invalid_monster_index(killer_index)) + monster->foe = killer_index; + } + + if (monster->type == MONS_BORIS && monster->foe != MHITNOT && !in_transit) { // XXX: Actual blood curse effect for Boris? -- bwr -- cgit v1.2.3-54-g00ecf