summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-08 20:41:15 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-08 20:41:15 +0000
commitcc51da7ff0cb08088672b6ee566671a08b2105d9 (patch)
treeb155708c5bbf2289c7f71aa1ff66cc68ce8cc95a
parent2ee723e7da2ea33a2eb8064e0e0214aad1c585af (diff)
downloadcrawl-ref-cc51da7ff0cb08088672b6ee566671a08b2105d9.tar.gz
crawl-ref-cc51da7ff0cb08088672b6ee566671a08b2105d9.zip
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5609 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/spells2.cc10
-rw-r--r--crawl-ref/source/spells2.h3
-rw-r--r--crawl-ref/source/spl-cast.cc2
3 files changed, 7 insertions, 8 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index cc5c88584e..3fb26d3153 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -653,8 +653,7 @@ static int raise_corpse( int corps, int corx, int cory,
return returnVal;
} // end raise_corpse()
-void cast_twisted_resurrection(int pow, beh_type corps_beh,
- unsigned short corps_hit)
+void cast_twisted_resurrection(int pow, bool god_gift)
{
if (igrd[you.x_pos][you.y_pos] == NON_ITEM)
{
@@ -723,9 +722,10 @@ void cast_twisted_resurrection(int pow, beh_type corps_beh,
: LIGHTRED;
int monster = create_monster(
- mgen_data(mon, corps_beh, 0,
- you.pos(), corps_hit, 0, MONS_PROGRAM_BUG, 0,
- colour));
+ mgen_data(mon, BEH_FRIENDLY, 0,
+ you.pos(), you.pet_target,
+ god_gift ? MF_GOD_GIFT : 0,
+ MONS_PROGRAM_BUG, 0, colour));
if (monster == -1)
{
diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h
index 1466d710c3..722cefa621 100644
--- a/crawl-ref/source/spells2.h
+++ b/crawl-ref/source/spells2.h
@@ -110,8 +110,7 @@ void cast_toxic_radiance(void);
/* ***********************************************************************
* called from: spell
* *********************************************************************** */
-void cast_twisted_resurrection(int pow, beh_type corps_beh,
- unsigned short corps_hit);
+void cast_twisted_resurrection(int pow, bool god_gift = false);
// last updated 24may2000 {dlb}
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 1f83f24aa7..a5f3dc0798 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -1585,7 +1585,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
break;
case SPELL_TWISTED_RESURRECTION:
- cast_twisted_resurrection(powc, BEH_FRIENDLY, you.pet_target);
+ cast_twisted_resurrection(powc);
break;
case SPELL_REGENERATION: