From 915c2ffc0aa07bb33e09b11b5e2275c034fb5d96 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 25 Sep 2008 04:55:41 +0000 Subject: 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 --- crawl-ref/source/spells1.cc | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/spells1.cc') 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; -- cgit v1.2.3-54-g00ecf