diff options
-rw-r--r-- | crawl-ref/source/debug.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 16 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/monplace.cc | 6 |
5 files changed, 15 insertions, 19 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 6f3b25eb2d..035f387fd3 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -2718,7 +2718,7 @@ void debug_item_scan( void ) _dump_item( mitm[obj].name(DESC_PLAIN).c_str(), obj, mitm[obj] ); } - // Check that item knows what stack it's in + // Check that item knows what stack it's in. if (mitm[obj].pos != *ri) { mprf(MSGCH_ERROR,"Item position incorrect at (%d,%d)!", @@ -5483,7 +5483,7 @@ void wizard_give_monster_item(monsters *mon) return; } - // Item is gone from player's inventory + // Item is gone from player's inventory. dec_inv_item_quantity(player_slot, item.quantity); if ((mon->flags & MF_HARD_RESET) && !(item.flags & ISFLAG_SUMMONED)) diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 323cf704c3..67a6f539db 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -1018,9 +1018,9 @@ static void _build_layout_skeleton(int level_number, int level_type, static int _num_items_wanted(int level_number) { if (level_number > 5 && one_chance_in(500 - 5 * level_number)) - return 10 + random2avg( 90, 2 ); // rich level! + return (10 + random2avg(90, 2)); // rich level! else - return 3 + roll_dice( 3, 11 ); + return (3 + roll_dice(3, 11)); } @@ -1051,14 +1051,14 @@ static void _fixup_walls() // If part of vaults -> walls depend on level. // If part of crypt -> all walls stone. - if (player_in_branch( BRANCH_DIS ) - || player_in_branch( BRANCH_VAULTS ) - || player_in_branch( BRANCH_CRYPT )) + if (player_in_branch(BRANCH_DIS) + || player_in_branch(BRANCH_VAULTS) + || player_in_branch(BRANCH_CRYPT)) { // Always the case with Dis {dlb} dungeon_feature_type vault_wall = DNGN_METAL_WALL; - if (player_in_branch( BRANCH_VAULTS )) + if (player_in_branch(BRANCH_VAULTS)) { vault_wall = DNGN_ROCK_WALL; const int bdepth = player_branch_depth(); @@ -1072,10 +1072,8 @@ static void _fixup_walls() if (bdepth > 6 && one_chance_in(10)) vault_wall = DNGN_GREEN_CRYSTAL_WALL; } - else if (player_in_branch( BRANCH_CRYPT )) - { + else if (player_in_branch(BRANCH_CRYPT)) vault_wall = DNGN_STONE_WALL; - } _replace_area(0,0,GXM-1,GYM-1,DNGN_ROCK_WALL,vault_wall,MMT_NO_WALL); } diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index d9b919c2eb..3f5dfcf2e7 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -490,7 +490,7 @@ void unlink_item( int dest ) mpr("BUG WARNING: Item didn't seem to be linked at all.", MSGCH_ERROR); #endif -} // end unlink_item() +} void destroy_item( item_def &item, bool never_created ) { @@ -1715,7 +1715,7 @@ int move_item_to_player( int obj, int quant_got, bool quiet, you.turn_is_over = true; return (retval); -} // end move_item_to_player() +} void mark_items_non_pickup_at(const coord_def &pos) { @@ -1898,7 +1898,7 @@ bool copy_item_to_grid( const item_def &item, const coord_def& p, } return (true); -} // end copy_item_to_grid() +} //--------------------------------------------------------------- diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 28ba3558e9..b707b4ed85 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -5193,7 +5193,7 @@ bool monsters::pickup_item(item_def &item, int near, bool force) bool monsters::need_message(int &near) const { return (near != -1 ? near - : (near = visible()) ); + : (near = visible())); } void monsters::swap_weapons(int near) diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index c6de904529..af76646e13 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -1125,8 +1125,8 @@ static int _place_monster_aux(const mgen_data &mg, { give_item(id, mg.power, summoned); - // Dancing swords *always* have a weapon. Fail to - // create them otherwise. + // Dancing weapons *always* have a weapon. Fail to create them + // otherwise. const item_def* wpn = menv[id].weapon(); if (!wpn) { @@ -1136,9 +1136,7 @@ static int _place_monster_aux(const mgen_data &mg, return (-1); } else - { menv[id].colour = wpn->colour; - } } else if (mons_class_itemuse(mg.cls) >= MONUSE_STARTING_EQUIPMENT) { |