diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 15:57:55 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 15:57:55 +0000 |
commit | e6525c83826d150eb2a283ce5bf23218cb75f82e (patch) | |
tree | b16a09028c1468efa825975fb1e85a3e4d722bf5 /crawl-ref/source/religion.cc | |
parent | 674a9e64697629cc3266564ea4f8dc7eb2616b50 (diff) | |
download | crawl-ref-e6525c83826d150eb2a283ce5bf23218cb75f82e.tar.gz crawl-ref-e6525c83826d150eb2a283ce5bf23218cb75f82e.zip |
* Add Cannibalism to list of forbidded actions for good gods.
* Add simple warning message (god "did not appreciate that!")
when using unID'd items that would otherwise be penalized.
* Change protection from harm to be independent of prayer.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2849 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index b55cc393f2..93b59a40d3 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1205,7 +1205,8 @@ void god_speaks( god_type god, const char *mesg ) // This function is the merger of done_good() and naughty(). // Returns true if god was interested (good or bad) in conduct. -bool did_god_conduct( conduct_type thing_done, int level, const actor *victim ) +bool did_god_conduct( conduct_type thing_done, int level, bool known, + const actor *victim ) { bool ret = false; int piety_change = 0; @@ -1221,10 +1222,21 @@ bool did_god_conduct( conduct_type thing_done, int level, const actor *victim ) case DID_DRINK_BLOOD: switch (you.religion) { - case GOD_ZIN: case GOD_SHINING_ONE: + if (!known) + { + simple_god_message(" did not appreciate that!"); + break; + } + penance = level; + // deliberate fall-through + case GOD_ZIN: case GOD_ELYVILON: - // no penance as this can happen accidentally + if (!known) + { + simple_god_message(" did not appreciate that!"); + break; + } piety_change = -2*level; ret = true; break; @@ -1233,7 +1245,22 @@ bool did_god_conduct( conduct_type thing_done, int level, const actor *victim ) } break; - // If you make some god like these acts, modify did_god_conduct call + case DID_CANNIBALISM: + switch (you.religion) + { + case GOD_ZIN: + case GOD_SHINING_ONE: + case GOD_ELYVILON: + piety_change = -level; + penance = level; + ret = true; + break; + default: + break; + } + break; + + // If you make some god like these acts, modify did_god_conduct call // in beam.cc with god_likes_necromancy check or something similar case DID_NECROMANCY: case DID_UNHOLY: @@ -1243,8 +1270,13 @@ bool did_god_conduct( conduct_type thing_done, int level, const actor *victim ) case GOD_ZIN: case GOD_SHINING_ONE: case GOD_ELYVILON: + if (!known) + { + simple_god_message(" did not appreciate that!"); + break; + } piety_change = -level; - penance = level * ((you.religion == GOD_ZIN) ? 2 : 1); + penance = level * ((you.religion == GOD_SHINING_ONE) ? 2 : 1); ret = true; break; default: @@ -1656,13 +1688,12 @@ bool did_god_conduct( conduct_type thing_done, int level, const actor *victim ) "Necromancy", "Unholy", "Attack Holy", "Attack Friend", "Friend Died", "Stab", "Poison", "Field Sacrifice", "Kill Living", "Kill Undead", "Kill Demon", "Kill Natural Evil", - "Kill Wizard", - "Kill Priest", "Kill Angel", "Undead Slave Kill Living", - "Servant Kill Living", "Servant Kill Undead", - "Servant Kill Demon", "Servant Kill Natural Evil", - "Servant Kill Angel", + "Kill Wizard", "Kill Priest", "Kill Angel", "Undead Slave Kill Living", + "Servant Kill Living", "Servant Kill Undead", "Servant Kill Demon", + "Servant Kill Natural Evil", "Servant Kill Angel", "Spell Memorise", "Spell Cast", "Spell Practise", "Spell Nonutility", - "Cards", "Stimulants", "Drink Blood", "Eat Meat", "Create Life" + "Cards", "Stimulants", "Drink Blood", "Cannibalism", "Eat Meat", + "Create Life" }; ASSERT(ARRAYSIZE(conducts) == NUM_CONDUCTS); |