summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/acr.cc7
-rw-r--r--crawl-ref/source/enum.h2
-rw-r--r--crawl-ref/source/religion.cc18
-rw-r--r--crawl-ref/source/skills2.cc1
-rw-r--r--crawl-ref/source/spells1.cc45
5 files changed, 55 insertions, 18 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index dc9e08a497..7bdb66ca8a 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -3062,6 +3062,13 @@ static void _decrement_durations()
}
reduce_revitalisation_chain(1);
+
+ if ( _decrement_a_duration(DUR_DIVINE_ROBUSTNESS))
+ {
+ mpr("Your divine robustness fades.", MSGCH_DURATION);
+ you.attribute[ATTR_DIVINE_ROBUSTNESS] = 0;
+ calc_hp();
+ }
}
static void _check_banished()
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 83f2a2d726..00bde3dfc4 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -171,6 +171,7 @@ enum attribute_type
ATTR_HELD, // caught in a net
ATTR_ABYSS_ENTOURAGE, // maximum number of hostile monsters in
// sight of the player while in the Abyss.
+ ATTR_DIVINE_ROBUSTNESS, // strength of Zin's Divine Robustness
ATTR_DIVINE_SHIELD, // strength of TSO's Divine Shield
ATTR_UNIQUE_RUNES,
ATTR_DEMONIC_RUNES,
@@ -1070,6 +1071,7 @@ enum duration_type
DUR_REPEL_MISSILES,
DUR_PRAYER,
DUR_PIETY_POOL, // distribute piety over time
+ DUR_DIVINE_ROBUSTNESS, // duration of Zin's Divine Robustness
DUR_DIVINE_SHIELD, // duration of TSO's Divine Shield
DUR_REGENERATION,
DUR_SWIFTNESS,
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index fc1cdbd94f..4ba71a3b08 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -475,7 +475,7 @@ static void _inc_penance(god_type god, int val)
// orcish bonuses don't apply under penance
if (god == GOD_BEOGH)
you.redraw_armour_class = true;
- // neither does Zin's revitalisation chaining
+ // neither does Zin's revitalisation chaining or divine robustness
else if (god == GOD_ZIN)
{
if (you.duration[DUR_REVITALISATION_CHAIN])
@@ -483,6 +483,14 @@ static void _inc_penance(god_type god, int val)
mpr("Your power of revitalisation disappears!");
you.duration[DUR_REVITALISATION_CHAIN] = 0;
}
+
+ if (you.duration[DUR_DIVINE_ROBUSTNESS])
+ {
+ mpr("Your divine robustness is withdrawn.");
+ you.duration[DUR_DIVINE_ROBUSTNESS] = 0;
+ you.duration[DUR_REVITALISATION_CHAIN] = 0;
+ calc_hp();
+ }
}
// neither does TSO's halo or divine shield
else if (god == GOD_SHINING_ONE)
@@ -4311,6 +4319,14 @@ void excommunication(god_type new_god)
you.duration[DUR_REVITALISATION_CHAIN] = 0;
}
+ if (you.duration[DUR_DIVINE_ROBUSTNESS])
+ {
+ mpr("Your divine robustness is withdrawn.");
+ you.attribute[ATTR_DIVINE_ROBUSTNESS] = 0;
+ you.duration[DUR_DIVINE_ROBUSTNESS] = 0;
+ calc_hp();
+ }
+
if (env.sanctuary_time)
remove_sanctuary();
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index c8c94d55c0..a670ccf232 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -2112,6 +2112,7 @@ int calc_hp(bool real_hp)
// frail and robust mutations
hitp *= (10 + player_mutation_level(MUT_ROBUST)
+ + you.attribute[ATTR_DIVINE_ROBUSTNESS]
- player_mutation_level(MUT_FRAIL));
hitp /= 10;
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 389f165ad0..ba3aeedf7f 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -822,12 +822,13 @@ int cast_revitalisation(int pow)
// Remove negative afflictions.
switch (step)
{
- // Remove confusion.
+ // Remove confusion and poisoning.
case 0:
- if (you.duration[DUR_CONF])
+ if (you.duration[DUR_CONF] || you.duration[DUR_POISONING])
{
success = true;
you.duration[DUR_CONF] = 0;
+ you.duration[DUR_POISONING] = 0;
break;
}
@@ -837,12 +838,13 @@ int cast_revitalisation(int pow)
if (step == step_max)
break;
- // Remove poisoning.
+ // Remove sickness and rotting.
case 1:
- if (you.duration[DUR_POISONING])
+ if (you.disease || you.rotting)
{
success = true;
- you.duration[DUR_POISONING] = 0;
+ you.disease = 0;
+ you.rotting = 0;
break;
}
@@ -852,12 +854,12 @@ int cast_revitalisation(int pow)
if (step == step_max)
break;
- // Remove sickness.
+ // Restore rotted HP.
case 2:
- if (you.disease)
+ if (player_rotted())
{
success = true;
- you.disease = 0;
+ unrot_hp(3 + random2(9));
break;
}
@@ -867,12 +869,15 @@ int cast_revitalisation(int pow)
if (step == step_max)
break;
- // Remove rotting.
+ // Divine robustness, level 1.
case 3:
- if (you.rotting)
+ if (you.attribute[ATTR_DIVINE_ROBUSTNESS] < 1)
{
success = true;
- you.rotting = 0;
+ mpr("Zin grants you divine robustness.", MSGCH_DURATION);
+ you.attribute[ATTR_DIVINE_ROBUSTNESS] = 1;
+ you.duration[DUR_DIVINE_ROBUSTNESS] += 19 + random2(19);
+ calc_hp();
break;
}
@@ -882,12 +887,15 @@ int cast_revitalisation(int pow)
if (step == step_max)
break;
- // Restore rotted HP.
+ // Divine robustness, level 2.
case 4:
- if (player_rotted())
+ if (you.attribute[ATTR_DIVINE_ROBUSTNESS] < 2)
{
success = true;
- unrot_hp(1 + random2(3));
+ mpr("Zin strengthens your divine robustness.", MSGCH_DURATION);
+ you.attribute[ATTR_DIVINE_ROBUSTNESS] = 2;
+ you.duration[DUR_DIVINE_ROBUSTNESS] += 13 + random2(13);
+ calc_hp();
break;
}
@@ -897,12 +905,15 @@ int cast_revitalisation(int pow)
if (step == step_max)
break;
- // Restore more rotted HP.
+ // Divine robustness, level 3.
case 5:
- if (player_rotted())
+ if (you.attribute[ATTR_DIVINE_ROBUSTNESS] < 3)
{
success = true;
- unrot_hp(2 + random2(6));
+ mpr("Zin maximises your divine robustness.", MSGCH_DURATION);
+ you.attribute[ATTR_DIVINE_ROBUSTNESS] = 3;
+ you.duration[DUR_DIVINE_ROBUSTNESS] += 7 + random2(7);
+ calc_hp();
break;
}