summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godabil.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2010-01-10 13:45:53 -0500
committerCharles Otto <ottochar@gmail.com>2010-01-10 14:13:03 -0500
commit7d4bea3c73dc9fa2411c559806b7bacf27b18318 (patch)
treea0cdde623e2676bcab43c80343dbe5762122b034 /crawl-ref/source/godabil.cc
parent1d9f712c6d75dffd7d7eef7873e4d8cc4055e803 (diff)
downloadcrawl-ref-7d4bea3c73dc9fa2411c559806b7bacf27b18318.tar.gz
crawl-ref-7d4bea3c73dc9fa2411c559806b7bacf27b18318.zip
Give plants created by growth an hp bonus
The bonus is proportional to the user's invocations skill, parameters may need adjustment.
Diffstat (limited to 'crawl-ref/source/godabil.cc')
-rw-r--r--crawl-ref/source/godabil.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index 48d39e2e6d..dce5c197d1 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -485,7 +485,7 @@ int fungal_bloom()
return (processed_count);
}
-static int _create_plant(coord_def & target)
+static int _create_plant(coord_def & target, int hp_adjust = 0)
{
if (actor_at(target) || !mons_class_can_pass(MONS_PLANT, grd(target)))
return (0);
@@ -504,8 +504,16 @@ static int _create_plant(coord_def & target)
if (plant != -1)
{
env.mons[plant].flags |= MF_ATT_CHANGE_ATTEMPT;
+ env.mons[plant].max_hit_points += hp_adjust;
+ env.mons[plant].hit_points += hp_adjust;
+
if (you.see_cell(target))
- mpr("A plant grows up from the ground.");
+ {
+ if (hp_adjust)
+ mpr("A plant grows up from the ground, it is strengthened by Fedhas.");
+ else
+ mpr("A plant grows up from the ground.");
+ }
}
@@ -981,10 +989,12 @@ bool plant_ring_from_fruit()
if ((int)adjacent.size() > target_count)
prioritise_adjacent(you.pos(), adjacent);
+ int hp_adjust = you.skills[SK_INVOCATIONS] * 10;
+
int created_count = 0;
for (int i = 0; i < target_count; ++i)
{
- if (_create_plant(adjacent[i]))
+ if (_create_plant(adjacent[i], hp_adjust))
created_count++;
}