From 26d250351778496b0bf2975ffc0c250b33b4dbd4 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 14 Sep 2007 15:04:48 +0000 Subject: Fixing bugs: - butterflies stay confused, even when reentering levels (Bug 1793061) - Hunters with Bow/Crossbow don't get Shields skill (FR 1762819), it sends the wrong message - abominations count as undead regardless of colour, at least the ones created via Twisted Resurrection (Bug 1784326) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2087 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mon-util.cc | 7 +++++-- crawl-ref/source/newgame.cc | 6 ++++-- crawl-ref/source/spells2.cc | 6 +++++- crawl-ref/source/spells3.cc | 32 ++++++++++++++++++++------------ 4 files changed, 34 insertions(+), 17 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 58b4c5bb2b..524371a243 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3919,8 +3919,11 @@ void monsters::timeout_enchantments(int levels) break; case ENCH_CONFUSION: - del_ench(i->first); - blink(); + if (!mons_class_flag(type, M_CONFUSED)) + { + del_ench(i->first); + blink(); + } break; case ENCH_HELD: diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index d1220efff1..d40a37df1a 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -4175,7 +4175,8 @@ bool give_items_skills() } you.skills[SK_DODGING] = 1; - you.skills[SK_SHIELDS] = 1; + // don't hand out shields skill to (Cross)Bow users +// you.skills[SK_SHIELDS] = 1; you.skills[SK_CROSSBOWS] = 3; break; @@ -4189,7 +4190,8 @@ bool give_items_skills() default: you.skills[SK_DODGING] = 1; you.skills[SK_STEALTH] = 1; - you.skills[(coinflip() ? SK_STABBING : SK_SHIELDS)]++; + // don't hand out shields skill to Bow users + you.skills[(coinflip() ? SK_STABBING : SK_STEALTH)]++; you.skills[SK_BOWS] = 3; break; } diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index fce14a13dd..58113f4026 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -477,7 +477,8 @@ void cast_twisted(int power, beh_type corps_beh, int corps_hit) || num_corpses < (coinflip() ? 3 : 2)) { mpr("The spell fails."); - mpr("The corpses collapse into a pulpy mess."); + mprf("The corpse%s collapse%s into a pulpy mess.", + num_corpses > 1 ? "s": "", num_corpses > 1 ? "": "s"); return; } @@ -498,6 +499,9 @@ void cast_twisted(int power, beh_type corps_beh, int corps_hit) mpr("The corpses collapse into a pulpy mess."); else { + // This was probably intended, but it's really boring. (jpeg) + // Use menv[mon].number instead (set in create_monster) +// menv[mon].colour = colour; mpr("The heap of corpses melds into an agglomeration of writhing flesh!"); if (type_resurr == MONS_ABOMINATION_LARGE) { diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 00d882177a..6197e8235a 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -909,6 +909,21 @@ bool project_noise(void) return (success); } // end project_noise() +// Returns true if a given monster is an abomination +// created by Twisted Resurrection +static bool mons_your_abomination(const monsters *mon) +{ + if ( mon->type != MONS_ABOMINATION_SMALL + && mon->type != MONS_ABOMINATION_LARGE ) + { + return (false); + } + + // Reusing the colour scheme - hacky! (jpeg) + return (mon->number == BROWN || mon->number == RED + || mon->number == LIGHTRED); +} + /* Type recalled: 0 = anything @@ -949,20 +964,13 @@ bool recall(char type_recalled) if (!monster_habitable_grid(monster, DNGN_FLOOR)) continue; - if (type_recalled == 1) + if (type_recalled == 1) // undead { - /* abomin created by twisted res, although it gets others too */ - if ( !((monster->type == MONS_ABOMINATION_SMALL - || monster->type == MONS_ABOMINATION_LARGE) - && (monster->colour == BROWN - || monster->colour == RED - || monster->colour == LIGHTRED)) ) + if (monster->type != MONS_REAPER + && mons_holiness(monster) != MH_UNDEAD + && !mons_your_abomination(monster)) { - if (monster->type != MONS_REAPER - && mons_holiness(monster) != MH_UNDEAD) - { - continue; - } + continue; } } else if (type_recalled == 2) // Beogh -- cgit v1.2.3-54-g00ecf