summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 22:44:11 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 22:44:11 +0000
commit655e25c2693b8e02b37ee650e0fd74a8baf4d837 (patch)
tree46e4d3bf2863f19ce3298eedf0b55a7888d19871
parent5a958305f387d43bbbc80859022b50c3f391fe96 (diff)
downloadcrawl-ref-655e25c2693b8e02b37ee650e0fd74a8baf4d837.tar.gz
crawl-ref-655e25c2693b8e02b37ee650e0fd74a8baf4d837.zip
Make Zin's Revitalisation easier to adjust in terms of power by making
the MP increase relative to the HP increase. As a side effect, the MP increase is a bit more powerful; at maximum power, it's now 7 instead of 5. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4422 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/spells1.cc18
-rw-r--r--crawl-ref/source/spells1.h2
2 files changed, 14 insertions, 6 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 297c4d4eec..e22ab07b41 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -757,13 +757,21 @@ int cast_healing( int pow, int target_x, int target_y )
return (_healing_spell( pow + roll_dice( 2, pow ) - 2, target_x, target_y ));
}
-int cast_revitalisation( int pow )
+void cast_revitalisation(int pow)
{
- // first increase MP by 5 or to maximum, whichever is lower
- inc_mp(5, false);
+ if (you.hp == you.hp_max || you.magic_points == you.max_magic_points)
+ canned_msg(MSG_NOTHING_HAPPENS);
+ else
+ {
+ // Currently, this uses the same formula as minor healing.
+ int amount = pow + roll_dice(2, pow) - 2;
- // then cast healing (as in Minor Healing)
- return cast_healing(pow, you.x_pos, you.y_pos); // target yourself
+ // Increase MP by half of amount.
+ inc_mp(amount / 2, false);
+
+ // Increase HP by amount.
+ inc_hp(amount, false);
+ }
}
bool cast_revivification(int pow)
diff --git a/crawl-ref/source/spells1.h b/crawl-ref/source/spells1.h
index 5f3d742f80..a75b578458 100644
--- a/crawl-ref/source/spells1.h
+++ b/crawl-ref/source/spells1.h
@@ -54,7 +54,7 @@ char cast_lesser_healing(void);
* called from: ability - spell
* *********************************************************************** */
int cast_healing(int pow, int target_x = -1, int target_y = -1);
-int cast_revitalisation(int pow);
+void cast_revitalisation(int pow);
// last updated 24may2000 {dlb}
/* ***********************************************************************