summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 10:17:30 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 10:17:30 +0000
commite73b14bb597a465a3094d500080905517ca2bba6 (patch)
tree06e8a98911ac51531ffe72ab398f5a430746fd8f /crawl-ref/source/spells3.cc
parent431ed991d8f3af773769e64134d432e5d0717a6e (diff)
downloadcrawl-ref-e73b14bb597a465a3094d500080905517ca2bba6.tar.gz
crawl-ref-e73b14bb597a465a3094d500080905517ca2bba6.zip
Update stash tracker when teleporting, to keep track of items picked up
or dropped up in the same turn as teleporting. Note: In tiles, the tile for a grid isn't updated before you move aside to see it, so when you teleport, the remembered grid still may show items that you picked up several turns ago and does not show what you might have dropped there, provided you stayed in the same place before teleporting. I don't know how to fix that, so I'm handing it over to Enne. *waves* git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5652 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 459ba0894c..1ecc7cea82 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -50,6 +50,7 @@
#include "spells1.h"
#include "spl-cast.h"
#include "spl-util.h"
+#include "stash.h"
#include "stuff.h"
#include "traps.h"
#include "view.h"
@@ -120,7 +121,7 @@ bool cast_selective_amnesia(bool force)
}
return (true);
-} // end cast_selective_amnesia()
+}
bool remove_curse(bool suppress_msg)
{
@@ -161,7 +162,7 @@ bool remove_curse(bool suppress_msg)
}
return (success);
-} // end remove_curse()
+}
bool detect_curse(bool suppress_msg)
{
@@ -192,7 +193,7 @@ bool detect_curse(bool suppress_msg)
}
return (success);
-} // end detect_curse()
+}
int cast_smiting(int power, dist &beam)
{
@@ -309,8 +310,8 @@ bool cast_bone_shards(int power, bolt &beam)
mpr("The corpse collapses into a mass of pulpy flesh.");
else
{
- // practical max of 100 * 15 + 3000 = 4500
- // actual max of 200 * 15 + 3000 = 6000
+ // Practical max of 100 * 15 + 3000 = 4500.
+ // Actual max of 200 * 15 + 3000 = 6000.
power *= 15;
power += mons_weight( you.inv[you.equip[EQ_WEAPON]].plus );
@@ -1280,14 +1281,15 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area )
return (false);
}
- // after this point, we're guaranteed to teleport. Kill the appropriate
+ // After this point, we're guaranteed to teleport. Kill the appropriate
// delays.
interrupt_activity( AI_TELEPORT );
- // Update what we can see at the current location in case something
- // hapened in the exact turn that we teleported (like picking up
- // and item).
+ // Update what we can see at the current location as well as its stash,
+ // in case something happened in the exact turn that we teleported
+ // (like picking up/dropping an item).
viewwindow(true, false);
+ StashTrack.update_stash();
if (you.duration[DUR_CONDENSATION_SHIELD] > 0)
{