summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-selfench.cc
diff options
context:
space:
mode:
authorargonaut <none>2014-01-27 12:19:40 -0500
committerChris Campbell <chriscampbell89@gmail.com>2014-02-08 23:54:44 +0000
commit8db4b04990254da5c553a867bbb20ed6ee2086f9 (patch)
treeacc9018ac188889458ba7a1d226da0c877c62d19 /crawl-ref/source/spl-selfench.cc
parent48654649027b943db41148e8ed22cdbd6a371b76 (diff)
downloadcrawl-ref-8db4b04990254da5c553a867bbb20ed6ee2086f9.tar.gz
crawl-ref-8db4b04990254da5c553a867bbb20ed6ee2086f9.zip
Give Repel/Deflect missiles a chance to expire per deflection instead of a duration
They are kept as (short) durations but don't decrement while the corresponding attribute is set. Each deflection has a chance to clear the attibute - starting the duration countdown.
Diffstat (limited to 'crawl-ref/source/spl-selfench.cc')
-rw-r--r--crawl-ref/source/spl-selfench.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-selfench.cc b/crawl-ref/source/spl-selfench.cc
index f4daa80bbb..28eeb8e9c5 100644
--- a/crawl-ref/source/spl-selfench.cc
+++ b/crawl-ref/source/spl-selfench.cc
@@ -112,16 +112,18 @@ spret_type ice_armour(int pow, bool fail)
spret_type missile_prot(int pow, bool fail)
{
fail_check();
- you.increase_duration(DUR_REPEL_MISSILES, 8 + roll_dice(2, pow), 100,
- "You feel protected from missiles.");
+ you.attribute[ATTR_REPEL_MISSILES] = 2 + pow/6;
+ you.set_duration(DUR_REPEL_MISSILES, 3, 50, NULL);
+ mpr("You feel protected from missiles.");
return SPRET_SUCCESS;
}
spret_type deflection(int pow, bool fail)
{
fail_check();
- you.increase_duration(DUR_DEFLECT_MISSILES, 15 + random2(pow), 100,
- "You feel very safe from missiles.");
+ you.attribute[ATTR_DEFLECT_MISSILES] = 1 + pow/5;
+ you.set_duration(DUR_DEFLECT_MISSILES, 5, 50, NULL);
+ mpr("You feel very safe from missiles.");
return SPRET_SUCCESS;
}