diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-03-02 21:54:09 -0800 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-05 19:59:19 -0700 |
commit | a5274fd6dc5599ce2afdc882a46526b036e8f25f (patch) | |
tree | 8f15e6696f4a52033e064314c74b6febfa5e50d3 /crawl-ref/source/teleport.h | |
parent | 9259616cc7dcd8d058367b4d8ba84d8f49dcb898 (diff) | |
download | crawl-ref-a5274fd6dc5599ce2afdc882a46526b036e8f25f.tar.gz crawl-ref-a5274fd6dc5599ce2afdc882a46526b036e8f25f.zip |
Refactored random_near_space(); fixed bugs
Cleaned up bugs in random_near_space(). Monsters can no longer blink
through walls, or into lava/deep water. Ball lightning can be summoned
over lava/deep water.
[Committer's note: cleaned up a bit of code formatting and comments.]
Signed-off-by: Steve Melenchuk <smelenchuk@gmail.com>
Diffstat (limited to 'crawl-ref/source/teleport.h')
-rw-r--r-- | crawl-ref/source/teleport.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/teleport.h b/crawl-ref/source/teleport.h index 3a8243e7fc..457943d469 100644 --- a/crawl-ref/source/teleport.h +++ b/crawl-ref/source/teleport.h @@ -10,9 +10,12 @@ bool blink_away(monster* mon, actor* caster, bool from_seen = true, bool self_ca void blink_range(monster* mon); void blink_close(monster* mon); +bool valid_blink_destination(const actor* moved, const coord_def& target, + bool forbid_sanctuary = false, + bool forbid_unhabitable = true); bool random_near_space(const coord_def& origin, coord_def& target, - bool allow_adjacent = false, bool restrict_LOS = true, - bool forbid_dangerous = false, - bool forbid_sanctuary = false); + bool allow_adjacent = false, + bool forbid_sanctuary = false, + bool forbid_unhabitable = true); #endif |