summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-reacts.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-04-13 22:09:40 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-07 18:23:24 -0600
commit17db3c18ea0925d927a7770c43f3187d963e1253 (patch)
tree9dc2174b74b4a2b2abdd61f606422493ab283d96 /crawl-ref/source/player-reacts.cc
parentbef5296d49176f7f15cc0adaad85c62ea3366fbd (diff)
downloadcrawl-ref-17db3c18ea0925d927a7770c43f3187d963e1253.tar.gz
crawl-ref-17db3c18ea0925d927a7770c43f3187d963e1253.zip
Qazlal: Elemental Adaptation.
Taking damage from an elemental attack sometimes causes you to gain a temporary point of resistance in that element (overriding the other temporary resistances). This includes "earth attacks", i.e. physical damage, which give you a 3 AC boost. Thanks again to mikee for initially suggesting this idea.
Diffstat (limited to 'crawl-ref/source/player-reacts.cc')
-rw-r--r--crawl-ref/source/player-reacts.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/player-reacts.cc b/crawl-ref/source/player-reacts.cc
index 41bb275f7e..a1fa4d9417 100644
--- a/crawl-ref/source/player-reacts.cc
+++ b/crawl-ref/source/player-reacts.cc
@@ -1113,6 +1113,24 @@ static void _decrement_durations()
"Your aura of abjuration expires.");
}
+ _decrement_a_duration(DUR_QAZLAL_FIRE_RES, delay,
+ "You feel less protected from fire.",
+ coinflip(), "Your protection from fire is fading.");
+ _decrement_a_duration(DUR_QAZLAL_COLD_RES, delay,
+ "You feel less protected from cold.",
+ coinflip(), "Your protection from cold is fading.");
+ _decrement_a_duration(DUR_QAZLAL_ELEC_RES, delay,
+ "You feel less protected from electricity.",
+ coinflip(),
+ "Your protection from electricity is fading.");
+ if (_decrement_a_duration(DUR_QAZLAL_AC, delay,
+ "You feel less protected from physical attacks.",
+ coinflip(),
+ "Your protection from physical attacks is fading."))
+ {
+ you.redraw_armour_class = true;
+ }
+
dec_elixir_player(delay);
if (!env.sunlight.empty())