summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 04:55:41 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 04:55:41 +0000
commit915c2ffc0aa07bb33e09b11b5e2275c034fb5d96 (patch)
tree97c79cd1a1a1d929799d656e2463edce432b9517 /crawl-ref/source/spells1.cc
parent87df3f8adf2ce93247abaece1b11a10bedd9c44c (diff)
downloadcrawl-ref-915c2ffc0aa07bb33e09b11b5e2275c034fb5d96.tar.gz
crawl-ref-915c2ffc0aa07bb33e09b11b5e2275c034fb5d96.zip
Adapt Zin's old Divine Robustness into Elyvilon's Divine Vigour,
replacing the old Incredible Healing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6980 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc35
1 files changed, 30 insertions, 5 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index d9310edd33..fcbe4e7e99 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -798,14 +798,39 @@ int cast_healing(int pow, const coord_def& where)
return (_healing_spell(pow + roll_dice(2, pow) - 2, where));
}
-void remove_divine_robustness()
+void remove_divine_vigour()
{
- mpr("Your divine robustness fades.", MSGCH_DURATION);
- you.duration[DUR_DIVINE_ROBUSTNESS] = 0;
- you.attribute[ATTR_DIVINE_ROBUSTNESS] = 0;
+ mpr("Your divine vigour fades.", MSGCH_DURATION);
+ you.duration[DUR_DIVINE_VIGOUR] = 0;
+ you.attribute[ATTR_DIVINE_VIGOUR] = 0;
calc_hp();
}
+bool cast_divine_vigour()
+{
+ bool success = false;
+
+ if (!you.duration[DUR_DIVINE_VIGOUR])
+ {
+ mprf("%s grants you divine vigour.",
+ god_name(you.religion).c_str());
+
+ const int vigour_amt = 1 + (you.skills[SK_INVOCATIONS]/6);
+ const int old_hp_max = you.hp_max;
+ you.attribute[ATTR_DIVINE_VIGOUR] = vigour_amt;
+ you.duration[DUR_DIVINE_VIGOUR]
+ = 35 + (you.skills[SK_INVOCATIONS]*5)/3;
+ calc_hp();
+ inc_hp(you.hp_max - old_hp_max, false);
+
+ success = true;
+ }
+ else
+ canned_msg(MSG_NOTHING_HAPPENS);
+
+ return (success);
+}
+
void remove_divine_stamina()
{
mpr("Your divine stamina fades.", MSGCH_DURATION);
@@ -926,7 +951,7 @@ bool cast_vitalisation()
god_name(you.religion).c_str());
const int stamina_amt = 3;
- you.attribute[ATTR_DIVINE_STAMINA] += stamina_amt;
+ you.attribute[ATTR_DIVINE_STAMINA] = stamina_amt;
you.duration[DUR_DIVINE_STAMINA]
= 35 + (you.skills[SK_INVOCATIONS]*5)/3;