summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ghost.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-08 18:45:45 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-08 18:45:45 -0600
commit61a3e40c9b96c8ea1947ca0d7ad3a3272e844211 (patch)
treedde0973cc373dff1265b267ac36c70890af3afb9 /crawl-ref/source/ghost.cc
parenta7fa0ac3f13aa0198276e348e58700e872987247 (diff)
downloadcrawl-ref-61a3e40c9b96c8ea1947ca0d7ad3a3272e844211.tar.gz
crawl-ref-61a3e40c9b96c8ea1947ca0d7ad3a3272e844211.zip
Fix a few more ghost_demon struct issues with dancing weapons.
Remove unneeded reset() in the initialization function, and set resistances properly to avoid crashes when e.g. checking poison resistance when trying to place them in poison clouds.
Diffstat (limited to 'crawl-ref/source/ghost.cc')
-rw-r--r--crawl-ref/source/ghost.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index 98c60faa02..93ca2be4b2 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -613,7 +613,10 @@ void ghost_demon::init_dancing_weapon(const item_def& weapon, int power)
if (power > 150)
power = 150;
- reset();
+ resists.poison = 1;
+ resists.fire = 1;
+ resists.cold = 1;
+ resists.elec = 1;
colour = weapon.colour;
fly = FL_LEVITATE;