From f72939d2821579a1c8da6202efe6cb6cc351fee4 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Mon, 9 Nov 2009 23:30:47 -0600 Subject: Fix a genus check for blink frogs, and species checks for giant spores. --- crawl-ref/source/mon-behv.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/mon-behv.cc') diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc index a15ea7e2e9..7e5188a40f 100644 --- a/crawl-ref/source/mon-behv.cc +++ b/crawl-ref/source/mon-behv.cc @@ -1192,13 +1192,13 @@ void handle_behaviour(monsters *mon) && you.pet_target != MHITNOT && (mon->foe == MHITNOT || mon->foe == MHITYOU) && !mon->berserk() - && mon->mons_species() != MONS_GIANT_SPORE) + && mon->type != MONS_GIANT_SPORE) { mon->foe = you.pet_target; } // Instead, berserkers attack nearest monsters. - if ((mon->berserk() || mon->mons_species() == MONS_GIANT_SPORE) + if ((mon->berserk() || mon->type == MONS_GIANT_SPORE) && (mon->foe == MHITNOT || isFriendly && mon->foe == MHITYOU)) { // Intelligent monsters prefer to attack the player, @@ -1280,12 +1280,14 @@ void handle_behaviour(monsters *mon) case BEH_LURK: case BEH_SEEK: - // No foe? Then wander or seek the player. + // No foe? Then wander or seek the player. if (mon->foe == MHITNOT) { if (crawl_state.arena || !proxPlayer || isNeutral || patrolling || mon->type == MONS_GIANT_SPORE) + { new_beh = BEH_WANDER; + } else { new_foe = MHITYOU; @@ -1762,7 +1764,7 @@ void behaviour_event(monsters *mon, mon_event_type event, int src, break; } - // Avoid moving friendly giant spores out of BEH_WANDER + // Avoid moving friendly giant spores out of BEH_WANDER. if (mon->friendly() && mon->type == MONS_GIANT_SPORE) break; -- cgit v1.2.3-54-g00ecf