diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-02 18:30:04 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-02 18:30:04 +0000 |
commit | 84a922b5d5d8ca1d70f1ecc74d489e34b7ef4b80 (patch) | |
tree | bcdd18af9087181fe49655a4d10bbe5f3121a74d /crawl-ref/source | |
parent | a9c9cc2e37f5aa01faad30a92984ad12eb27aab2 (diff) | |
download | crawl-ref-84a922b5d5d8ca1d70f1ecc74d489e34b7ef4b80.tar.gz crawl-ref-84a922b5d5d8ca1d70f1ecc74d489e34b7ef4b80.zip |
Beogh now punishes those who destroy orcish idols.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1957 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/beam.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 46 | ||||
-rw-r--r-- | crawl-ref/source/religion.h | 1 |
3 files changed, 47 insertions, 5 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index b07d1b6c53..ef123cdd6f 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -2653,6 +2653,11 @@ static int affect_wall(bolt &beam, int x, int y) mpr("The statue twists and shakes as its substance crumbles away!"); } + if (targ_grid == DNGN_ORCISH_IDOL) + { + beogh_idol_revenge(); + } + beam.obvious_effect = 1; } diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index c85b4272f0..91a6a7f741 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1837,11 +1837,6 @@ static bool beogh_retribution() case 0: // smiting (25%) case 1: { - int divine_hurt = 10 + random2(10); - - for (int i = 0; i < 5; i++) - divine_hurt += random2( you.experience_level ); - if (!player_under_penance() && you.piety > random2(400)) { snprintf(info, INFO_SIZE, "Mortal, I have averted the wrath " @@ -1850,6 +1845,11 @@ static bool beogh_retribution() } else { + int divine_hurt = 10 + random2(10); + + for (int i = 0; i < 5; i++) + divine_hurt += random2( you.experience_level ); + simple_god_message( " smites you!", god ); ouch( divine_hurt, 0, KILLED_BY_BEOGH_SMITING ); dec_penance( god, 1 ); @@ -2260,6 +2260,42 @@ bool followers_abandon_you() return false; } +// Destroying orcish idols (a.k.a. idols of Beogh) +// may anger Beogh +void beogh_idol_revenge() +{ + // Beogh watches his charges closely, but for others doesn't always notice + if (you.religion == GOD_BEOGH || one_chance_in(3)) + { + if (you.religion != GOD_BEOGH && + !player_under_penance() && you.piety > random2(400)) + { + snprintf(info, INFO_SIZE, "Mortal, I have averted the wrath " + "of %s... this time.", god_name(GOD_BEOGH)); + god_speaks(you.religion, info); + } + else + { + snprintf(info, INFO_SIZE, "%s screams, \"Feel the wrath of %s!\"", + god_name(GOD_BEOGH), god_name(GOD_BEOGH)); + god_speaks(GOD_BEOGH, info); + + int divine_hurt = 10 + random2(10); + + for (int i = 0; i < 5; i++) + divine_hurt += random2( you.experience_level ); + + simple_god_message( " smites you!", GOD_BEOGH ); + ouch( divine_hurt, 0, KILLED_BY_BEOGH_SMITING ); + } + if (you.religion == GOD_BEOGH) + { + // comes closest and same result (penance + piety loss) + did_god_conduct(DID_ATTACK_FRIEND, 8); + } + } +} + void excommunication(void) { const god_type old_god = you.religion; diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index 9e4bbfeea8..77c3fb032b 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -45,6 +45,7 @@ void xom_acts(bool niceness, int sever); const char *describe_xom_favour(); bool beogh_water_walk(); +void beogh_idol_revenge(); inline void xom_acts(int sever) { |