summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-18 13:57:05 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-18 13:57:05 -0600
commit3593fbb549ba5b991b92994c94b529ac99045d46 (patch)
treeaa32c649f1154e0f16e544f015f86b1fa672b271 /crawl-ref/source/player.cc
parentd358ba6df56b55e8e16aa7572458501f8544f1e1 (diff)
downloadcrawl-ref-3593fbb549ba5b991b92994c94b529ac99045d46.tar.gz
crawl-ref-3593fbb549ba5b991b92994c94b529ac99045d46.zip
Expand Zin's protection from just mutation to other chaotic effects.
Specifically, protect from rotting, disease, and miasma, since the first of them is tied to the other two, and all three are chaotic. Since negative energy resistance no longer provides rotting resistance, this fills in the gap left by TSO.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index ce527d5a8d..6948b7b5f6 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -4867,6 +4867,13 @@ bool miasma_player()
if (you.res_rotting())
return (false);
+ // Zin's protection.
+ if (you.religion == GOD_ZIN && x_chance_in_y(you.piety, MAX_PIETY))
+ {
+ simple_god_message(" protects your body from miasma!");
+ return (false);
+ }
+
bool success = poison_player(1);
if (you.hp_max > 4 && coinflip())
@@ -6689,6 +6696,13 @@ bool player::rot(actor *who, int amount, int immediate, bool quiet)
return (false);
}
+ // Zin's protection.
+ if (religion == GOD_ZIN && x_chance_in_y(piety, MAX_PIETY))
+ {
+ simple_god_message(" protects your body from decay!");
+ return (false);
+ }
+
if (immediate > 0)
rot_hp(immediate);
@@ -6805,6 +6819,13 @@ bool player::sicken(int amount)
if (res_rotting() || amount <= 0)
return (false);
+ // Zin's protection.
+ if (religion == GOD_ZIN && x_chance_in_y(piety, MAX_PIETY))
+ {
+ simple_god_message(" protects your body from disease!");
+ return (false);
+ }
+
mpr("You feel ill.");
disease += amount * BASELINE_DELAY;