diff options
-rw-r--r-- | crawl-ref/source/item_use.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/view.h | 2 |
5 files changed, 15 insertions, 9 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index ae7bb1c972..f0c0ce1a49 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1173,9 +1173,7 @@ void shoot_thing(void) return; } - in_name( item, DESC_INVENTORY_EQUIP, str_pass ); - snprintf( info, INFO_SIZE, "Firing: %s", str_pass ); - mpr( info ); + mprf("Firing: %s", in_name(item, DESC_INVENTORY_EQUIP, str_pass)); throw_it( beam, item ); } // end shoot_thing() diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 747e4f8457..a709611da4 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2116,7 +2116,7 @@ void run_environment_effects() const int sfx_chance = Base_Sfx_Chance * you.time_taken / 10; const int nseeds = sfx_seeds.size(); - // If there is a large number of seeds, speed things up by fudging the + // If there are a large number of seeds, speed things up by fudging the // numbers. if (nseeds > 100) { diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index afe2e6f91d..7d3c3d8fb3 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -3582,11 +3582,19 @@ static void handle_monster_move(int i, monsters *monster) return; } - monster->speed_increment += (monster->speed * you.time_taken) / 10; + int energy_gained = (monster->speed * you.time_taken) / 10; + + // Slow monsters might get 0 here. Maybe we should factor in + // *how* slow it is...but a 10-to-1 move ratio seems more than + // enough. + if ( energy_gained == 0 && monster->speed != 0 ) + energy_gained = 1; + + monster->speed_increment += energy_gained; if (you.slow > 0) { - monster->speed_increment += (monster->speed * you.time_taken) / 10; + monster->speed_increment += energy_gained; } // Handle enchantments and clouds on nonmoving monsters: diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index d32464664c..810706bb41 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -2458,7 +2458,7 @@ void magic_mapping(int map_radius, int proportion) // realize that this is simply a repackaged version of // stuff::see_grid() -- make certain they correlate {dlb}: -bool mons_near(struct monsters *monster, unsigned int foe) +bool mons_near(const monsters *monster, unsigned int foe) { // early out -- no foe! if (foe == MHITNOT) @@ -2476,7 +2476,7 @@ bool mons_near(struct monsters *monster, unsigned int foe) } // must be a monster - struct monsters *myFoe = &menv[foe]; + const monsters *myFoe = &menv[foe]; if (myFoe->type >= 0) { if (monster->x > myFoe->x - 9 && monster->x < myFoe->x + 9 diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h index 399f0c00e1..9175f46e95 100644 --- a/crawl-ref/source/view.h +++ b/crawl-ref/source/view.h @@ -36,7 +36,7 @@ void get_non_ibm_symbol(unsigned int object, unsigned short *ch, * called from: bang - beam - direct - effects - fight - monstuff - * mstuff2 - spells1 - spells2 * *********************************************************************** */ -bool mons_near(struct monsters *monster, unsigned int foe = MHITYOU); +bool mons_near(const monsters *monster, unsigned int foe = MHITYOU); // last updated 12may2000 {dlb} |