summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-21 17:53:49 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-21 17:53:49 +0000
commit41f78a696154902ae7baa22e116d39b6d321fc62 (patch)
tree3cb6f681c0124314d7293c90ea242ce2f5385ed5 /crawl-ref/source/spells3.cc
parenta17368df4fcbdf37e3452c6bc4935ba4372aabd8 (diff)
downloadcrawl-ref-41f78a696154902ae7baa22e116d39b6d321fc62.tar.gz
crawl-ref-41f78a696154902ae7baa22e116d39b6d321fc62.zip
Make fish on dry land (due to Feawn's Sunlight power) flop about and
lose hit points until back in water, using ENCH_AQUATIC_LAND. (Bug 2824663) Also fix tiles compilation (patch 2824632) and add DATA_DIR_PATH to tiled icons (patch 2824635). Both patches (and some more) by Trent W. Buck. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10364 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc43
1 files changed, 24 insertions, 19 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 6f238654ad..3a815e32e8 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -815,7 +815,7 @@ void equip_undead(const coord_def &a, int corps, int monster, int monnum)
default:
continue;
- } // switch
+ }
// Two different items going into the same slot indicate that
// this and further items weren't equipment the monster died
@@ -825,10 +825,10 @@ void equip_undead(const coord_def &a, int corps, int monster, int monnum)
unwind_var<int> save_speedinc(mon->speed_increment);
mon->pickup_item(mitm[objl], false, true);
- } // while
+ }
}
-static bool _raise_remains(const coord_def &a, int corps, beh_type beha,
+static bool _raise_remains(const coord_def &pos, int corps, beh_type beha,
unsigned short hitting, god_type god, bool actual,
int* mon_index)
{
@@ -851,45 +851,50 @@ static bool _raise_remains(const coord_def &a, int corps, beh_type beha,
// Headless hydras cannot be raised, sorry.
if (zombie_type == MONS_HYDRA && number == 0)
+ {
+ if (see_grid(pos))
+ {
+ mpr("The zero-headed hydra corpse sways and immediately "
+ "collapses!");
+ }
return (false);
+ }
monster_type mon = MONS_PROGRAM_BUG;
if (item.sub_type == CORPSE_BODY)
{
- mon = (mons_zombie_size(item.plus) == Z_SMALL) ?
- MONS_ZOMBIE_SMALL : MONS_ZOMBIE_LARGE;
+ mon = (mons_zombie_size(item.plus) == Z_SMALL) ? MONS_ZOMBIE_SMALL
+ : MONS_ZOMBIE_LARGE;
}
else
{
- mon = (mons_zombie_size(item.plus) == Z_SMALL) ?
- MONS_SKELETON_SMALL : MONS_SKELETON_LARGE;
+ mon = (mons_zombie_size(item.plus) == Z_SMALL) ? MONS_SKELETON_SMALL
+ : MONS_SKELETON_LARGE;
}
- const int monster = create_monster(
+ int monster = create_monster(
mgen_data(mon, beha,
- 0, 0, a, hitting,
+ 0, 0, pos, hitting,
0, god,
zombie_type, number));
if (mon_index != NULL)
*mon_index = monster;
- if (monster != -1)
- {
- const int monnum = item.orig_monnum - 1;
+ if (monster == -1)
+ return (false);
- if (is_named_corpse(item))
- name_zombie(&menv[monster], monnum, get_corpse_name(item));
+ const int monnum = item.orig_monnum - 1;
- equip_undead(a, corps, monster, monnum);
+ if (is_named_corpse(item))
+ name_zombie(&menv[monster], monnum, get_corpse_name(item));
- destroy_item(corps);
+ equip_undead(pos, corps, monster, monnum);
- return (true);
- }
+ destroy_item(corps);
- return (false);
+ return (true);
}
// Note that quiet will *not* suppress the message about a corpse