summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-14 20:26:05 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-14 20:26:05 +0000
commit26f8d2de7b69e5cc901b293f76dd0ded073ad1b7 (patch)
tree87209d39e974b90f25cc2da991c7156cf91c8720 /crawl-ref/source/acr.cc
parent258300c2d7b30f3ccdcd43b804b4ff9055dae917 (diff)
downloadcrawl-ref-26f8d2de7b69e5cc901b293f76dd0ded073ad1b7.tar.gz
crawl-ref-26f8d2de7b69e5cc901b293f76dd0ded073ad1b7.zip
Tweak Shoals algorithm to place the islands a bit more central and away from
the border (so they're not cut off anymore). Also add a new feature type DNGN_OPEN_SEA that is an impassible feature only intended for the Shoals border. Will need special handling for confusion, I guess. I've also tweaked the level generation, so Shoals vaults don't need to be connected anymore (the algorithm just adds superfluous floor corridors), but I still get loads of corridors on the bottom level - frustratingly enough only inside the map border, and they (usually) don't even contain any stairs or other features. It's maddening! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10213 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc30
1 files changed, 17 insertions, 13 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 5eab34eb2d..38423e73fa 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -3627,15 +3627,15 @@ static void _move_player(coord_def move)
{
for (unsigned int i = 0; i < you.mesmerised_by.size(); ++i)
{
- monsters& mon = menv[you.mesmerised_by[i]];
- int olddist = grid_distance(you.pos(), mon.pos());
- int newdist = grid_distance(targ, mon.pos());
-
- if (olddist < newdist)
- {
- beholder = &mon;
- break;
- }
+ monsters& mon = menv[you.mesmerised_by[i]];
+ int olddist = grid_distance(you.pos(), mon.pos());
+ int newdist = grid_distance(targ, mon.pos());
+
+ if (olddist < newdist)
+ {
+ beholder = &mon;
+ break;
+ }
}
}
@@ -3700,10 +3700,14 @@ static void _move_player(coord_def move)
}
else if (!targ_pass && !attacking)
{
+ if (grd(targ) == DNGN_OPEN_SEA)
+ mpr("You can't go out to sea!");
+
stop_running();
move.reset();
you.turn_is_over = false;
crawl_state.cancel_cmd_repeat();
+ return;
}
else if (beholder && !attacking)
{
@@ -3724,21 +3728,21 @@ static void _move_player(coord_def move)
you.pet_target = MHITNOT;
#if DEBUG_DIAGNOSTICS
- mpr( "Shifting.", MSGCH_DIAGNOSTICS );
+ mpr("Shifting.", MSGCH_DIAGNOSTICS);
int j = 0;
for (int i = 0; i < MAX_ITEMS; ++i)
if (is_valid_item( mitm[i] ))
++j;
- mprf( MSGCH_DIAGNOSTICS, "Number of items present: %d", j );
+ mprf(MSGCH_DIAGNOSTICS, "Number of items present: %d", j);
j = 0;
for (int i = 0; i < MAX_MONSTERS; ++i)
if (menv[i].type != -1)
++j;
- mprf( MSGCH_DIAGNOSTICS, "Number of monsters present: %d", j);
- mprf( MSGCH_DIAGNOSTICS, "Number of clouds present: %d", env.cloud_no);
+ mprf(MSGCH_DIAGNOSTICS, "Number of monsters present: %d", j);
+ mprf(MSGCH_DIAGNOSTICS, "Number of clouds present: %d", env.cloud_no);
#endif
}