summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dat/float.des8
-rw-r--r--crawl-ref/source/dat/mini.des2
-rw-r--r--crawl-ref/source/dungeon.cc8
-rw-r--r--crawl-ref/source/stuff.cc4
-rw-r--r--crawl-ref/source/transfor.cc9
-rw-r--r--crawl-ref/source/view.cc15
6 files changed, 33 insertions, 13 deletions
diff --git a/crawl-ref/source/dat/float.des b/crawl-ref/source/dat/float.des
index 0d9cd202e3..1c10725548 100644
--- a/crawl-ref/source/dat/float.des
+++ b/crawl-ref/source/dat/float.des
@@ -242,11 +242,11 @@ ENDMAP
NAME: troll_bridge
DEPTH: D:9-18
ORIENT: float
-TAGS: no_pool_fixup
+TAGS: no_pool_fixup patrolling
SUBST: 1 = 1:50 2 3:5
-MONS: patrolling troll
-MONS: patrolling rock troll
-MONS: patrolling iron troll
+MONS: troll
+MONS: rock troll
+MONS: iron troll
MAP
xxxxx...........................xxxxxx
xwwwx...........................xxxxxx
diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des
index e5bdcefa95..9aa79e83fb 100644
--- a/crawl-ref/source/dat/mini.des
+++ b/crawl-ref/source/dat/mini.des
@@ -1057,7 +1057,7 @@ ENDMAP
# Anthill
#
NAME: minivault_29
-TAGS: allow_dup
+TAGS: allow_dup patrolling
MONS: patrolling queen ant, patrolling soldier ant
MONS: patrolling giant ant, ant larva
MAP
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 5cbd1778e2..01eb98961b 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3227,7 +3227,7 @@ static void _fill_monster_pit( spec_room &sr, FixedVector<pit_mons_def,
const int roll = random2( die_size );
- // density skip (no need to iterate)
+ // Density skip (no need to iterate).
if (roll >= rare_sum)
continue;
@@ -3480,6 +3480,7 @@ static void _beehive(spec_room &sr)
const int queenx = sr.x1 + random2(sr.x2 - sr.x1);
const int queeny = sr.y1 + random2(sr.y2 - sr.y1);
+ // Mark all kinds of bees at patrolling to make them return to their hive.
for (x = sr.x1; x <= sr.x2; x++)
for (y = sr.y1; y <= sr.y2; y++)
{
@@ -3492,14 +3493,15 @@ static void _beehive(spec_room &sr)
mgen_data::sleeper_at(
one_chance_in(7) ? MONS_KILLER_BEE_LARVA
: MONS_KILLER_BEE,
- coord_def(x, y)));
+ coord_def(x, y),
+ MG_PATROLLING));
}
mons_place(
mgen_data::sleeper_at(
MONS_QUEEN_BEE,
coord_def(queenx, queeny ),
- MG_PATROLLING)); // Queen bees will return to their hive.
+ MG_PATROLLING));
}
// Used for placement of vaults.
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index a03bb0cc5b..802ad57cf1 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -115,11 +115,11 @@ void radius_iterator::step()
// Sweep L-R, U-D
location.x++;
- if ( location.x > maxx )
+ if (location.x > maxx)
{
location.x = minx;
location.y++;
- if ( location.y > maxy )
+ if (location.y > maxy)
iter_done = true;
}
}
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index de89e0c9f7..6062f56653 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -151,7 +151,7 @@ static bool check_for_cursed_equipment(const std::set<equipment_type> &remove)
// Count the stat boosts yielded by all items to be removed, and count
// future losses (caused by the transformation) like a current stat boost,
-// as well. If the sum of all bosts of a stat is equal to or greater than
+// as well. If the sum of all boosts of a stat is equal to or greater than
// the current stat, give a message and return true.
bool check_transformation_stat_loss(const std::set<equipment_type> &remove,
int str_loss, int dex_loss, int int_loss,
@@ -162,6 +162,13 @@ bool check_transformation_stat_loss(const std::set<equipment_type> &remove,
int prop_dex = dex_loss;
int prop_int = int_loss;
+ // Might is very much temporary and might run out at any point during
+ // your transformation, possibly resulting in stat loss caused by a
+ // combination of an unequipping (and/or stat lowering) transformation
+ // and Might running out at an inopportune moment.
+ if (you.duration[DUR_MIGHT])
+ prop_str += 5;
+
// Check over all items to be removed.
std::set<equipment_type>::const_iterator iter;
for (iter = remove.begin(); iter != remove.end(); ++iter)
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index a14738ea47..e0ca6d1eea 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -5682,6 +5682,13 @@ void monster_los::check_los_beam(int dx, int dy)
for (int tx = target1_x; tx <= target2_x; tx++)
for (int ty = target1_y; ty <= target2_y; ty++)
{
+ // If (tx, ty) lies outside the level boundaries, there's nothing
+ // that shooting a ray into that direction could bring us, esp.
+ // as earlier grids in the ray will already have been handled, and
+ // out of bounds grids are simply skipped in any LoS check.
+ if (!map_bounds(tx, ty));
+ continue;
+
// Already calculated a beam to (tx, ty), don't do so again.
if (!is_unknown(tx, ty))
continue;
@@ -5690,13 +5697,17 @@ void monster_los::check_los_beam(int dx, int dy)
ray.fullray_idx = -1; // to quiet valgrind
find_ray( gridx, gridy, tx, ty, true, ray, 0, true, true );
- ASSERT(in_bounds(ray.x(), ray.y()));
if (ray.x() == gridx && ray.y() == gridy)
ray.advance(true);
while (dist++ <= max_dist)
{
- ASSERT(in_bounds(ray.x(), ray.y()));
+ // The ray brings is out of bounds of the level map.
+ // Since we're always shooting outwards there's nothing more
+ // to look at in that direction, and we can break the loop.
+ if (!map_bounds(ray.x(), ray.y()))
+ break;
+
if (blocked)
{
// Earlier grid blocks this beam, set to blocked if