diff options
author | gammafunk <gammafunk@gmail.com> | 2013-10-05 20:22:38 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-10-05 23:30:59 -0400 |
commit | 1ffa8632b4dffe46ba4301a1e30d42d77b3f4d61 (patch) | |
tree | 90a2e120107fef54ac228fdeaaf121c415042fb1 /crawl-ref/source/target.h | |
parent | 05b9689aec426bbc4c2bebac83e2ceddec887aee (diff) | |
download | crawl-ref-1ffa8632b4dffe46ba4301a1e30d42d77b3f4d61.tar.gz crawl-ref-1ffa8632b4dffe46ba4301a1e30d42d77b3f4d61.zip |
Some cleanups and simplifications for jump-attack code.
Remove the allow_harmful argument from ::has_additional_landing_sites() and make
_check_moveto_dangerous back into a static function now that we don't need to
call it directly. The allow_harmful argument allowed direction_chooser to only
find a default jump-attack target with landing sites that are all non-harmful
and within-conduct, but we have proper prompting to the player for such sites
now. This is consistent with the targetting behaviour for other
spells/abilities.
Also cleanup some comments and simplify related code based on previous fixes.
Diffstat (limited to 'crawl-ref/source/target.h')
-rw-r--r-- | crawl-ref/source/target.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/target.h b/crawl-ref/source/target.h index 17b8acc004..489fee39ee 100644 --- a/crawl-ref/source/target.h +++ b/crawl-ref/source/target.h @@ -31,7 +31,7 @@ public: virtual bool can_affect_walls(); virtual aff_type is_affected(coord_def loc) = 0; - virtual bool has_additional_sites(coord_def a, bool allow_harmful); + virtual bool has_additional_sites(coord_def a); protected: bool anyone_there(coord_def loc); }; @@ -209,7 +209,7 @@ public: bool set_aim(coord_def a); bool jump_is_blocked; aff_type is_affected(coord_def loc); - bool has_additional_sites(coord_def a, bool allow_harmful); + bool has_additional_sites(coord_def a); set<coord_def> additional_sites; coord_def landing_site; private: |