diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-05 02:31:06 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-05 02:31:06 +0000 |
commit | f4a3ad5b61842b75731de8a8124e4ca73bf0ef85 (patch) | |
tree | 6356f148b65cfd703baf7fa470ed518c9e8c99ac | |
parent | cae8554b62a6cedae108919ec0cc57d9694dcfac (diff) | |
download | crawl-ref-f4a3ad5b61842b75731de8a8124e4ca73bf0ef85.tar.gz crawl-ref-f4a3ad5b61842b75731de8a8124e4ca73bf0ef85.zip |
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
-rw-r--r-- | crawl-ref/source/monstuff.cc | 13 |
1 files changed, 12 insertions, 1 deletions
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 |