diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-24 18:49:04 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-24 18:49:04 -0700 |
commit | f97c27f6958a0e2ce5ea80ab1f250c32133d5b23 (patch) | |
tree | 695ad6b823d80ab02343c0cee15be6cd71275524 | |
parent | e696fdbfde6b27067b625676cb1c1c2aaf728536 (diff) | |
download | crawl-ref-f97c27f6958a0e2ce5ea80ab1f250c32133d5b23.tar.gz crawl-ref-f97c27f6958a0e2ce5ea80ab1f250c32133d5b23.zip |
Make Shatter LOS-ranged
It usually was, and the game communicated very poorly when it
wasn't (that is, there wasn't any indication at all).
-rw-r--r-- | crawl-ref/source/spl-damage.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crawl-ref/source/spl-damage.cc b/crawl-ref/source/spl-damage.cc index ed7fcf28bf..7ef522f82f 100644 --- a/crawl-ref/source/spl-damage.cc +++ b/crawl-ref/source/spl-damage.cc @@ -1279,8 +1279,7 @@ static bool _shatterable(const actor *act) spret_type cast_shatter(int pow, bool fail) { { - int r_min = 3 + min(pow / 20, 5); - targetter_los hitfunc(&you, LOS_ARENA, r_min, min(r_min + 1, 8)); + targetter_los hitfunc(&you, LOS_ARENA); if (stop_attack_prompt(hitfunc, "harm", _shatterable)) return SPRET_ABORT; } @@ -1296,10 +1295,8 @@ spret_type cast_shatter(int pow, bool fail) mprf(MSGCH_SOUND, "The dungeon rumbles!"); } - int rad = 3 + min(div_rand_round(pow, 20), 5); - int dest = 0; - for (distance_iterator di(you.pos(), true, true, rad); di; ++di) + for (distance_iterator di(you.pos(), true, true, LOS_RADIUS); di; ++di) { // goes from the center out, so newly dug walls recurse if (!cell_see_cell(you.pos(), *di, LOS_SOLID)) @@ -1358,10 +1355,9 @@ bool mons_shatter(monster* caster, bool actual) } int pow = 5 + div_rand_round(caster->get_hit_dice() * 9, 2); - int rad = 3 + div_rand_round(caster->get_hit_dice(), 5); int dest = 0; - for (distance_iterator di(caster->pos(), true, true, rad); di; ++di) + for (distance_iterator di(caster->pos(), true, true, LOS_RADIUS); di; ++di) { // goes from the center out, so newly dug walls recurse if (!cell_see_cell(caster->pos(), *di, LOS_SOLID)) |