Move Hep frailty & ancestor to 1*
authorNicholas Feinberg <pleasingfung@gmail.com>
Fri, 30 Apr 2021 15:22:40 +0000 (08:22 -0700)
committerNicholas Feinberg <pleasingfung@gmail.com>
Fri, 30 Apr 2021 15:24:56 +0000 (08:24 -0700)
Hepliaklqana was one of the last gods that provided a benefit at 1*.
In general, the tension of having to worship for a little while before
actually getting an upside from your god (assuming you haven't taken
some other tradeoff, e.g. an ecumenical altar or a Monk start) tends to
produce more interesting gameplay. Along with recent major Hep buffs,
it seemed like it was finally time to make this change.

crawl-ref/source/describe-god.cc
crawl-ref/source/religion.cc

index 1aa68b3..6189a6f 100644 (file)
@@ -950,8 +950,14 @@ static formatted_string _describe_god_powers(god_type which_god)
         break;
 
     case GOD_HEPLIAKLQANA:
+        if (have_passive(passive_t::frail))
+            desc.textcolour(god_colour(which_god));
+        else
+            desc.textcolour(DARKGREY);
+
         have_any = true;
         desc.cprintf("Your life essence is reduced. (-10%% HP)\n");
+        desc.cprintf("Your ancestor manifests to aid you.\n");
         break;
 
 #if TAG_MAJOR_VERSION == 34
index 3af0dac..69b2507 100644 (file)
@@ -2406,8 +2406,22 @@ static void _gain_piety_point()
 
         const int rank = piety_rank();
         take_note(Note(NOTE_PIETY_RANK, you.religion, rank));
+
+        // For messaging reasons, we want to get our ancestor before
+        // we get the associated recall / rename powers.
+        if (rank == rank_for_passive(passive_t::frail)) {
+            calc_hp(); // adjust for frailty
+            // In exchange for your hp, you get an ancestor!
+            const mgen_data mg = hepliaklqana_ancestor_gen_data();
+            delayed_monster(mg);
+            simple_god_message(make_stringf(" forms a fragment of your life essence"
+                                            " into the memory of your ancestor, %s!",
+                                            mg.mname.c_str()).c_str());
+        }
+
         for (const auto& power : get_god_powers(you.religion))
         {
+
             if (power.rank == rank
                 || power.rank == 7 && can_do_capstone_ability(you.religion))
             {
@@ -2607,6 +2621,15 @@ void lose_piety(int pgn)
         redraw_screen();
         update_screen();
 #endif
+
+        if (will_have_passive(passive_t::frail) && !have_passive(passive_t::frail))
+        {
+            // hep: just lost 1*
+            // remove companion (gained at same tier as frail)
+            add_daction(DACT_ALLY_HEPLIAKLQANA);
+            remove_all_companions(GOD_HEPLIAKLQANA);
+            calc_hp(); // adjust for frailty
+        }
     }
 
     if (you.piety > 0 && you.piety <= 5)
@@ -3620,15 +3643,6 @@ static void _join_hepliaklqana()
         you.props[HEPLIAKLQANA_ALLY_NAME_KEY] = _make_ancestor_name(gender);
         you.props[HEPLIAKLQANA_ALLY_GENDER_KEY] = gender;
     }
-
-    calc_hp(); // adjust for frailty
-
-    // Complimentary ancestor upon joining.
-    const mgen_data mg = hepliaklqana_ancestor_gen_data();
-    delayed_monster(mg);
-    simple_god_message(make_stringf(" forms a fragment of your life essence"
-                                    " into the memory of your ancestor, %s!",
-                                    mg.mname.c_str()).c_str());
 }
 
 /// Setup when joining the gelatinous groupies of Jiyva.