diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-22 05:08:10 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-22 05:08:10 +0000 |
commit | e547d7f8d9b7dc26589af1e1290fa5df850722f0 (patch) | |
tree | 393fdaa9676d3e8eb7b50187d78bcb9cc8a3980a /crawl-ref/source/spl-mis.h | |
parent | ad4c63dc3204adfb26e5596761389cbb639836e6 (diff) | |
download | crawl-ref-e547d7f8d9b7dc26589af1e1290fa5df850722f0.tar.gz crawl-ref-e547d7f8d9b7dc26589af1e1290fa5df850722f0.zip |
Split miscast code off from spl-cast.cc into spl-mis.cc
Get rid of members mon_target and mon_source from MiscastEffect class, replace
with methods target_as_monster() and source_as_monster().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8674 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-mis.h')
-rw-r--r-- | crawl-ref/source/spl-mis.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-mis.h b/crawl-ref/source/spl-mis.h index 9c8a14b9b8..783562587f 100644 --- a/crawl-ref/source/spl-mis.h +++ b/crawl-ref/source/spl-mis.h @@ -79,9 +79,6 @@ private: kill_category kc; killer_type kt; - monsters* mon_target; - monsters* mon_source; - nothing_happens_when_type nothing_happens_when; int lethality_margin; @@ -112,6 +109,16 @@ private: void init(); std::string get_default_cause(); + monsters* target_as_monster() + { + return dynamic_cast<monsters*>(target); + } + + monsters* source_as_monster() + { + return dynamic_cast<monsters*>(act_source); + } + bool neither_end_silenced(); void do_msg(bool suppress_nothing_happens = false); |