From 5263fe73e09aa458e71d9ff306b4145567c7d8e1 Mon Sep 17 00:00:00 2001 From: dolorous Date: Tue, 19 Aug 2008 02:50:40 +0000 Subject: Rework Zin's Vitalisation to be simpler, based mostly on dploog's suggestions. Note that divine robustness is no longer available from Zin, but the code for it is still in place, since it can be adopted later for Elyvilon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6839 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abl-show.cc | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/abl-show.cc') diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index 85e255784c..0c04c4a3a5 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -82,13 +82,12 @@ enum ability_flag_type ABFLAG_NONE = 0x00000000, ABFLAG_BREATH = 0x00000001, // ability uses DUR_BREATH_WEAPON ABFLAG_DELAY = 0x00000002, // ability has its own delay (ie recite) - ABFLAG_PIETY = 0x00000004, // ability has its own piety (ie vitalise) - ABFLAG_PAIN = 0x00000008, // ability must hurt player (ie torment) - ABFLAG_EXHAUSTION = 0x00000010, // fails if you.exhausted - ABFLAG_INSTANT = 0x00000020, // doesn't take time to use - ABFLAG_PERMANENT_HP = 0x00000040, // costs permanent HPs - ABFLAG_PERMANENT_MP = 0x00000080, // costs permanent MPs - ABFLAG_CONF_OK = 0x00000100 // can use even if confused + ABFLAG_PAIN = 0x00000004, // ability must hurt player (ie torment) + ABFLAG_EXHAUSTION = 0x00000008, // fails if you.exhausted + ABFLAG_INSTANT = 0x00000010, // doesn't take time to use + ABFLAG_PERMANENT_HP = 0x00000020, // costs permanent HPs + ABFLAG_PERMANENT_MP = 0x00000040, // costs permanent MPs + ABFLAG_CONF_OK = 0x00000080 // can use even if confused }; static void _lugonu_bends_space(); @@ -236,7 +235,7 @@ static const ability_def Ability_List[] = // INVOCATIONS: // Zin { ABIL_ZIN_RECITE, "Recite", 3, 0, 120, 0, ABFLAG_DELAY }, - { ABIL_ZIN_VITALISATION, "Vitalisation", 0, 0, 100, 0, ABFLAG_PIETY | ABFLAG_CONF_OK }, + { ABIL_ZIN_VITALISATION, "Vitalisation", 0, 0, 100, 2, ABFLAG_CONF_OK }, { ABIL_ZIN_SANCTUARY, "Sanctuary", 7, 0, 150, 15, ABFLAG_NONE }, // The Shining One @@ -388,7 +387,7 @@ const std::string make_cost_description( ability_type ability ) ret << "Food"; // randomized and amount hidden from player } - if (abil.piety_cost || abil.flags & ABFLAG_PIETY) + if (abil.piety_cost) { if (!ret.str().empty()) ret << ", "; @@ -1456,12 +1455,9 @@ static bool _do_ability(const ability_def& abil) } case ABIL_ZIN_VITALISATION: - { - int result = cast_vitalisation(1 + (you.skills[SK_INVOCATIONS] / 4)); - if (result > 0) - exercise(SK_INVOCATIONS, 2 + random2(result)); + if (cast_vitalisation()) + exercise(SK_INVOCATIONS, (coinflip() ? 3 : 2)); break; - } case ABIL_ZIN_SANCTUARY: if (cast_sanctuary(you.skills[SK_INVOCATIONS] * 4)) -- cgit v1.2.3-54-g00ecf