diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-04-13 22:48:04 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-07 18:23:24 -0600 |
commit | 227f87c34b51370c8798cf03006b0652feb98829 (patch) | |
tree | dd561a250caa8411d9e63645abd11c1ec533cd31 /crawl-ref/source/godprayer.cc | |
parent | 17db3c18ea0925d927a7770c43f3187d963e1253 (diff) | |
download | crawl-ref-227f87c34b51370c8798cf03006b0652feb98829.tar.gz crawl-ref-227f87c34b51370c8798cf03006b0652feb98829.zip |
Qazlal: one-time-only elemental protection gift at 6*.
Choose from rF++, rC++, rElec, or 5 AC (compare the Elemental Staff).
Goes away permanently if you abandon Qazlal; ineffective while under
penance.
Diffstat (limited to 'crawl-ref/source/godprayer.cc')
-rw-r--r-- | crawl-ref/source/godprayer.cc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc index 962ed5da21..e38962e9f0 100644 --- a/crawl-ref/source/godprayer.cc +++ b/crawl-ref/source/godprayer.cc @@ -304,6 +304,52 @@ static bool _altar_prayer() return false; } + // Qazlal offers you an elemental resistance (rF++, rC++, rElec, AC+5). + else if (you_worship(GOD_QAZLAL) && !player_under_penance() + && you.piety >= piety_breakpoint(5) + && !you.one_time_ability_used[GOD_QAZLAL]) + { + simple_god_message( + " will protect you from an element of your choice."); + more(); + mesclr(); + mpr_nojoin(MSGCH_PLAIN, "[a] Fire (rF++)"); + mpr_nojoin(MSGCH_PLAIN, "[b] Ice (rC++)"); + mpr_nojoin(MSGCH_PLAIN, "[c] Air (rElec)"); + mpr_nojoin(MSGCH_PLAIN, "[d] Earth (AC+5)"); + mprf(MSGCH_PROMPT, "Request which resistance (ESC to cancel)?"); + int keyin = toalower(get_ch()) - 'a'; + if (keyin < 0 || keyin > 3) + { + canned_msg(MSG_OK); + return false; + } + + you.one_time_ability_used.set(you.religion); + switch (keyin) + { + default: + case 0: + you.attribute[ATTR_DIVINE_FIRE_RES] = 1; + mprf(MSGCH_GOD, "You feel cold."); + break; + case 1: + you.attribute[ATTR_DIVINE_COLD_RES] = 1; + mprf(MSGCH_GOD, "You feel hot."); + break; + case 2: + you.attribute[ATTR_DIVINE_ELEC_RES] = 1; + mprf(MSGCH_GOD, "You feel insulated."); + break; + case 3: + you.attribute[ATTR_DIVINE_AC] = 1; + mprf(MSGCH_GOD, "You feel tough."); + you.redraw_armour_class = true; + break; + } + return true; + } + // None of above are true, nothing happens. return false; } |