summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.h
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 17:13:23 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 17:13:23 +0000
commit1f9e38751c81744f2e8d4ffb1aea7f3870ba9d5b (patch)
tree8dfafad2a170ec6b870f90c9cf3aee89638a33cd /crawl-ref/source/spl-util.h
parent67f77bb507d0f27b169f53258bcc94a24d7f8894 (diff)
downloadcrawl-ref-1f9e38751c81744f2e8d4ffb1aea7f3870ba9d5b.tar.gz
crawl-ref-1f9e38751c81744f2e8d4ffb1aea7f3870ba9d5b.zip
Ranges redone. bolt no longer has a rangeMax, just a range.
Almost all ranges are now capped by LOS. There are still some things missing, most noticeably randomizing ranges for the range-1-to-2 spells (e.g. Flame Tongue.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6984 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-util.h')
-rw-r--r--crawl-ref/source/spl-util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h
index 16c1bac4d0..76f3dba729 100644
--- a/crawl-ref/source/spl-util.h
+++ b/crawl-ref/source/spl-util.h
@@ -50,6 +50,11 @@ struct spell_desc
unsigned int flags; // bitfield
unsigned int level;
int power_cap;
+
+ // At power 0, you get min_range. At power power_cap, you get max_range.
+ int min_range;
+ int max_range;
+
const char *target_prompt;
@@ -78,6 +83,7 @@ int spell_hunger(spell_type which_spell);
int spell_mana(spell_type which_spell);
int spell_difficulty(spell_type which_spell);
int spell_power_cap(spell_type spell);
+int spell_range(spell_type spell, int pow, bool real_cast);
const char *get_spell_target_prompt( spell_type which_spell );
@@ -122,6 +128,7 @@ int apply_area_within_radius(cell_func cf, const coord_def& where,
bool spell_direction( dist &spelld, bolt &pbolt,
targeting_type restrict = DIR_NONE,
targ_mode_type mode = TARG_ENEMY,
+ int range = LOS_RADIUS,
bool needs_path = true, bool may_target_monster = true,
bool may_target_self = false, const char *prompt = NULL,
bool cancel_at_self = false );