diff options
author | gammafunk <gammafunk@gmail.com> | 2014-03-21 02:42:20 -0500 |
---|---|---|
committer | gammafunk <gammafunk@gmail.com> | 2014-03-22 23:03:00 -0500 |
commit | d3e69da935d934fc79cdb77afc2a3dd222b0ce04 (patch) | |
tree | a7a841690d7867cae3b1ea2cfa0897903408e030 /crawl-ref/source/externs.h | |
parent | 1b562684dd6718c105583056e4b9a189ee261200 (diff) | |
download | crawl-ref-d3e69da935d934fc79cdb77afc2a3dd222b0ce04.tar.gz crawl-ref-d3e69da935d934fc79cdb77afc2a3dd222b0ce04.zip |
Rework the octopode crusher throwing ability
Previously this ability tried to throw victims into a "hard" dungeon
feature for 50% increased damage. This was mostly an excuse add extra
damage, it was almost always applied (hard dungeon features are
abundant), and being next to a single hard feature doesn't have very
much relevance to player strategy. The new version scores each landing
site based on 1) all monsters adjacent to the site scored by the
square of their difficulty and 2) how many adjacent open squares there
are to the site. The end result is that hostile crushers will prefer
to throw the player some place more dangerous. For non-player victims,
the crusher (whether friendly or hostile) considers only distance from
the player as the score, preferring to throw as far from the player as
possible. The final landing site is a random weighted choice (using
distance) on along the throw path from the victim to the site with the
best score, with a random best site chosen if there's a tie in the
scores.
The minimum throw distance has been reduced to 2 squares from the
player, and the damage die size is 4 * monster HD now that the hard
feature check is no longer used.
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r-- | crawl-ref/source/externs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index ec33acd0dc..d37d7e0ff0 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -92,6 +92,8 @@ class monster; class KillMaster; class ghost_demon; +typedef pair<coord_def, int> coord_weight; + template <typename Z> static inline Z sgn(Z x) { return x < 0 ? -1 : (x > 0 ? 1 : 0); |