diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-02 06:39:09 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-02 06:39:09 +0000 |
commit | 00eb4216eab04d938358d9a382c4afacc4ff5a5f (patch) | |
tree | efad04e2ec0ac072dd4c77c6e3af9ed19febcd6b /crawl-ref/source/spells3.cc | |
parent | fa6393b63b270a07e02ce4c8333b23013b5ded75 (diff) | |
download | crawl-ref-00eb4216eab04d938358d9a382c4afacc4ff5a5f.tar.gz crawl-ref-00eb4216eab04d938358d9a382c4afacc4ff5a5f.zip |
Changed interrupted butchering behaviour as per Johanna's
suggestions/observations:
1) Get rid of option swap_when_safe and its behaviour.
2) If auto-swap butchery is interrupted by teleportation or chagning levels
(banishment) then auto-swap back if there's no monsters nearby.
2b) Do the same if butchery is interrupted and then later a large position
change happens.
3) If auto-swap butchery is interrupted by something like poison damage,
if the butchery is resumed and finished then swap back.
4) If auto-swap butchery is interrupted by a monster, then if the
new option prompt_for_swap is set the game will ask if you wish to
swap back from your butchering tool.
4b) Do the same if butchery is interrupted and then later a large
position change lands you near some hostile monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7717 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 959ae1bc95..4d89207f0e 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -1259,6 +1259,7 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area ) } coord_def pos(1, 0); + bool large_change = false; if (is_controlled) { @@ -1328,6 +1329,9 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area ) if (pos != you.pos()) clear_trapping_net(); + if (!see_grid(pos)) + large_change = true; + you.moveto(pos); if (grd(you.pos()) != DNGN_FLOOR @@ -1336,6 +1340,7 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area ) || env.cgrid(you.pos()) != EMPTY_CLOUD) { is_controlled = false; + large_change = false; } else { @@ -1396,14 +1401,21 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area ) else if ( see_grid(newpos) ) mpr("Your surroundings seem slightly different."); else + { mpr("Your surroundings suddenly seem different."); + large_change = true; + } you.position = newpos; // Necessary to update the view centre. you.moveto(you.pos()); + } + if (large_change) + handle_interrupted_swap(true); + return !is_controlled; } |