diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-14 11:48:30 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-14 11:48:30 +0000 |
commit | 54705c0c81e24cfd76ba4fe654c37de217c5beae (patch) | |
tree | ea3625f8dfd68d7ae17501e771d610eee8834479 /crawl-ref/source/monstuff.cc | |
parent | bf43967bc6de08383813ea532bf75c2d441d0e89 (diff) | |
download | crawl-ref-54705c0c81e24cfd76ba4fe654c37de217c5beae.tar.gz crawl-ref-54705c0c81e24cfd76ba4fe654c37de217c5beae.zip |
Apply my recent commits to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9978 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index c49d39b800..1106bbf47b 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2085,6 +2085,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc, ENCH_SHAPESHIFTER); mon_enchant summon = monster->get_ench(ENCH_SUMMON); mon_enchant tp = monster->get_ench(ENCH_TP); + monster_spells spl = monster->spells; // deal with mons_sec monster->type = targetc; @@ -2098,6 +2099,10 @@ bool monster_polymorph(monsters *monster, monster_type targetc, monster->flags = flags; monster->god = god; + // Keep spells for named monsters. + if (!name.empty()) + monster->spells = spl; + monster->add_ench(abj); monster->add_ench(charm); monster->add_ench(neutral); |