diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-01 13:29:00 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-01 13:29:00 +0000 |
commit | 4c3ded9257ea0dd6ed298b77754d308b043683be (patch) | |
tree | 6c58ce53f5266e442a1da60a66e5c530ce03e044 /crawl-ref/source/spells4.cc | |
parent | 06a2793826dbd7910ee0423a2f0f248826091243 (diff) | |
download | crawl-ref-4c3ded9257ea0dd6ed298b77754d308b043683be.tar.gz crawl-ref-4c3ded9257ea0dd6ed298b77754d308b043683be.zip |
Sandblast now has a range of 1 when not wielding rocks, and a range of 1-2
(50% each) when wielding rocks. Fixes [2364044].
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8079 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index fc94aec174..f07710234b 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -2345,19 +2345,23 @@ int cast_apportation(int pow) return (done); } -bool cast_sandblast(int pow, bolt &beam) +bool wielding_rocks() { - bool big = false; - + bool rc = false; if (you.weapon()) { const item_def& wpn(*you.weapon()); - big = (wpn.base_type == OBJ_MISSILES - && (wpn.sub_type == MI_STONE || wpn.sub_type == MI_LARGE_ROCK)); + rc = (wpn.base_type == OBJ_MISSILES + && (wpn.sub_type == MI_STONE || wpn.sub_type == MI_LARGE_ROCK)); } + return (rc); +} - bool success = zapping(big ? ZAP_SANDBLAST - : ZAP_SMALL_SANDBLAST, pow, beam, true); +bool cast_sandblast(int pow, bolt &beam) +{ + const bool big = wielding_rocks(); + const bool success = zapping(big ? ZAP_SANDBLAST + : ZAP_SMALL_SANDBLAST, pow, beam, true); if (big && success) dec_inv_item_quantity( you.equip[EQ_WEAPON], 1 ); |