diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-28 19:41:00 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-28 19:41:00 +0000 |
commit | 1a5a0bf7895f13de0e85719c00e6bc95a5a0798d (patch) | |
tree | 33297179c03960e37903240b044abd26ee47c13f /crawl-ref/source/spl-cast.cc | |
parent | 717609abcaa13c7e83ea5300e0a73897d3166b54 (diff) | |
download | crawl-ref-1a5a0bf7895f13de0e85719c00e6bc95a5a0798d.tar.gz crawl-ref-1a5a0bf7895f13de0e85719c00e6bc95a5a0798d.zip |
Apply patch by (?) to make Apportation autotarget the nearest object.
Thanks!
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10608 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 381ddf95d8..79a6c369cf 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1171,10 +1171,11 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) targ = TARG_ANY; targeting_type dir = - (testbits( flags, SPFLAG_TARGET ) ? DIR_TARGET : - testbits( flags, SPFLAG_GRID ) ? DIR_TARGET : - testbits( flags, SPFLAG_DIR ) ? DIR_DIR - : DIR_NONE); + ( (spell == SPELL_APPORTATION) ? DIR_TARGET_OBJECT : + testbits(flags, SPFLAG_TARGET) ? DIR_TARGET : + testbits(flags, SPFLAG_GRID) ? DIR_TARGET : + testbits(flags, SPFLAG_DIR) ? DIR_DIR : + DIR_NONE ); const char *prompt = get_spell_target_prompt(spell); if (spell == SPELL_EVAPORATE) |