summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.h
diff options
context:
space:
mode:
authorgammafunk <gammafunk@gmail.com>2014-07-02 00:24:22 -0500
committergammafunk <gammafunk@gmail.com>2014-07-02 01:14:22 -0500
commitfc78f0c065fcd4d19bddc74daaf1d70cc5c68792 (patch)
treefc5eb588365fc80a17a1c96e3e7012e224182262 /crawl-ref/source/beam.h
parent679cb175872ec8848394f93d41504ebada0369a8 (diff)
downloadcrawl-ref-fc78f0c065fcd4d19bddc74daaf1d70cc5c68792.tar.gz
crawl-ref-fc78f0c065fcd4d19bddc74daaf1d70cc5c68792.zip
Have monsters check constriction before using knockback abilities
If a monster is constricting a victim, don't allow it to use a spell or ability that would knock the victim back, thus breaking the constriction. I made this commit when I was considering giving op crushers primal wave, an idea that I dropped, but the check should still be there, and this does move otherwise duplicated code to a single method.
Diffstat (limited to 'crawl-ref/source/beam.h')
-rw-r--r--crawl-ref/source/beam.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h
index c0d1d985fa..a2c9668bdb 100644
--- a/crawl-ref/source/beam.h
+++ b/crawl-ref/source/beam.h
@@ -309,6 +309,7 @@ public:
void determine_affected_cells(explosion_map& m, const coord_def& delta,
int count, int r,
bool stop_at_statues, bool stop_at_walls);
+ bool can_knockback(const actor *act = NULL, int dam = -1) const;
};
int mons_adjust_flavoured(monster* mons, bolt &pbolt, int hurted,