diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2014-04-25 01:50:36 +0100 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-05-04 03:15:11 +0100 |
commit | 6033fda4df73fbf1799efa99f2855d726cc706d4 (patch) | |
tree | 7e9e26dbd7abe466b36d128625199596114acbb4 /crawl-ref/source/mon-info.cc | |
parent | 1782bbfdc94b5bf1968478c66945fcab9652ba44 (diff) | |
download | crawl-ref-6033fda4df73fbf1799efa99f2855d726cc706d4.tar.gz crawl-ref-6033fda4df73fbf1799efa99f2855d726cc706d4.zip |
Describe monster attack flavours in their descriptions
Adds monster attacks to monster_info and displays a line above monster
spell sets for monsters with attack flavours, such as "It may attack to
cause poisoning and deal extra fire damage." Player ghosts and random
pan lords use brands instead of attack flavours and so aren't described
here (and random pan lords shouldn't be anyway).
Diffstat (limited to 'crawl-ref/source/mon-info.cc')
-rw-r--r-- | crawl-ref/source/mon-info.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc index 8e7a4dd38a..068db094ad 100644 --- a/crawl-ref/source/mon-info.cc +++ b/crawl-ref/source/mon-info.cc @@ -414,6 +414,12 @@ monster_info::monster_info(monster_type p_type, monster_type p_base_type) } } + for (int i = 0; i < MAX_NUM_ATTACKS; ++i) + { + attack[i] = get_monster_data(type)->attack[i]; + attack[i].damage = 0; + } + props.clear(); client_id = 0; @@ -704,6 +710,12 @@ monster_info::monster_info(const monster* m, int milev) this->props["actual_spellcaster"] = true; } + for (int i = 0; i < MAX_NUM_ATTACKS; ++i) + { + attack[i] = mons_attack_spec(m, i, true); + attack[i].damage = 0; + } + for (unsigned i = 0; i <= MSLOT_LAST_VISIBLE_SLOT; ++i) { bool ok; |