diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-24 23:01:23 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-24 23:06:26 +0100 |
commit | 6a8fd2eaff54894b85f71ba5580de967c8037e74 (patch) | |
tree | 4498d5cf26e7cc98cab78b4ac40b8c1ea3be353c /crawl-ref/source/spl-cast.cc | |
parent | 4f9a9aa77bc073af76876932dc0244b42eabfbff (diff) | |
download | crawl-ref-6a8fd2eaff54894b85f71ba5580de967c8037e74.tar.gz crawl-ref-6a8fd2eaff54894b85f71ba5580de967c8037e74.zip |
Add new targetting flag SPFLAG_TARG_OBJ for object targetting.
Also make apportation use this. Apportation now doesn't target
out-of-sight objects anymore.
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 1c970443ff..356ca36636 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1177,11 +1177,11 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) targ = TARG_ANY; targetting_type dir = - ((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 ); + (testbits(flags, SPFLAG_TARG_OBJ) ? 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) |