From 2d16881d3392336c49f388c500749613899852df Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 16 Jan 2008 21:59:38 +0000 Subject: As brought up during the good god overhaul discussion a few months ago, adjust TSO's life protection to work as follows: put it in player_prot_life() so it's displayed just as Zin's mutation protection is; give one, two, or three levels of it depending on piety (the values are 50, 100, and 150 for now); and add a description of it to the religion screen. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3284 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 15 ++++++++++++++- crawl-ref/source/ouch.cc | 8 -------- crawl-ref/source/player.cc | 6 ++++++ 3 files changed, 20 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index dd0b4928b4..dd8ee451f4 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2520,10 +2520,23 @@ void describe_god( god_type which_god, bool give_title ) (you.piety >= 100) ? "often" : (you.piety >= 50) ? "sometimes" : "occasionally"; - + cprintf("%s %s shields you from mutagenic effects." EOL, god_name(which_god).c_str(), how); } + else if (which_god == GOD_SHINING_ONE) + { + have_any = true; + if (you.piety >= 50) + { + const char *how = (you.piety >= 150) ? "carefully" : // l.p. 3 + (you.piety >= 100) ? "often" : + "sometimes"; + + cprintf("%s %s protects your life force." EOL, + god_name(which_god).c_str(), how); + } + } else if (which_god == GOD_TROG) { have_any = true; diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 43b605bebc..dd2678b970 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -604,14 +604,6 @@ void drain_exp(bool announce_full) { int protection = player_prot_life(); - if (you.duration[DUR_PRAYER] - && you.religion == GOD_SHINING_ONE - && random2(150) < you.piety) - { - simple_god_message(" protects your life force!"); - return; - } - if (protection >= 3) { if ( announce_full ) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 1bf82f069e..cbd1242e92 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1600,6 +1600,12 @@ int player_prot_life(bool calc_unid) // undead/demonic power pl += you.mutation[MUT_NEGATIVE_ENERGY_RESISTANCE]; + // TSO's protection + if (you.religion == GOD_SHINING_ONE) + { + pl += you.piety / 50; + } + if (pl > 3) pl = 3; -- cgit v1.2.3-54-g00ecf