From ee19f1ad5c1a6bd5589fa76f42f8dc28d8dda844 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 7 Dec 2007 07:08:01 +0000 Subject: Add still more whitespace and comment fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3016 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 2 +- crawl-ref/source/describe.cc | 2 +- crawl-ref/source/item_use.cc | 8 ++++---- crawl-ref/source/item_use.h | 4 ++-- crawl-ref/source/makeitem.cc | 2 +- crawl-ref/source/mstuff2.cc | 5 +++-- 6 files changed, 12 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index c7c2366643..4e91ca5dfa 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -2490,7 +2490,7 @@ void beam_drop_object( bolt &beam, item_def *item, int x, int y ) && (item->base_type != OBJ_MISSILES || coinflip())) { copy_item_to_grid( *item, x, y, 1 ); - } // if (thing_throw == 2) ... + } } // Returns true if the beam hits the player, fuzzing the beam if necessary diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 14a7244cec..c2765db928 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1864,7 +1864,7 @@ std::string get_item_description( const item_def &item, bool verbose, { // Get rid of newline at end of description, so that // either the wand "no charges left" or the meat chunk - // "unpleasent" description can follow on the same line. + // "unpleasant" description can follow on the same line. description.seekp(description.tellp() - (std::streamoff)1); description << " "; } diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 5d6413734d..3e62c8f41f 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1208,7 +1208,7 @@ static bool fire_item_matches(const item_def &item, unsigned fire_type) { if (!is_valid_item(item)) return (false); - + if (you.attribute[ATTR_HELD]) { if (item.base_type == OBJ_MISSILES) @@ -2183,7 +2183,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, baseDam = 0; exDamBonus = 0; ammoDamBonus = 0; - + // but accuracy is important for this one baseHit = 1; exHitBonus += (skill_bump(SK_THROWING) * 7 / 2); @@ -2356,10 +2356,10 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, pbolt.setup_retrace(); viewwindow(true, false); fire_beam(pbolt, NULL); - + msg::stream << item.name(DESC_CAP_THE) << " returns to your pack!" << std::endl; - + // Player saw the item return if (!is_artefact(you.inv[throw_2])) set_ident_flags(you.inv[throw_2], ISFLAG_KNOW_TYPE); diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h index cc514d17d1..f38953bb12 100644 --- a/crawl-ref/source/item_use.h +++ b/crawl-ref/source/item_use.h @@ -171,9 +171,9 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport=false, int acc_bonus=0, dist *target = NULL); void inscribe_item(); -int launcher_shield_slowdown(const item_def &launcher, +int launcher_shield_slowdown(const item_def &launcher, const item_def *shield); -int launcher_final_speed(const item_def &launcher, +int launcher_final_speed(const item_def &launcher, const item_def *shield); void warn_shield_penalties(); diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 0d16328eb6..a17ddb81fd 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -29,7 +29,7 @@ static bool weapon_is_visibly_special(const item_def &item); static bool got_curare_roll(const int item_level) { - return one_chance_in(item_level > 27? 6 : + return one_chance_in(item_level > 27? 6 : item_level < 2 ? 15 : (364 - 7 * item_level) / 25); } diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index d78a833819..f8a5140bf5 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1110,7 +1110,8 @@ bool mons_throw(struct monsters *monster, struct bolt &pbolt, int hand_used) const int throw_energy = entry->energy_usage.missile; monster->speed_increment -= throw_energy; - item_def item = mitm[hand_used]; // copy changed for venom launchers + // Dropping item copy, since the launched item might be different. + item_def item = mitm[hand_used]; item.quantity = 1; pbolt.range = 9; @@ -1427,7 +1428,7 @@ bool mons_throw(struct monsters *monster, struct bolt &pbolt, int hand_used) << (player_monster_visible(monster)? monster->name(DESC_NOCAP_THE) : "where it came from") << "!" << std::endl; - + // Player saw the item return if (!is_artefact(item)) set_ident_flags(mitm[hand_used], ISFLAG_KNOW_TYPE); -- cgit v1.2.3-54-g00ecf