summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-08 19:35:30 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-08 19:35:30 +0000
commit95e59f96be707defda5bc535d5e72b2f96fc0b21 (patch)
tree12b5e954c5126f1029f9d3a5e9cfdfaf63242b15
parent2408978589f3e2b17fb874dc88137a7c0747af7c (diff)
downloadcrawl-ref-95e59f96be707defda5bc535d5e72b2f96fc0b21.tar.gz
crawl-ref-95e59f96be707defda5bc535d5e72b2f96fc0b21.zip
Clean up "Death Channel" some more.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5603 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/acr.cc11
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/monstuff.cc6
-rw-r--r--crawl-ref/source/spells3.cc7
-rw-r--r--crawl-ref/source/spells3.h2
5 files changed, 18 insertions, 9 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 67c985e225..96ee704198 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2691,10 +2691,13 @@ static void _decrement_durations()
6, coinflip(),
"You start to feel a little uncertain.");
- _decrement_a_duration(DUR_DEATH_CHANNEL,
- "Your unholy channel expires.",
- 6, coinflip(),
- "Your unholy channel is weakening.");
+ if (_decrement_a_duration(DUR_DEATH_CHANNEL,
+ "Your unholy channel expires.",
+ 6, coinflip(),
+ "Your unholy channel is weakening."))
+ {
+ you.attribute[ATTR_DIVINE_DEATH_CHANNEL] = 0;
+ }
_decrement_a_duration(DUR_SAGE, "You feel less studious.");
_decrement_a_duration(DUR_STEALTH, "You feel less stealthy.");
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index a135c4b3eb..6d385d1110 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -162,6 +162,7 @@ enum actor_type
enum attribute_type
{
ATTR_DIVINE_LIGHTNING_PROTECTION, // 0
+ ATTR_DIVINE_DEATH_CHANNEL,
ATTR_TRANSFORMATION,
ATTR_CARD_COUNTDOWN,
ATTR_NUM_DEMONIC_POWERS,
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 589a3da109..b698997be7 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1003,13 +1003,15 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
&& mons_weight(mons_species(monster->type)))
{
const monster_type spectre = mons_species(monster->type);
+ const bool god_gift = you.attribute[ATTR_DIVINE_DEATH_CHANNEL];
+
// Don't allow 0-headed hydras to become spectral hydras.
if ((spectre != MONS_HYDRA || monster->number)
&& create_monster(
mgen_data( MONS_SPECTRAL_THING, BEH_FRIENDLY,
0, monster->pos(), you.pet_target,
- 0, spectre,
- monster->number )) != -1)
+ god_gift ? MF_GOD_GIFT : 0,
+ spectre, monster->number )) != -1)
{
if (death_message)
mpr("A glowing mist starts to gather...");
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index da68826e52..b4291f5f3b 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -542,12 +542,14 @@ bool summon_horrible_things(int pow, bool god_gift)
return (false);
}
-bool cast_death_channel(int pow)
+bool cast_death_channel(int pow, bool god_gift)
{
bool success = false;
if (you.duration[DUR_DEATH_CHANNEL] < 30)
{
+ success = true;
+
mpr("Malign forces permeate your being, awaiting release.");
you.duration[DUR_DEATH_CHANNEL] += 15 + random2(1 + (pow / 3));
@@ -555,7 +557,8 @@ bool cast_death_channel(int pow)
if (you.duration[DUR_DEATH_CHANNEL] > 100)
you.duration[DUR_DEATH_CHANNEL] = 100;
- success = true;
+ if (god_gift)
+ you.attribute[ATTR_DIVINE_DEATH_CHANNEL] = 1;
}
else
canned_msg(MSG_NOTHING_HAPPENS);
diff --git a/crawl-ref/source/spells3.h b/crawl-ref/source/spells3.h
index 159d6aea76..cc0cb08705 100644
--- a/crawl-ref/source/spells3.h
+++ b/crawl-ref/source/spells3.h
@@ -113,7 +113,7 @@ bool remove_curse(bool suppress_msg);
bool cast_sublimation_of_blood(int pow);
bool simulacrum(int pow, bool god_gift = false);
bool summon_horrible_things(int pow, bool god_gift = false);
-bool cast_death_channel(int pow);
+bool cast_death_channel(int pow, bool god_gift = false);
// updated 24may2000 {dlb}