diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2014-02-10 20:23:41 +0000 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-02-11 18:32:56 +0000 |
commit | 63a4c57a0e2add125bb261ff04f52467251c6c07 (patch) | |
tree | 80002e8e05619d9ccec97403227e8d7712c5ca87 /crawl-ref/source/spl-selfench.cc | |
parent | ff81b0386e1ef073969148d7afa5f27140350e61 (diff) | |
download | crawl-ref-63a4c57a0e2add125bb261ff04f52467251c6c07.tar.gz crawl-ref-63a4c57a0e2add125bb261ff04f52467251c6c07.zip |
Base RMsl/DMsl expiry on current power rather than power at cast time
Also expire them immediately when they fail, rather than still having a
short duration afterwards.
Diffstat (limited to 'crawl-ref/source/spl-selfench.cc')
-rw-r--r-- | crawl-ref/source/spl-selfench.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-selfench.cc b/crawl-ref/source/spl-selfench.cc index 09f0bfdace..5582d5a985 100644 --- a/crawl-ref/source/spl-selfench.cc +++ b/crawl-ref/source/spl-selfench.cc @@ -111,18 +111,26 @@ spret_type ice_armour(int pow, bool fail) spret_type missile_prot(int pow, bool fail) { + if (you.attribute[ATTR_REPEL_MISSILES]) + { + mpr("You are already repelling missiles."); + return SPRET_ABORT; + } fail_check(); - you.attribute[ATTR_REPEL_MISSILES] = 1 + pow / 6; - you.set_duration(DUR_REPEL_MISSILES, 1 + random2(3)); + you.attribute[ATTR_REPEL_MISSILES] = 1; mpr("You feel protected from missiles."); return SPRET_SUCCESS; } spret_type deflection(int pow, bool fail) { + if (you.attribute[ATTR_DEFLECT_MISSILES]) + { + mpr("You are already deflecting missiles."); + return SPRET_ABORT; + } fail_check(); - you.attribute[ATTR_DEFLECT_MISSILES] = 1 + pow / 6; - you.set_duration(DUR_DEFLECT_MISSILES, 1 + random2(3)); + you.attribute[ATTR_DEFLECT_MISSILES] = 1; mpr("You feel very safe from missiles."); return SPRET_SUCCESS; } |