diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-02 16:30:26 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-02 16:30:26 +0000 |
commit | 3a448771f4f2b3a9b0f85869983a1482b7444e6d (patch) | |
tree | 0897d3ed8a98481eb9aba02b1ab3ce4d6c802e95 /crawl-ref/source/monstuff.cc | |
parent | a8f9c9ba637b6fbf54528548d94a0b5aa02520ce (diff) | |
download | crawl-ref-3a448771f4f2b3a9b0f85869983a1482b7444e6d.tar.gz crawl-ref-3a448771f4f2b3a9b0f85869983a1482b7444e6d.zip |
Merge trunk into 0.2 branch for 0.2.1.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.2@1192 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 4dffb17f14..d4e3e67354 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -326,8 +326,8 @@ static void place_monster_corpse(const monsters *monster) // Don't care if 'o' is changed, and it shouldn't be (corpses don't stack) move_item_to_grid( &o, monster->x, monster->y ); - if (you.hunger_state < HS_SATIATED) - learned_something_new(TUT_MAKE_CHUNKS); + if (you.hunger_state < HS_SATIATED && see_grid(monster->x, monster->y)) + learned_something_new(TUT_MAKE_CHUNKS); } // end place_monster_corpse() static void tutorial_inspect_kill() @@ -1111,12 +1111,12 @@ bool monster_polymorph( struct monsters *monster, int targetc, int power ) monster_drop_ething(monster); - // New monster type might be interesting - mark_interesting_monst(monster); + // New monster type might be interesting + mark_interesting_monst(monster); - // If new monster is visible to player, then we've seen it - if (player_monster_visible(monster) && mons_near(monster)) - seen_monster(monster); + // If new monster is visible to player, then we've seen it + if (player_monster_visible(monster) && mons_near(monster)) + seen_monster(monster); return (player_messaged); } // end monster_polymorph() @@ -1834,7 +1834,7 @@ std::string str_simple_monster_message(monsters *mons, const char *event) // distant or invisible to the player ... look elsewhere for a function // permitting output of "It" messages for the invisible {dlb} // Intentionally avoids info and str_pass now. -- bwr -bool simple_monster_message(struct monsters *monster, const char *event, +bool simple_monster_message(const monsters *monster, const char *event, int channel, int param) { char buff[INFO_SIZE]; @@ -3367,7 +3367,8 @@ static void handle_monster_move(int i, monsters *monster) mons_in_cloud( monster ); } - handle_enchantment( monster ); + if (handle_enchantment( monster )) + return; } // memory is decremented here for a reason -- we only want it @@ -3395,7 +3396,7 @@ static void handle_monster_move(int i, monsters *monster) while (monster->speed_increment >= 80) { // The continues & breaks are WRT this. - if (monster->type != -1 && monster->hit_points < 1) + if (!monster->alive()) break; monster->speed_increment -= 10; @@ -3425,7 +3426,7 @@ static void handle_monster_move(int i, monsters *monster) } if (handle_enchantment(monster)) - continue; + break; monster_regenerate(monster); |