diff options
-rw-r--r-- | crawl-ref/source/item_use.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/monplace.cc | 17 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 18 |
4 files changed, 23 insertions, 21 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 08825a71fa..4b6e615c5e 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -980,8 +980,8 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary) return (false); } - // Giant races - if (player_genus(GENPC_OGRE) || player_genus(GENPC_DRACONIAN)) + // Giant races and draconians. + if (player_size(PSIZE_TORSO) >= SIZE_LARGE || player_genus(GENPC_DRACONIAN)) { if (sub_type >= ARM_LEATHER_ARMOUR && sub_type <= ARM_PLATE_MAIL diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index a85f16e72e..ec18719873 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -2448,11 +2448,11 @@ bool monster_pathfind::calc_path_to_neighbours() // same total travel cost, the orthogonal will be picked first, and thus // zigzagging can be significantly reduced. // - // 1 0 2 This means directions are looked at, in order, + // 1 0 3 This means directions are looked at, in order, // \ | / 1, 3, 5, 7 (diagonals) followed by 0, 2, 4, 6 - // 7--.--3 (orthogonals). This is achieved by the assignment + // 6--.--2 (orthogonals). This is achieved by the assignment // / | \ of (dir = 0) once dir has passed 7. - // 6 5 4 + // 7 4 5 // for (int dir = 1; dir < 8; (dir += 2) == 9 && (dir = 0)) { @@ -2593,17 +2593,16 @@ std::vector<coord_def> monster_pathfind::backtrack() while (pos != start); ASSERT(pos == start); - return path; + return (path); } // Reduces the path coordinates to only a couple of key waypoints needed // to reach the target. Waypoints are chosen such that from one waypoint you // can see (and, more importantly, reach) the next one. Note that // grid_see_grid() is probably rather too conservative in these estimates. -// This is done because Crawl's pathfinding once a target is in sight and easy -// reach is both very robust and natural, especially if we want to flexibly +// This is done because Crawl's pathfinding - once a target is in sight and easy +// reach - is both very robust and natural, especially if we want to flexibly // avoid plants and other monsters in the way. - std::vector<coord_def> monster_pathfind::calc_waypoints() { std::vector<coord_def> path = backtrack(); @@ -2644,7 +2643,7 @@ std::vector<coord_def> monster_pathfind::calc_waypoints() if (pos != path[path.size() - 1]) waypoints.push_back(pos); - return waypoints; + return (waypoints); } // Checks whether a given monster can pass over a certain position, respecting @@ -2657,7 +2656,7 @@ bool monster_pathfind::traversable(coord_def p) if (!monster_habitable_grid(montype, grd(p))) return (false); - // Monsters that can't open doors, won't be able to pass them. + // Monsters that can't open doors won't be able to pass them. if ((grd(p) == DNGN_CLOSED_DOOR || grd(p) == DNGN_SECRET_DOOR) && mons_itemuse(montype) < MONUSE_OPEN_DOORS) { diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 90466a5011..f0e5882a14 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5688,11 +5688,12 @@ bool player::can_pass_through_feat(dungeon_feature_type grid) const size_type player::body_size(int psize, bool base) const { - size_type ret = (base) ? SIZE_CHARACTER : transform_size( psize ); + size_type ret = (base) ? SIZE_CHARACTER + : transform_size( psize ); if (ret == SIZE_CHARACTER) { - // transformation has size of character's species: + // Transformation has size of character's species. switch (species) { case SP_OGRE: diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 227e956d84..36bfd110ec 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -512,9 +512,8 @@ std::string print_god_likes(god_type which_god, bool verbose) switch (which_god) { - case GOD_SHINING_ONE: case GOD_KIKUBAAQUDGHA: case GOD_OKAWARU: - case GOD_MAKHLEB: case GOD_SIF_MUNA: case GOD_TROG: - snprintf(info, INFO_SIZE, "sacrifice items%s", + case GOD_SHINING_ONE: + snprintf(info, INFO_SIZE, "sacrifice evil items%s", verbose ? " (by dropping them on an altar and praying)" : ""); likes.push_back(info); @@ -2497,7 +2496,8 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, case GOD_LUGONU: simple_god_message( make_stringf(" accepts your %skill.", - thing_done == DID_KILL_HOLY ? "" : "collateral ").c_str()); + thing_done == DID_KILL_HOLY ? "" : "collateral ") + .c_str()); ret = true; if (random2(level + 18) > 2) @@ -3237,12 +3237,14 @@ void lose_piety(int pgn) // are withheld. if (!player_under_penance() && you.piety != old_piety) { - if (you.piety <= 160 && old_piety > 160 && - (you.religion == GOD_SHINING_ONE || you.religion == GOD_LUGONU) - && you.num_gifts[you.religion] == 0) + if (you.piety <= 160 && old_piety > 160 + && (you.religion == GOD_SHINING_ONE || you.religion == GOD_LUGONU) + && you.num_gifts[you.religion] == 0) + { simple_god_message(" is no longer ready to bless your weapon."); + } - for ( int i = 0; i < MAX_GOD_ABILITIES; ++i ) + for (int i = 0; i < MAX_GOD_ABILITIES; ++i) { if (you.piety < piety_breakpoint(i) && old_piety >= piety_breakpoint(i)) |