summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-22 15:54:24 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-22 15:54:24 +1000
commitab3ea04380fd89fb89f061ca6611b6a7cf4f11e1 (patch)
tree33fc646d34ad0e18687bdddfe3c8e68713d82ca2 /crawl-ref
parent15a43070d595df23a11d9f5b37114b15f1e32443 (diff)
downloadcrawl-ref-ab3ea04380fd89fb89f061ca6611b6a7cf4f11e1.tar.gz
crawl-ref-ab3ea04380fd89fb89f061ca6611b6a7cf4f11e1.zip
Stop Deep Dwarf MP from regenerating with spirit shield.
Don't allow Deep Dwarves to use spirit shields as a free source of regenerating HP. However, this simply stops natural regeneration. Potions of magic, crystal balls, staffs of channeling, and other God powers (Makhleb, Vehumet and Sif Muna) are still acceptable methods.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/delay.cc4
-rw-r--r--crawl-ref/source/it_use2.cc4
-rw-r--r--crawl-ref/source/item_use.cc8
-rw-r--r--crawl-ref/source/main.cc4
4 files changed, 19 insertions, 1 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index ff8585be12..ba445ba920 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1547,7 +1547,9 @@ void armour_wear_effects(const int item_slot)
{
set_mp(0, false);
mpr("You feel spirits watching over you.");
- }
+ if (you.species == SP_DEEP_DWARF)
+ mpr("Now linked to your health, your magic stops regenerating.");
+ }
break;
case SPARM_ARCHERY:
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index bbd9480716..daf3ac6a1b 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -659,7 +659,11 @@ void unwear_armour(int slot)
case SPARM_SPIRIT_SHIELD:
if (!player_spirit_shield())
+ {
mpr("You feel strangely alone.");
+ if (you.species == SP_DEEP_DWARF)
+ mpr("Your magic begins regenerating once more.");
+ }
else if (player_equip(EQ_AMULET, AMU_GUARDIAN_SPIRIT, true))
{
item_def& amu(you.inv[you.equip[EQ_AMULET]]);
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 15fc4e28b5..cde532b561 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3445,6 +3445,8 @@ void jewellery_wear_effects(item_def &item)
{
set_mp(0, false);
mpr("You feel your power drawn to a protective spirit.");
+ if (you.species == SP_DEEP_DWARF)
+ mpr("Now linked to your health, your magic stops regenerating.");
ident = ID_KNOWN_TYPE;
}
break;
@@ -3983,6 +3985,9 @@ void jewellery_remove_effects(item_def &item, bool mesg)
case AMU_THE_GOURMAND:
you.duration[DUR_GOURMAND] = 0;
break;
+
+ case AMU_GUARDIAN_SPIRIT:
+ mpr("Your magic begins regenerating once more.");
}
if (is_artefact(item))
@@ -5700,6 +5705,9 @@ void use_artefact(item_def &item, bool *show_msgs, bool unmeld)
{
set_mp(0, false);
mpr("You feel the spirits watch over you.");
+ if (you.species == SP_DEEP_DWARF)
+ mpr("Now linked to your health, your magic stops regenerating.");
+
artefact_wpn_learn_prop(item, ARTP_SPIRIT_SHIELD);
}
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 0ec454e220..14704c6352 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -2739,6 +2739,10 @@ static void _regenerate_hp_and_mp(int delay)
tmp -= 100;
}
+ // XXX: Don't let DD use guardian spirit for free HP. (due, dpeg)
+ if (player_spirit_shield() && you.species == SP_DEEP_DWARF)
+ return;
+
ASSERT( tmp >= 0 && tmp < 100 );
you.hit_points_regeneration = static_cast<unsigned char>(tmp);